zabbix-ruby-client 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  Zabbbix Ruby Client Changelog
2
2
  -----------------------------
3
3
 
4
- ### v0.0.9 - wip
4
+ ### v0.0.10 - 2013-10-04
5
+
6
+ * added a mysql plugin (basic version, more will come on that one)
7
+
8
+ ### v0.0.9 - 2013-10-02
5
9
 
6
10
  * split configuration to have several upload frequencies
7
11
  * added a -t option for specifying the list of plugins to run, default minutely.yml
data/README.md CHANGED
@@ -49,7 +49,7 @@ You can use -c to specify another config file, and -t to use another list of plu
49
49
  Here is an example setup using the files generated by the init:
50
50
 
51
51
  * * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload"
52
- 0 */6 * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t hourly.yml"
52
+ 0 0/6 * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t hourly.yml"
53
53
  0 0 1 * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t monthly.yml"
54
54
 
55
55
  ## plugins
@@ -65,6 +65,7 @@ There are a set of standart plugins included in the package, aimed at linux syst
65
65
  * apt (uses ubuntu /usr/lib/update-notifier/apt-check) this one will populate the 'tag' field in host info, and is supposed to run every few hours or at least not every minute [apt_tpl](master/zabbix-templates/apt_tpl.xml)
66
66
  * sysinfo (uses uname -a) is populating the host info in the inventory, and should be ran at setup and/or monthly [sysinfo_tpl](master/zabbix-templates/sysinfo_tpl.xml)
67
67
  * apache (depends on mod_status with status_extended on) [apache_tpl](master/zabbix-templates/apache_tpl.xml)
68
+ * mysql (uses mysqladmin extended-status) [mysql_tpl](master/zabbix-templates/mysql_tpl.xml)
68
69
 
69
70
  You can add extra plugin directories in the configuration file.
70
71
 
@@ -5,20 +5,56 @@ class ZabbixRubyClient
5
5
 
6
6
  def collect(*args)
7
7
  host = args[0]
8
- aptcheck = `/usr/lib/update-notifier/apt-check 2>&1`
8
+ mysqlargs = args[1]
9
+ mysqlstatus = `mysqladmin #{mysqlargs} extended-status`
9
10
  if $?.to_i == 0
10
- security, pending = aptcheck.split(/;/).map(&:to_i)
11
+ status = get_status(mysqlstatus)
11
12
  else
12
- logger.warn "Are you running on ubuntu ?"
13
+ self.logger.warn "The connection failed."
13
14
  return []
14
15
  end
16
+
15
17
  time = Time.now.to_i
16
18
  back = []
17
- back << "#{host} mysql[security] #{time} #{security}"
18
- back << "#{host} mysql[pending] #{time} #{pending}"
19
+ back << "#{host} mysql.status[Aborted_clients] #{time} #{status["Aborted_clients"]}"
20
+ back << "#{host} mysql.status[Aborted_connects] #{time} #{status["Aborted_connects"]}"
21
+ back << "#{host} mysql.status[Bytes_received] #{time} #{status["Bytes_received"]}"
22
+ back << "#{host} mysql.status[Bytes_sent] #{time} #{status["Bytes_sent"]}"
23
+ back << "#{host} mysql.status[Com_admin_commands] #{time} #{status["Com_admin_commands"]}"
24
+ back << "#{host} mysql.status[Com_begin] #{time} #{status["Com_begin"]}"
25
+ back << "#{host} mysql.status[Com_change_db] #{time} #{status["Com_change_db"]}"
26
+ back << "#{host} mysql.status[Com_check] #{time} #{status["Com_check"]}"
27
+ back << "#{host} mysql.status[Com_commit] #{time} #{status["Com_commit"]}"
28
+ back << "#{host} mysql.status[Com_delete] #{time} #{status["Com_delete"]}"
29
+ back << "#{host} mysql.status[Com_insert] #{time} #{status["Com_insert"]}"
30
+ back << "#{host} mysql.status[Com_rollback] #{time} #{status["Com_rollback"]}"
31
+ back << "#{host} mysql.status[Com_lock_tables] #{time} #{status["Com_lock_tables"]}"
32
+ back << "#{host} mysql.status[Com_select] #{time} #{status["Com_select"]}"
33
+ back << "#{host} mysql.status[Com_show_fields] #{time} #{status["Com_show_fields"]}"
34
+ back << "#{host} mysql.status[Com_unlock_tables] #{time} #{status["Com_unlock_tables"]}"
35
+ back << "#{host} mysql.status[Com_update] #{time} #{status["Com_update"]}"
36
+ back << "#{host} mysql.status[Connections] #{time} #{status["Connections"]}"
37
+ back << "#{host} mysql.status[Created_tmp_disk_tables] #{time} #{status["Created_tmp_disk_tables"]}"
38
+ back << "#{host} mysql.status[Created_tmp_tables] #{time} #{status["Created_tmp_tables"]}"
39
+ back << "#{host} mysql.status[Slave_running] #{time} #{status["Slave_running"]}"
40
+ back << "#{host} mysql.status[Slow_queries] #{time} #{status["Slow_queries"]}"
41
+ back << "#{host} mysql.status[Uptime] #{time} #{status["Uptime"]}"
42
+ back << "#{host} mysql.status[Questions] #{time} #{status["Questions"]}"
19
43
  return back
20
44
  end
21
45
 
46
+
47
+ def get_status(status)
48
+ ret = {}
49
+ status.each_line do |l|
50
+ if l[0] == "|"
51
+ _, k, v = l.split "|"
52
+ ret[k.strip] = v.strip
53
+ end
54
+ end
55
+ ret
56
+ end
57
+
22
58
  end
23
59
  end
24
60
  end
@@ -1,3 +1,3 @@
1
1
  class ZabbixRubyClient
2
- VERSION ||= "0.0.9"
2
+ VERSION ||= "0.0.10"
3
3
  end
@@ -0,0 +1,3 @@
1
+ ---
2
+ - name: mysql
3
+ args: "-uzabbix -ppassword -hlocalhost"
@@ -0,0 +1,787 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <zabbix_export>
3
+ <version>2.0</version>
4
+ <date>2013-10-04T10:13:53Z</date>
5
+ <groups>
6
+ <group>
7
+ <name>3. Service db</name>
8
+ </group>
9
+ <group>
10
+ <name>3. Service db-master</name>
11
+ </group>
12
+ <group>
13
+ <name>3. Service db-slave</name>
14
+ </group>
15
+ </groups>
16
+ <templates>
17
+ <template>
18
+ <template>Mysql</template>
19
+ <name>Mysql (zrc)</name>
20
+ <groups>
21
+ <group>
22
+ <name>3. Service db</name>
23
+ </group>
24
+ <group>
25
+ <name>3. Service db-master</name>
26
+ </group>
27
+ <group>
28
+ <name>3. Service db-slave</name>
29
+ </group>
30
+ </groups>
31
+ <applications>
32
+ <application>
33
+ <name>Mysql</name>
34
+ </application>
35
+ </applications>
36
+ <items>
37
+ <item>
38
+ <name>MySQL begin operations per second</name>
39
+ <type>2</type>
40
+ <snmp_community/>
41
+ <multiplier>0</multiplier>
42
+ <snmp_oid/>
43
+ <key>mysql.status[Com_begin]</key>
44
+ <delay>0</delay>
45
+ <history>30</history>
46
+ <trends>365</trends>
47
+ <status>0</status>
48
+ <value_type>0</value_type>
49
+ <allowed_hosts/>
50
+ <units>qps</units>
51
+ <delta>1</delta>
52
+ <snmpv3_securityname/>
53
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
54
+ <snmpv3_authpassphrase/>
55
+ <snmpv3_privpassphrase/>
56
+ <formula>1</formula>
57
+ <delay_flex/>
58
+ <params/>
59
+ <ipmi_sensor/>
60
+ <data_type>0</data_type>
61
+ <authtype>0</authtype>
62
+ <username/>
63
+ <password/>
64
+ <publickey/>
65
+ <privatekey/>
66
+ <port/>
67
+ <description/>
68
+ <inventory_link>0</inventory_link>
69
+ <applications>
70
+ <application>
71
+ <name>Mysql</name>
72
+ </application>
73
+ </applications>
74
+ <valuemap/>
75
+ </item>
76
+ <item>
77
+ <name>MySQL bytes received per second</name>
78
+ <type>2</type>
79
+ <snmp_community/>
80
+ <multiplier>0</multiplier>
81
+ <snmp_oid/>
82
+ <key>mysql.status[Bytes_received]</key>
83
+ <delay>0</delay>
84
+ <history>30</history>
85
+ <trends>365</trends>
86
+ <status>0</status>
87
+ <value_type>0</value_type>
88
+ <allowed_hosts/>
89
+ <units>Bps</units>
90
+ <delta>1</delta>
91
+ <snmpv3_securityname/>
92
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
93
+ <snmpv3_authpassphrase/>
94
+ <snmpv3_privpassphrase/>
95
+ <formula>1</formula>
96
+ <delay_flex/>
97
+ <params/>
98
+ <ipmi_sensor/>
99
+ <data_type>0</data_type>
100
+ <authtype>0</authtype>
101
+ <username/>
102
+ <password/>
103
+ <publickey/>
104
+ <privatekey/>
105
+ <port/>
106
+ <description>The number of bytes received from all clients.</description>
107
+ <inventory_link>0</inventory_link>
108
+ <applications>
109
+ <application>
110
+ <name>Mysql</name>
111
+ </application>
112
+ </applications>
113
+ <valuemap/>
114
+ </item>
115
+ <item>
116
+ <name>MySQL bytes sent per second</name>
117
+ <type>2</type>
118
+ <snmp_community/>
119
+ <multiplier>0</multiplier>
120
+ <snmp_oid/>
121
+ <key>mysql.status[Bytes_sent]</key>
122
+ <delay>0</delay>
123
+ <history>30</history>
124
+ <trends>365</trends>
125
+ <status>0</status>
126
+ <value_type>0</value_type>
127
+ <allowed_hosts/>
128
+ <units>Bps</units>
129
+ <delta>1</delta>
130
+ <snmpv3_securityname/>
131
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
132
+ <snmpv3_authpassphrase/>
133
+ <snmpv3_privpassphrase/>
134
+ <formula>1</formula>
135
+ <delay_flex/>
136
+ <params/>
137
+ <ipmi_sensor/>
138
+ <data_type>0</data_type>
139
+ <authtype>0</authtype>
140
+ <username/>
141
+ <password/>
142
+ <publickey/>
143
+ <privatekey/>
144
+ <port/>
145
+ <description>The number of bytes sent to all clients.</description>
146
+ <inventory_link>0</inventory_link>
147
+ <applications>
148
+ <application>
149
+ <name>Mysql</name>
150
+ </application>
151
+ </applications>
152
+ <valuemap/>
153
+ </item>
154
+ <item>
155
+ <name>MySQL commit operations per second</name>
156
+ <type>2</type>
157
+ <snmp_community/>
158
+ <multiplier>0</multiplier>
159
+ <snmp_oid/>
160
+ <key>mysql.status[Com_commit]</key>
161
+ <delay>0</delay>
162
+ <history>30</history>
163
+ <trends>365</trends>
164
+ <status>0</status>
165
+ <value_type>0</value_type>
166
+ <allowed_hosts/>
167
+ <units>qps</units>
168
+ <delta>1</delta>
169
+ <snmpv3_securityname/>
170
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
171
+ <snmpv3_authpassphrase/>
172
+ <snmpv3_privpassphrase/>
173
+ <formula>1</formula>
174
+ <delay_flex/>
175
+ <params/>
176
+ <ipmi_sensor/>
177
+ <data_type>0</data_type>
178
+ <authtype>0</authtype>
179
+ <username/>
180
+ <password/>
181
+ <publickey/>
182
+ <privatekey/>
183
+ <port/>
184
+ <description/>
185
+ <inventory_link>0</inventory_link>
186
+ <applications>
187
+ <application>
188
+ <name>Mysql</name>
189
+ </application>
190
+ </applications>
191
+ <valuemap/>
192
+ </item>
193
+ <item>
194
+ <name>MySQL delete operations per second</name>
195
+ <type>2</type>
196
+ <snmp_community/>
197
+ <multiplier>0</multiplier>
198
+ <snmp_oid/>
199
+ <key>mysql.status[Com_delete]</key>
200
+ <delay>0</delay>
201
+ <history>30</history>
202
+ <trends>365</trends>
203
+ <status>0</status>
204
+ <value_type>0</value_type>
205
+ <allowed_hosts/>
206
+ <units>qps</units>
207
+ <delta>1</delta>
208
+ <snmpv3_securityname/>
209
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
210
+ <snmpv3_authpassphrase/>
211
+ <snmpv3_privpassphrase/>
212
+ <formula>1</formula>
213
+ <delay_flex/>
214
+ <params/>
215
+ <ipmi_sensor/>
216
+ <data_type>0</data_type>
217
+ <authtype>0</authtype>
218
+ <username/>
219
+ <password/>
220
+ <publickey/>
221
+ <privatekey/>
222
+ <port/>
223
+ <description/>
224
+ <inventory_link>0</inventory_link>
225
+ <applications>
226
+ <application>
227
+ <name>Mysql</name>
228
+ </application>
229
+ </applications>
230
+ <valuemap/>
231
+ </item>
232
+ <item>
233
+ <name>MySQL insert operations per second</name>
234
+ <type>2</type>
235
+ <snmp_community/>
236
+ <multiplier>0</multiplier>
237
+ <snmp_oid/>
238
+ <key>mysql.status[Com_insert]</key>
239
+ <delay>0</delay>
240
+ <history>30</history>
241
+ <trends>365</trends>
242
+ <status>0</status>
243
+ <value_type>0</value_type>
244
+ <allowed_hosts/>
245
+ <units>qps</units>
246
+ <delta>1</delta>
247
+ <snmpv3_securityname/>
248
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
249
+ <snmpv3_authpassphrase/>
250
+ <snmpv3_privpassphrase/>
251
+ <formula>1</formula>
252
+ <delay_flex/>
253
+ <params/>
254
+ <ipmi_sensor/>
255
+ <data_type>0</data_type>
256
+ <authtype>0</authtype>
257
+ <username/>
258
+ <password/>
259
+ <publickey/>
260
+ <privatekey/>
261
+ <port/>
262
+ <description/>
263
+ <inventory_link>0</inventory_link>
264
+ <applications>
265
+ <application>
266
+ <name>Mysql</name>
267
+ </application>
268
+ </applications>
269
+ <valuemap/>
270
+ </item>
271
+ <item>
272
+ <name>MySQL queries per second</name>
273
+ <type>2</type>
274
+ <snmp_community/>
275
+ <multiplier>0</multiplier>
276
+ <snmp_oid/>
277
+ <key>mysql.status[Questions]</key>
278
+ <delay>0</delay>
279
+ <history>30</history>
280
+ <trends>365</trends>
281
+ <status>0</status>
282
+ <value_type>0</value_type>
283
+ <allowed_hosts/>
284
+ <units>qps</units>
285
+ <delta>1</delta>
286
+ <snmpv3_securityname/>
287
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
288
+ <snmpv3_authpassphrase/>
289
+ <snmpv3_privpassphrase/>
290
+ <formula>1</formula>
291
+ <delay_flex/>
292
+ <params/>
293
+ <ipmi_sensor/>
294
+ <data_type>0</data_type>
295
+ <authtype>0</authtype>
296
+ <username/>
297
+ <password/>
298
+ <publickey/>
299
+ <privatekey/>
300
+ <port/>
301
+ <description/>
302
+ <inventory_link>0</inventory_link>
303
+ <applications>
304
+ <application>
305
+ <name>Mysql</name>
306
+ </application>
307
+ </applications>
308
+ <valuemap/>
309
+ </item>
310
+ <item>
311
+ <name>MySQL rollback operations per second</name>
312
+ <type>2</type>
313
+ <snmp_community/>
314
+ <multiplier>0</multiplier>
315
+ <snmp_oid/>
316
+ <key>mysql.status[Com_rollback]</key>
317
+ <delay>0</delay>
318
+ <history>30</history>
319
+ <trends>365</trends>
320
+ <status>0</status>
321
+ <value_type>0</value_type>
322
+ <allowed_hosts/>
323
+ <units>qps</units>
324
+ <delta>1</delta>
325
+ <snmpv3_securityname/>
326
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
327
+ <snmpv3_authpassphrase/>
328
+ <snmpv3_privpassphrase/>
329
+ <formula>1</formula>
330
+ <delay_flex/>
331
+ <params/>
332
+ <ipmi_sensor/>
333
+ <data_type>0</data_type>
334
+ <authtype>0</authtype>
335
+ <username/>
336
+ <password/>
337
+ <publickey/>
338
+ <privatekey/>
339
+ <port/>
340
+ <description/>
341
+ <inventory_link>0</inventory_link>
342
+ <applications>
343
+ <application>
344
+ <name>Mysql</name>
345
+ </application>
346
+ </applications>
347
+ <valuemap/>
348
+ </item>
349
+ <item>
350
+ <name>MySQL select operations per second</name>
351
+ <type>2</type>
352
+ <snmp_community/>
353
+ <multiplier>0</multiplier>
354
+ <snmp_oid/>
355
+ <key>mysql.status[Com_select]</key>
356
+ <delay>0</delay>
357
+ <history>30</history>
358
+ <trends>365</trends>
359
+ <status>0</status>
360
+ <value_type>0</value_type>
361
+ <allowed_hosts/>
362
+ <units>qps</units>
363
+ <delta>1</delta>
364
+ <snmpv3_securityname/>
365
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
366
+ <snmpv3_authpassphrase/>
367
+ <snmpv3_privpassphrase/>
368
+ <formula>1</formula>
369
+ <delay_flex/>
370
+ <params/>
371
+ <ipmi_sensor/>
372
+ <data_type>0</data_type>
373
+ <authtype>0</authtype>
374
+ <username/>
375
+ <password/>
376
+ <publickey/>
377
+ <privatekey/>
378
+ <port/>
379
+ <description/>
380
+ <inventory_link>0</inventory_link>
381
+ <applications>
382
+ <application>
383
+ <name>Mysql</name>
384
+ </application>
385
+ </applications>
386
+ <valuemap/>
387
+ </item>
388
+ <item>
389
+ <name>MySQL slow queries</name>
390
+ <type>2</type>
391
+ <snmp_community/>
392
+ <multiplier>0</multiplier>
393
+ <snmp_oid/>
394
+ <key>mysql.status[Slow_queries]</key>
395
+ <delay>0</delay>
396
+ <history>30</history>
397
+ <trends>365</trends>
398
+ <status>0</status>
399
+ <value_type>3</value_type>
400
+ <allowed_hosts/>
401
+ <units/>
402
+ <delta>0</delta>
403
+ <snmpv3_securityname/>
404
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
405
+ <snmpv3_authpassphrase/>
406
+ <snmpv3_privpassphrase/>
407
+ <formula>1</formula>
408
+ <delay_flex/>
409
+ <params/>
410
+ <ipmi_sensor/>
411
+ <data_type>0</data_type>
412
+ <authtype>0</authtype>
413
+ <username/>
414
+ <password/>
415
+ <publickey/>
416
+ <privatekey/>
417
+ <port/>
418
+ <description/>
419
+ <inventory_link>0</inventory_link>
420
+ <applications>
421
+ <application>
422
+ <name>Mysql</name>
423
+ </application>
424
+ </applications>
425
+ <valuemap/>
426
+ </item>
427
+ <item>
428
+ <name>MySQL status</name>
429
+ <type>2</type>
430
+ <snmp_community/>
431
+ <multiplier>0</multiplier>
432
+ <snmp_oid/>
433
+ <key>mysql.ping</key>
434
+ <delay>0</delay>
435
+ <history>30</history>
436
+ <trends>365</trends>
437
+ <status>0</status>
438
+ <value_type>3</value_type>
439
+ <allowed_hosts/>
440
+ <units/>
441
+ <delta>0</delta>
442
+ <snmpv3_securityname/>
443
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
444
+ <snmpv3_authpassphrase/>
445
+ <snmpv3_privpassphrase/>
446
+ <formula>1</formula>
447
+ <delay_flex/>
448
+ <params/>
449
+ <ipmi_sensor/>
450
+ <data_type>0</data_type>
451
+ <authtype>0</authtype>
452
+ <username/>
453
+ <password/>
454
+ <publickey/>
455
+ <privatekey/>
456
+ <port/>
457
+ <description>0 - MySQL server is down&#13;
458
+ 1 - MySQL server is up</description>
459
+ <inventory_link>0</inventory_link>
460
+ <applications>
461
+ <application>
462
+ <name>Mysql</name>
463
+ </application>
464
+ </applications>
465
+ <valuemap>
466
+ <name>Service state</name>
467
+ </valuemap>
468
+ </item>
469
+ <item>
470
+ <name>MySQL update operations per second</name>
471
+ <type>2</type>
472
+ <snmp_community/>
473
+ <multiplier>0</multiplier>
474
+ <snmp_oid/>
475
+ <key>mysql.status[Com_update]</key>
476
+ <delay>0</delay>
477
+ <history>30</history>
478
+ <trends>365</trends>
479
+ <status>0</status>
480
+ <value_type>0</value_type>
481
+ <allowed_hosts/>
482
+ <units>qps</units>
483
+ <delta>1</delta>
484
+ <snmpv3_securityname/>
485
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
486
+ <snmpv3_authpassphrase/>
487
+ <snmpv3_privpassphrase/>
488
+ <formula>1</formula>
489
+ <delay_flex/>
490
+ <params/>
491
+ <ipmi_sensor/>
492
+ <data_type>0</data_type>
493
+ <authtype>0</authtype>
494
+ <username/>
495
+ <password/>
496
+ <publickey/>
497
+ <privatekey/>
498
+ <port/>
499
+ <description/>
500
+ <inventory_link>0</inventory_link>
501
+ <applications>
502
+ <application>
503
+ <name>Mysql</name>
504
+ </application>
505
+ </applications>
506
+ <valuemap/>
507
+ </item>
508
+ <item>
509
+ <name>MySQL uptime</name>
510
+ <type>2</type>
511
+ <snmp_community/>
512
+ <multiplier>0</multiplier>
513
+ <snmp_oid/>
514
+ <key>mysql.status[Uptime]</key>
515
+ <delay>0</delay>
516
+ <history>30</history>
517
+ <trends>365</trends>
518
+ <status>0</status>
519
+ <value_type>3</value_type>
520
+ <allowed_hosts/>
521
+ <units>uptime</units>
522
+ <delta>0</delta>
523
+ <snmpv3_securityname/>
524
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
525
+ <snmpv3_authpassphrase/>
526
+ <snmpv3_privpassphrase/>
527
+ <formula>1</formula>
528
+ <delay_flex/>
529
+ <params/>
530
+ <ipmi_sensor/>
531
+ <data_type>0</data_type>
532
+ <authtype>0</authtype>
533
+ <username/>
534
+ <password/>
535
+ <publickey/>
536
+ <privatekey/>
537
+ <port/>
538
+ <description/>
539
+ <inventory_link>0</inventory_link>
540
+ <applications>
541
+ <application>
542
+ <name>Mysql</name>
543
+ </application>
544
+ </applications>
545
+ <valuemap/>
546
+ </item>
547
+ <item>
548
+ <name>MySQL version</name>
549
+ <type>2</type>
550
+ <snmp_community/>
551
+ <multiplier>0</multiplier>
552
+ <snmp_oid/>
553
+ <key>mysql.version</key>
554
+ <delay>0</delay>
555
+ <history>30</history>
556
+ <trends>365</trends>
557
+ <status>0</status>
558
+ <value_type>1</value_type>
559
+ <allowed_hosts/>
560
+ <units/>
561
+ <delta>0</delta>
562
+ <snmpv3_securityname/>
563
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
564
+ <snmpv3_authpassphrase/>
565
+ <snmpv3_privpassphrase/>
566
+ <formula>1</formula>
567
+ <delay_flex/>
568
+ <params/>
569
+ <ipmi_sensor/>
570
+ <data_type>0</data_type>
571
+ <authtype>0</authtype>
572
+ <username/>
573
+ <password/>
574
+ <publickey/>
575
+ <privatekey/>
576
+ <port/>
577
+ <description/>
578
+ <inventory_link>0</inventory_link>
579
+ <applications>
580
+ <application>
581
+ <name>Mysql</name>
582
+ </application>
583
+ </applications>
584
+ <valuemap/>
585
+ </item>
586
+ </items>
587
+ <discovery_rules/>
588
+ <macros/>
589
+ <templates/>
590
+ <screens/>
591
+ </template>
592
+ </templates>
593
+ <graphs>
594
+ <graph>
595
+ <name>MySQL bandwidth</name>
596
+ <width>900</width>
597
+ <height>200</height>
598
+ <yaxismin>0.0000</yaxismin>
599
+ <yaxismax>100.0000</yaxismax>
600
+ <show_work_period>1</show_work_period>
601
+ <show_triggers>1</show_triggers>
602
+ <type>0</type>
603
+ <show_legend>1</show_legend>
604
+ <show_3d>0</show_3d>
605
+ <percent_left>0.0000</percent_left>
606
+ <percent_right>0.0000</percent_right>
607
+ <ymin_type_1>0</ymin_type_1>
608
+ <ymax_type_1>0</ymax_type_1>
609
+ <ymin_item_1>0</ymin_item_1>
610
+ <ymax_item_1>0</ymax_item_1>
611
+ <graph_items>
612
+ <graph_item>
613
+ <sortorder>0</sortorder>
614
+ <drawtype>5</drawtype>
615
+ <color>6666FF</color>
616
+ <yaxisside>0</yaxisside>
617
+ <calc_fnc>2</calc_fnc>
618
+ <type>0</type>
619
+ <item>
620
+ <host>Mysql</host>
621
+ <key>mysql.status[Bytes_received]</key>
622
+ </item>
623
+ </graph_item>
624
+ <graph_item>
625
+ <sortorder>1</sortorder>
626
+ <drawtype>5</drawtype>
627
+ <color>00C800</color>
628
+ <yaxisside>0</yaxisside>
629
+ <calc_fnc>2</calc_fnc>
630
+ <type>0</type>
631
+ <item>
632
+ <host>Mysql</host>
633
+ <key>mysql.status[Bytes_sent]</key>
634
+ </item>
635
+ </graph_item>
636
+ </graph_items>
637
+ </graph>
638
+ <graph>
639
+ <name>MySQL operations</name>
640
+ <width>900</width>
641
+ <height>200</height>
642
+ <yaxismin>0.0000</yaxismin>
643
+ <yaxismax>100.0000</yaxismax>
644
+ <show_work_period>1</show_work_period>
645
+ <show_triggers>1</show_triggers>
646
+ <type>0</type>
647
+ <show_legend>1</show_legend>
648
+ <show_3d>0</show_3d>
649
+ <percent_left>0.0000</percent_left>
650
+ <percent_right>0.0000</percent_right>
651
+ <ymin_type_1>0</ymin_type_1>
652
+ <ymax_type_1>0</ymax_type_1>
653
+ <ymin_item_1>0</ymin_item_1>
654
+ <ymax_item_1>0</ymax_item_1>
655
+ <graph_items>
656
+ <graph_item>
657
+ <sortorder>0</sortorder>
658
+ <drawtype>0</drawtype>
659
+ <color>C8C800</color>
660
+ <yaxisside>0</yaxisside>
661
+ <calc_fnc>2</calc_fnc>
662
+ <type>0</type>
663
+ <item>
664
+ <host>Mysql</host>
665
+ <key>mysql.status[Com_begin]</key>
666
+ </item>
667
+ </graph_item>
668
+ <graph_item>
669
+ <sortorder>1</sortorder>
670
+ <drawtype>0</drawtype>
671
+ <color>006400</color>
672
+ <yaxisside>0</yaxisside>
673
+ <calc_fnc>2</calc_fnc>
674
+ <type>0</type>
675
+ <item>
676
+ <host>Mysql</host>
677
+ <key>mysql.status[Com_commit]</key>
678
+ </item>
679
+ </graph_item>
680
+ <graph_item>
681
+ <sortorder>2</sortorder>
682
+ <drawtype>0</drawtype>
683
+ <color>C80000</color>
684
+ <yaxisside>0</yaxisside>
685
+ <calc_fnc>2</calc_fnc>
686
+ <type>0</type>
687
+ <item>
688
+ <host>Mysql</host>
689
+ <key>mysql.status[Com_delete]</key>
690
+ </item>
691
+ </graph_item>
692
+ <graph_item>
693
+ <sortorder>3</sortorder>
694
+ <drawtype>0</drawtype>
695
+ <color>0000EE</color>
696
+ <yaxisside>0</yaxisside>
697
+ <calc_fnc>2</calc_fnc>
698
+ <type>0</type>
699
+ <item>
700
+ <host>Mysql</host>
701
+ <key>mysql.status[Com_insert]</key>
702
+ </item>
703
+ </graph_item>
704
+ <graph_item>
705
+ <sortorder>4</sortorder>
706
+ <drawtype>0</drawtype>
707
+ <color>640000</color>
708
+ <yaxisside>0</yaxisside>
709
+ <calc_fnc>2</calc_fnc>
710
+ <type>0</type>
711
+ <item>
712
+ <host>Mysql</host>
713
+ <key>mysql.status[Com_rollback]</key>
714
+ </item>
715
+ </graph_item>
716
+ <graph_item>
717
+ <sortorder>5</sortorder>
718
+ <drawtype>0</drawtype>
719
+ <color>00C800</color>
720
+ <yaxisside>0</yaxisside>
721
+ <calc_fnc>2</calc_fnc>
722
+ <type>0</type>
723
+ <item>
724
+ <host>Mysql</host>
725
+ <key>mysql.status[Com_select]</key>
726
+ </item>
727
+ </graph_item>
728
+ <graph_item>
729
+ <sortorder>6</sortorder>
730
+ <drawtype>0</drawtype>
731
+ <color>C800C8</color>
732
+ <yaxisside>0</yaxisside>
733
+ <calc_fnc>2</calc_fnc>
734
+ <type>0</type>
735
+ <item>
736
+ <host>Mysql</host>
737
+ <key>mysql.status[Com_update]</key>
738
+ </item>
739
+ </graph_item>
740
+ </graph_items>
741
+ </graph>
742
+ <graph>
743
+ <name>s. MySQL bandwidth</name>
744
+ <width>900</width>
745
+ <height>200</height>
746
+ <yaxismin>0.0000</yaxismin>
747
+ <yaxismax>100.0000</yaxismax>
748
+ <show_work_period>1</show_work_period>
749
+ <show_triggers>0</show_triggers>
750
+ <type>0</type>
751
+ <show_legend>0</show_legend>
752
+ <show_3d>0</show_3d>
753
+ <percent_left>0.0000</percent_left>
754
+ <percent_right>0.0000</percent_right>
755
+ <ymin_type_1>0</ymin_type_1>
756
+ <ymax_type_1>0</ymax_type_1>
757
+ <ymin_item_1>0</ymin_item_1>
758
+ <ymax_item_1>0</ymax_item_1>
759
+ <graph_items>
760
+ <graph_item>
761
+ <sortorder>0</sortorder>
762
+ <drawtype>5</drawtype>
763
+ <color>6666FF</color>
764
+ <yaxisside>0</yaxisside>
765
+ <calc_fnc>2</calc_fnc>
766
+ <type>0</type>
767
+ <item>
768
+ <host>Mysql</host>
769
+ <key>mysql.status[Bytes_received]</key>
770
+ </item>
771
+ </graph_item>
772
+ <graph_item>
773
+ <sortorder>1</sortorder>
774
+ <drawtype>5</drawtype>
775
+ <color>00C800</color>
776
+ <yaxisside>0</yaxisside>
777
+ <calc_fnc>2</calc_fnc>
778
+ <type>0</type>
779
+ <item>
780
+ <host>Mysql</host>
781
+ <key>mysql.status[Bytes_sent]</key>
782
+ </item>
783
+ </graph_item>
784
+ </graph_items>
785
+ </graph>
786
+ </graphs>
787
+ </zabbix_export>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-02 00:00:00.000000000 Z
12
+ date: 2013-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -125,6 +125,7 @@ files:
125
125
  - templates/client/hourly.yml
126
126
  - templates/client/minutely.yml
127
127
  - templates/client/monthly.yml
128
+ - templates/client/mysql.yml
128
129
  - zabbix-ruby-client.gemspec
129
130
  - zabbix-templates/apache_tpl.xml
130
131
  - zabbix-templates/apt_tpl.xml
@@ -132,6 +133,7 @@ files:
132
133
  - zabbix-templates/disk_tpl.xml
133
134
  - zabbix-templates/load_tpl.xml
134
135
  - zabbix-templates/memory_tpl.xml
136
+ - zabbix-templates/mysql_tpl.xml
135
137
  - zabbix-templates/network_tpl.xml
136
138
  - zabbix-templates/sysinfo_tpl.xml
137
139
  - zabbix-templates/system_tpl.xml
@@ -150,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
150
152
  version: '0'
151
153
  segments:
152
154
  - 0
153
- hash: 1811379948765206712
155
+ hash: 4065162595264983570
154
156
  required_rubygems_version: !ruby/object:Gem::Requirement
155
157
  none: false
156
158
  requirements:
@@ -159,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
161
  version: '0'
160
162
  segments:
161
163
  - 0
162
- hash: 1811379948765206712
164
+ hash: 4065162595264983570
163
165
  requirements: []
164
166
  rubyforge_project:
165
167
  rubygems_version: 1.8.23