zabbix-ruby-client 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 093f332e9192da2bddb1838e5d5fec8403413658
4
+ data.tar.gz: b264f9b8870373dcd83701aea7b2c5fad40687a4
5
+ SHA512:
6
+ metadata.gz: efe51954c922ce7c5e35b3a6bd35b8efa8f35afd31f86fb97a5a4b8c30a4c3a8f49054cc7bf27d0fd9496efff3408fd0e6c124b241e1cb7d613d9c7643ab727a
7
+ data.tar.gz: a0c280888a3c80d28d087c56c68a6e22fbd96b96d04db262bdda6fc737f70a8b9b4d69b2bd9f1b159dbce8d96838fce32a155f6d7cfecb0f7a8195954722f46f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Zabbbix Ruby Client Changelog
2
2
  -----------------------------
3
3
 
4
+ ### v0.0.8 - 2013-09-28
5
+
6
+ * adding load stats
7
+ * fix calcuation of percent of cpu used
8
+ * fix disk plugin to use proc rather than iostat
9
+ * various fixes in zabbix templates for disk io
10
+
4
11
  ### v0.0.7 - 2013-09-25
5
12
 
6
13
  * fix network plugin
data/README.md CHANGED
@@ -26,9 +26,12 @@ Install it yourself as:
26
26
  # makes the zabbix-ruby-client [name] ready to run
27
27
  # then edit config.yml according to your needs
28
28
 
29
- zrc
29
+ bundle exec zrc
30
30
  # to list available commands
31
31
 
32
+ bundle exec zrc show
33
+ # to test the data collection
34
+
32
35
  And when ready just install a cron task according to your environment
33
36
 
34
37
  echo '* * * * * /bin/bash -lc "cd /path/to/zrc && bundle exec zrc upload"' | crontab
@@ -41,16 +44,19 @@ And when ready just install a cron task according to your environment
41
44
 
42
45
  There are a set of standart plugins included in the package, aimed at linux systems.
43
46
 
44
- * cpu (uses /proc/stat) [cpu_tpl](master/zabbix-templates/cpu_tpl.xml)
45
- * memory (requires iostat, apt-get install sysstat) [memory_tpl](master/zabbix-templates/memory_tpl.xml)
46
- * disk (requires iostat, apt-get install sysstat) [disk_tpl](master/zabbix-templates/disk_tpl.xml)
47
- * network (uses /proc/net/dev) [network_tpl](master/zabbix-templates/network_tpl.xml)
47
+ * linux system stats ([system_tpl](master/zabbix-templates/system_tpl.xml) includes the floowing)
48
+ * load (uses /proc/loadavg) [load_tpl](master/zabbix-templates/load_tpl.xml)
49
+ * cpu (uses /proc/stat) [cpu_tpl](master/zabbix-templates/cpu_tpl.xml)
50
+ * memory (requires iostat, apt-get install sysstat) [memory_tpl](master/zabbix-templates/memory_tpl.xml)
51
+ * disk (uses /proc/diskstats) [disk_tpl](master/zabbix-templates/disk_tpl.xml)
52
+ * network (uses /proc/net/dev) [network_tpl](master/zabbix-templates/network_tpl.xml)
48
53
  * apache (depends on mod_status with status_extended on) [apache_tpl](master/zabbix-templates/apache_tpl.xml)
49
54
 
50
55
  You can add extra plugin directories in the configuration file.
51
56
 
52
57
  ## Todo
53
58
 
59
+ * read /proc rather than rely on installed tools
54
60
  * write tests
55
61
  * add more plugins
56
62
  * memcache
@@ -1,4 +1,6 @@
1
- # for more info check http://www.linuxhowtos.org/System/procstat.htm
1
+ # for more info check
2
+ # http://www.linuxhowtos.org/System/procstat.htm
3
+ # http://juliano.info/en/Blog:Memory_Leak/Understanding_the_Linux_load_average
2
4
 
3
5
  class ZabbixRubyClient
4
6
  module Plugins
@@ -15,7 +17,7 @@ class ZabbixRubyClient
15
17
  logger.warn "Oh you don't have a /proc ?"
16
18
  return []
17
19
  end
18
- used = user + nice + sys + wait + irq + soft + steal + guest
20
+ used = user + nice + sys
19
21
  total = used + idle
20
22
 
21
23
  time = Time.now.to_i
@@ -1,3 +1,7 @@
1
+ # some doc on
2
+ # http://www.xaprb.com/blog/2010/01/09/how-linux-iostat-computes-its-results/
3
+ # http://www.mjmwired.net/kernel/Documentation/iostats.txt
4
+
1
5
  class ZabbixRubyClient
2
6
  module Plugins
3
7
  module Disk
@@ -6,9 +10,9 @@ class ZabbixRubyClient
6
10
  def collect(*args)
7
11
  host = args[0]
8
12
  dev = args[1]
9
- diskinfo = `iostat -dx #{dev} | grep "^#{dev}"`
13
+ diskinfo = `cat /proc/diskstats | grep " #{dev} "`
10
14
  if $?.to_i == 0
11
- _, rrqm, wrqm, r, w, rkb, wkb, avgrq, avgqu, await, rawait, wawait, svctm, util = diskinfo.split(/\s+/)
15
+ _, _, _, _, read_ok, read_merged, read_sector, read_time, write_ok, write_merged, write_sector, write_time, io_current, io_time, io_weighted = diskinfo.split(/\s+/)
12
16
  else
13
17
  logger.warn "Please install sysstat."
14
18
  return []
@@ -23,19 +27,16 @@ class ZabbixRubyClient
23
27
 
24
28
  time = Time.now.to_i
25
29
  back = []
26
- back << "#{host} disk.io[#{dev},read_req_per_sec] #{time} #{rrqm}"
27
- back << "#{host} disk.io[#{dev},write_req_per_sec] #{time} #{wrqm}"
28
- back << "#{host} disk.io[#{dev},read_per_sec] #{time} #{r}"
29
- back << "#{host} disk.io[#{dev},write_per_sec] #{time} #{w}"
30
- back << "#{host} disk.io[#{dev},read_sector_per_sec] #{time} #{rkb}"
31
- back << "#{host} disk.io[#{dev},write_sector_per_sec] #{time} #{wkb}"
32
- back << "#{host} disk.io[#{dev},avg_sector_size] #{time} #{avgrq}"
33
- back << "#{host} disk.io[#{dev},avg_queue_length] #{time} #{avgqu}"
34
- back << "#{host} disk.io[#{dev},time_waiting] #{time} #{await}"
35
- back << "#{host} disk.io[#{dev},time_waiting_read] #{time} #{rawait}"
36
- back << "#{host} disk.io[#{dev},time_waiting_write] #{time} #{wawait}"
37
- back << "#{host} disk.io[#{dev},service_time] #{time} #{svctm}"
38
- back << "#{host} disk.io[#{dev},percent_util] #{time} #{util}"
30
+ back << "#{host} disk.io[#{dev},read_ok] #{time} #{read_ok}"
31
+ back << "#{host} disk.io[#{dev},read_merged] #{time} #{read_merged}"
32
+ back << "#{host} disk.io[#{dev},read_sector] #{time} #{read_sector}"
33
+ back << "#{host} disk.io[#{dev},read_time] #{time} #{read_time}"
34
+ back << "#{host} disk.io[#{dev},write_ok] #{time} #{write_ok}"
35
+ back << "#{host} disk.io[#{dev},write_merged] #{time} #{write_merged}"
36
+ back << "#{host} disk.io[#{dev},write_sector] #{time} #{write_sector}"
37
+ back << "#{host} disk.io[#{dev},write_time] #{time} #{write_time}"
38
+ back << "#{host} disk.io[#{dev},io_time] #{time} #{io_time}"
39
+ back << "#{host} disk.io[#{dev},io_weighted] #{time} #{io_weighted}"
39
40
  back << "#{host} disk.space[#{dev},size] #{time} #{size.to_i * 1000}"
40
41
  back << "#{host} disk.space[#{dev},used] #{time} #{used.to_i * 1000}"
41
42
  back << "#{host} disk.space[#{dev},available] #{time} #{available.to_i * 1000}"
@@ -0,0 +1,36 @@
1
+ # for more info check
2
+ # http://juliano.info/en/Blog:Memory_Leak/Understanding_the_Linux_load_average
3
+
4
+ class ZabbixRubyClient
5
+ module Plugins
6
+ module Load
7
+ extend self
8
+
9
+ def collect(*args)
10
+ host = args[0]
11
+ #cpuinfo = `mpstat | grep " all "`
12
+ cpuinfo = `cat /proc/loadavg`
13
+ if $?.to_i == 0
14
+ one, five, fifteen, procs_t = cpuinfo.split(/\s+/)
15
+ else
16
+ logger.warn "Oh you don't have a /proc ?"
17
+ return []
18
+ end
19
+
20
+ procs, _ = procs_t.split(/\//)
21
+
22
+ time = Time.now.to_i
23
+ back = []
24
+ back << "#{host} load[one] #{time} #{one}"
25
+ back << "#{host} load[five] #{time} #{five}"
26
+ back << "#{host} load[fifteen] #{time} #{fifteen}"
27
+ back << "#{host} load[procs] #{time} #{procs}"
28
+ return back
29
+
30
+ end
31
+
32
+ end
33
+ end
34
+ end
35
+
36
+ ZabbixRubyClient::Plugins.register('load', ZabbixRubyClient::Plugins::Load)
@@ -1,3 +1,3 @@
1
1
  class ZabbixRubyClient
2
- VERSION ||= "0.0.7"
2
+ VERSION ||= "0.0.8"
3
3
  end
@@ -11,6 +11,7 @@ zabbix:
11
11
  port: 10051
12
12
  sender: /usr/bin/zabbix_sender
13
13
  plugins:
14
+ - name: load
14
15
  - name: memory
15
16
  - name: cpu
16
17
  - name: network
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <zabbix_export>
3
3
  <version>2.0</version>
4
- <date>2013-09-25T10:36:52Z</date>
4
+ <date>2013-09-27T22:29:30Z</date>
5
5
  <groups>
6
6
  <group>
7
7
  <name>Linux servers</name>
@@ -55,7 +55,7 @@
55
55
  <snmp_community/>
56
56
  <multiplier>0</multiplier>
57
57
  <snmp_oid/>
58
- <key>disk.io[{#DISK_DEVICE},avg_queue_length]</key>
58
+ <key>disk.io[{#DISK_DEVICE},io_weighted]</key>
59
59
  <delay>0</delay>
60
60
  <history>90</history>
61
61
  <trends>365</trends>
@@ -63,46 +63,7 @@
63
63
  <value_type>0</value_type>
64
64
  <allowed_hosts/>
65
65
  <units/>
66
- <delta>0</delta>
67
- <snmpv3_securityname/>
68
- <snmpv3_securitylevel>0</snmpv3_securitylevel>
69
- <snmpv3_authpassphrase/>
70
- <snmpv3_privpassphrase/>
71
- <formula>1</formula>
72
- <delay_flex/>
73
- <params/>
74
- <ipmi_sensor/>
75
- <data_type>0</data_type>
76
- <authtype>0</authtype>
77
- <username/>
78
- <password/>
79
- <publickey/>
80
- <privatekey/>
81
- <port/>
82
- <description/>
83
- <inventory_link>0</inventory_link>
84
- <applications>
85
- <application>
86
- <name>Disk</name>
87
- </application>
88
- </applications>
89
- <valuemap/>
90
- </item_prototype>
91
- <item_prototype>
92
- <name>$1 average sector size</name>
93
- <type>2</type>
94
- <snmp_community/>
95
- <multiplier>0</multiplier>
96
- <snmp_oid/>
97
- <key>disk.io[{#DISK_DEVICE},avg_sector_size]</key>
98
- <delay>0</delay>
99
- <history>90</history>
100
- <trends>365</trends>
101
- <status>0</status>
102
- <value_type>0</value_type>
103
- <allowed_hosts/>
104
- <units/>
105
- <delta>0</delta>
66
+ <delta>1</delta>
106
67
  <snmpv3_securityname/>
107
68
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
108
69
  <snmpv3_authpassphrase/>
@@ -131,9 +92,9 @@
131
92
  <name>$1 percent IO used</name>
132
93
  <type>2</type>
133
94
  <snmp_community/>
134
- <multiplier>0</multiplier>
95
+ <multiplier>1</multiplier>
135
96
  <snmp_oid/>
136
- <key>disk.io[{#DISK_DEVICE},percent_util]</key>
97
+ <key>disk.io[{#DISK_DEVICE},io_time]</key>
137
98
  <delay>0</delay>
138
99
  <history>90</history>
139
100
  <trends>365</trends>
@@ -141,12 +102,12 @@
141
102
  <value_type>0</value_type>
142
103
  <allowed_hosts/>
143
104
  <units>%</units>
144
- <delta>0</delta>
105
+ <delta>1</delta>
145
106
  <snmpv3_securityname/>
146
107
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
147
108
  <snmpv3_authpassphrase/>
148
109
  <snmpv3_privpassphrase/>
149
- <formula>1</formula>
110
+ <formula>0.001</formula>
150
111
  <delay_flex/>
151
112
  <params/>
152
113
  <ipmi_sensor/>
@@ -206,25 +167,25 @@
206
167
  <valuemap/>
207
168
  </item_prototype>
208
169
  <item_prototype>
209
- <name>$1 Read per second</name>
170
+ <name>$1 Read Bps</name>
210
171
  <type>2</type>
211
172
  <snmp_community/>
212
- <multiplier>0</multiplier>
173
+ <multiplier>1</multiplier>
213
174
  <snmp_oid/>
214
- <key>disk.io[{#DISK_DEVICE},read_per_sec]</key>
175
+ <key>disk.io[{#DISK_DEVICE},read_sector]</key>
215
176
  <delay>0</delay>
216
177
  <history>90</history>
217
178
  <trends>365</trends>
218
179
  <status>0</status>
219
180
  <value_type>0</value_type>
220
181
  <allowed_hosts/>
221
- <units/>
222
- <delta>0</delta>
182
+ <units>Bps</units>
183
+ <delta>1</delta>
223
184
  <snmpv3_securityname/>
224
185
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
225
186
  <snmpv3_authpassphrase/>
226
187
  <snmpv3_privpassphrase/>
227
- <formula>1</formula>
188
+ <formula>512</formula>
228
189
  <delay_flex/>
229
190
  <params/>
230
191
  <ipmi_sensor/>
@@ -245,20 +206,20 @@
245
206
  <valuemap/>
246
207
  </item_prototype>
247
208
  <item_prototype>
248
- <name>$1 Read Request per second</name>
209
+ <name>$1 Read merged</name>
249
210
  <type>2</type>
250
211
  <snmp_community/>
251
212
  <multiplier>0</multiplier>
252
213
  <snmp_oid/>
253
- <key>disk.io[{#DISK_DEVICE},read_req_per_sec]</key>
214
+ <key>disk.io[{#DISK_DEVICE},read_merged]</key>
254
215
  <delay>0</delay>
255
216
  <history>90</history>
256
217
  <trends>365</trends>
257
218
  <status>0</status>
258
219
  <value_type>0</value_type>
259
220
  <allowed_hosts/>
260
- <units>B/s</units>
261
- <delta>0</delta>
221
+ <units/>
222
+ <delta>1</delta>
262
223
  <snmpv3_securityname/>
263
224
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
264
225
  <snmpv3_authpassphrase/>
@@ -284,12 +245,12 @@
284
245
  <valuemap/>
285
246
  </item_prototype>
286
247
  <item_prototype>
287
- <name>$1 Read Sector per second</name>
248
+ <name>$1 Read per second</name>
288
249
  <type>2</type>
289
250
  <snmp_community/>
290
251
  <multiplier>0</multiplier>
291
252
  <snmp_oid/>
292
- <key>disk.io[{#DISK_DEVICE},read_sector_per_sec]</key>
253
+ <key>disk.io[{#DISK_DEVICE},read_ok]</key>
293
254
  <delay>0</delay>
294
255
  <history>90</history>
295
256
  <trends>365</trends>
@@ -297,7 +258,7 @@
297
258
  <value_type>0</value_type>
298
259
  <allowed_hosts/>
299
260
  <units/>
300
- <delta>0</delta>
261
+ <delta>1</delta>
301
262
  <snmpv3_securityname/>
302
263
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
303
264
  <snmpv3_authpassphrase/>
@@ -323,25 +284,25 @@
323
284
  <valuemap/>
324
285
  </item_prototype>
325
286
  <item_prototype>
326
- <name>$1 service time</name>
287
+ <name>$1 Read time</name>
327
288
  <type>2</type>
328
289
  <snmp_community/>
329
- <multiplier>0</multiplier>
290
+ <multiplier>1</multiplier>
330
291
  <snmp_oid/>
331
- <key>disk.io[{#DISK_DEVICE},service_time]</key>
292
+ <key>disk.io[{#DISK_DEVICE},read_time]</key>
332
293
  <delay>0</delay>
333
294
  <history>90</history>
334
295
  <trends>365</trends>
335
296
  <status>0</status>
336
297
  <value_type>0</value_type>
337
298
  <allowed_hosts/>
338
- <units/>
339
- <delta>0</delta>
299
+ <units>%</units>
300
+ <delta>1</delta>
340
301
  <snmpv3_securityname/>
341
302
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
342
303
  <snmpv3_authpassphrase/>
343
304
  <snmpv3_privpassphrase/>
344
- <formula>1</formula>
305
+ <formula>0.001</formula>
345
306
  <delay_flex/>
346
307
  <params/>
347
308
  <ipmi_sensor/>
@@ -479,25 +440,25 @@
479
440
  <valuemap/>
480
441
  </item_prototype>
481
442
  <item_prototype>
482
- <name>$1 time waiting</name>
443
+ <name>$1 Write Bps</name>
483
444
  <type>2</type>
484
445
  <snmp_community/>
485
- <multiplier>0</multiplier>
446
+ <multiplier>1</multiplier>
486
447
  <snmp_oid/>
487
- <key>disk.io[{#DISK_DEVICE},time_waiting]</key>
448
+ <key>disk.io[{#DISK_DEVICE},write_sector]</key>
488
449
  <delay>0</delay>
489
450
  <history>90</history>
490
451
  <trends>365</trends>
491
452
  <status>0</status>
492
453
  <value_type>0</value_type>
493
454
  <allowed_hosts/>
494
- <units/>
495
- <delta>0</delta>
455
+ <units>Bps</units>
456
+ <delta>1</delta>
496
457
  <snmpv3_securityname/>
497
458
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
498
459
  <snmpv3_authpassphrase/>
499
460
  <snmpv3_privpassphrase/>
500
- <formula>1</formula>
461
+ <formula>512</formula>
501
462
  <delay_flex/>
502
463
  <params/>
503
464
  <ipmi_sensor/>
@@ -518,12 +479,12 @@
518
479
  <valuemap/>
519
480
  </item_prototype>
520
481
  <item_prototype>
521
- <name>$1 time waiting read</name>
482
+ <name>$1 Write merged</name>
522
483
  <type>2</type>
523
484
  <snmp_community/>
524
485
  <multiplier>0</multiplier>
525
486
  <snmp_oid/>
526
- <key>disk.io[{#DISK_DEVICE},time_waiting_read]</key>
487
+ <key>disk.io[{#DISK_DEVICE},write_merged]</key>
527
488
  <delay>0</delay>
528
489
  <history>90</history>
529
490
  <trends>365</trends>
@@ -531,46 +492,7 @@
531
492
  <value_type>0</value_type>
532
493
  <allowed_hosts/>
533
494
  <units/>
534
- <delta>0</delta>
535
- <snmpv3_securityname/>
536
- <snmpv3_securitylevel>0</snmpv3_securitylevel>
537
- <snmpv3_authpassphrase/>
538
- <snmpv3_privpassphrase/>
539
- <formula>1</formula>
540
- <delay_flex/>
541
- <params/>
542
- <ipmi_sensor/>
543
- <data_type>0</data_type>
544
- <authtype>0</authtype>
545
- <username/>
546
- <password/>
547
- <publickey/>
548
- <privatekey/>
549
- <port/>
550
- <description/>
551
- <inventory_link>0</inventory_link>
552
- <applications>
553
- <application>
554
- <name>Disk</name>
555
- </application>
556
- </applications>
557
- <valuemap/>
558
- </item_prototype>
559
- <item_prototype>
560
- <name>$1 time waiting write</name>
561
- <type>2</type>
562
- <snmp_community/>
563
- <multiplier>0</multiplier>
564
- <snmp_oid/>
565
- <key>disk.io[{#DISK_DEVICE},time_waiting_write]</key>
566
- <delay>0</delay>
567
- <history>90</history>
568
- <trends>365</trends>
569
- <status>0</status>
570
- <value_type>0</value_type>
571
- <allowed_hosts/>
572
- <units/>
573
- <delta>0</delta>
495
+ <delta>1</delta>
574
496
  <snmpv3_securityname/>
575
497
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
576
498
  <snmpv3_authpassphrase/>
@@ -601,54 +523,15 @@
601
523
  <snmp_community/>
602
524
  <multiplier>0</multiplier>
603
525
  <snmp_oid/>
604
- <key>disk.io[{#DISK_DEVICE},write_per_sec]</key>
605
- <delay>0</delay>
606
- <history>90</history>
607
- <trends>365</trends>
608
- <status>0</status>
609
- <value_type>0</value_type>
610
- <allowed_hosts/>
611
- <units>B/s</units>
612
- <delta>0</delta>
613
- <snmpv3_securityname/>
614
- <snmpv3_securitylevel>0</snmpv3_securitylevel>
615
- <snmpv3_authpassphrase/>
616
- <snmpv3_privpassphrase/>
617
- <formula>1</formula>
618
- <delay_flex/>
619
- <params/>
620
- <ipmi_sensor/>
621
- <data_type>0</data_type>
622
- <authtype>0</authtype>
623
- <username/>
624
- <password/>
625
- <publickey/>
626
- <privatekey/>
627
- <port/>
628
- <description/>
629
- <inventory_link>0</inventory_link>
630
- <applications>
631
- <application>
632
- <name>Disk</name>
633
- </application>
634
- </applications>
635
- <valuemap/>
636
- </item_prototype>
637
- <item_prototype>
638
- <name>$1 Write Request per second</name>
639
- <type>2</type>
640
- <snmp_community/>
641
- <multiplier>0</multiplier>
642
- <snmp_oid/>
643
- <key>disk.io[{#DISK_DEVICE},write_req_per_sec]</key>
526
+ <key>disk.io[{#DISK_DEVICE},write_ok]</key>
644
527
  <delay>0</delay>
645
528
  <history>90</history>
646
529
  <trends>365</trends>
647
530
  <status>0</status>
648
531
  <value_type>0</value_type>
649
532
  <allowed_hosts/>
650
- <units>B/s</units>
651
- <delta>0</delta>
533
+ <units/>
534
+ <delta>1</delta>
652
535
  <snmpv3_securityname/>
653
536
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
654
537
  <snmpv3_authpassphrase/>
@@ -674,25 +557,25 @@
674
557
  <valuemap/>
675
558
  </item_prototype>
676
559
  <item_prototype>
677
- <name>$1 Write Sector per second</name>
560
+ <name>$1 Write time</name>
678
561
  <type>2</type>
679
562
  <snmp_community/>
680
- <multiplier>0</multiplier>
563
+ <multiplier>1</multiplier>
681
564
  <snmp_oid/>
682
- <key>disk.io[{#DISK_DEVICE},write_sector_per_sec]</key>
565
+ <key>disk.io[{#DISK_DEVICE},write_time]</key>
683
566
  <delay>0</delay>
684
567
  <history>90</history>
685
568
  <trends>365</trends>
686
569
  <status>0</status>
687
570
  <value_type>0</value_type>
688
571
  <allowed_hosts/>
689
- <units/>
690
- <delta>0</delta>
572
+ <units>%</units>
573
+ <delta>1</delta>
691
574
  <snmpv3_securityname/>
692
575
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
693
576
  <snmpv3_authpassphrase/>
694
577
  <snmpv3_privpassphrase/>
695
- <formula>1</formula>
578
+ <formula>0.001</formula>
696
579
  <delay_flex/>
697
580
  <params/>
698
581
  <ipmi_sensor/>
@@ -716,7 +599,7 @@
716
599
  <trigger_prototypes/>
717
600
  <graph_prototypes>
718
601
  <graph_prototype>
719
- <name>Disk IO used ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
602
+ <name>Disk IO operations ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
720
603
  <width>900</width>
721
604
  <height>200</height>
722
605
  <yaxismin>0.0000</yaxismin>
@@ -736,28 +619,40 @@
736
619
  <graph_item>
737
620
  <sortorder>0</sortorder>
738
621
  <drawtype>0</drawtype>
739
- <color>C86600</color>
622
+ <color>6666FF</color>
623
+ <yaxisside>0</yaxisside>
624
+ <calc_fnc>2</calc_fnc>
625
+ <type>0</type>
626
+ <item>
627
+ <host>Disk Stats</host>
628
+ <key>disk.io[{#DISK_DEVICE},read_ok]</key>
629
+ </item>
630
+ </graph_item>
631
+ <graph_item>
632
+ <sortorder>1</sortorder>
633
+ <drawtype>0</drawtype>
634
+ <color>00AA00</color>
740
635
  <yaxisside>0</yaxisside>
741
- <calc_fnc>7</calc_fnc>
636
+ <calc_fnc>2</calc_fnc>
742
637
  <type>0</type>
743
638
  <item>
744
639
  <host>Disk Stats</host>
745
- <key>disk.io[{#DISK_DEVICE},percent_util]</key>
640
+ <key>disk.io[{#DISK_DEVICE},write_ok]</key>
746
641
  </item>
747
642
  </graph_item>
748
643
  </graph_items>
749
644
  </graph_prototype>
750
645
  <graph_prototype>
751
- <name>Disk pie ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
646
+ <name>Disk IO rate ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
752
647
  <width>900</width>
753
648
  <height>200</height>
754
649
  <yaxismin>0.0000</yaxismin>
755
- <yaxismax>0.0000</yaxismax>
756
- <show_work_period>0</show_work_period>
757
- <show_triggers>0</show_triggers>
758
- <type>2</type>
650
+ <yaxismax>100.0000</yaxismax>
651
+ <show_work_period>1</show_work_period>
652
+ <show_triggers>1</show_triggers>
653
+ <type>0</type>
759
654
  <show_legend>1</show_legend>
760
- <show_3d>1</show_3d>
655
+ <show_3d>0</show_3d>
761
656
  <percent_left>0.0000</percent_left>
762
657
  <percent_right>0.0000</percent_right>
763
658
  <ymin_type_1>0</ymin_type_1>
@@ -768,31 +663,31 @@
768
663
  <graph_item>
769
664
  <sortorder>0</sortorder>
770
665
  <drawtype>0</drawtype>
771
- <color>FF6666</color>
666
+ <color>C80000</color>
772
667
  <yaxisside>0</yaxisside>
773
668
  <calc_fnc>2</calc_fnc>
774
669
  <type>0</type>
775
670
  <item>
776
671
  <host>Disk Stats</host>
777
- <key>disk.space[{#DISK_DEVICE},used]</key>
672
+ <key>disk.io[{#DISK_DEVICE},read_sector]</key>
778
673
  </item>
779
674
  </graph_item>
780
675
  <graph_item>
781
676
  <sortorder>1</sortorder>
782
677
  <drawtype>0</drawtype>
783
- <color>0000C8</color>
678
+ <color>00C800</color>
784
679
  <yaxisside>0</yaxisside>
785
680
  <calc_fnc>2</calc_fnc>
786
681
  <type>0</type>
787
682
  <item>
788
683
  <host>Disk Stats</host>
789
- <key>disk.space[{#DISK_DEVICE},available]</key>
684
+ <key>disk.io[{#DISK_DEVICE},write_sector]</key>
790
685
  </item>
791
686
  </graph_item>
792
687
  </graph_items>
793
688
  </graph_prototype>
794
689
  <graph_prototype>
795
- <name>Disk R/W ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
690
+ <name>Disk IO time ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
796
691
  <width>900</width>
797
692
  <height>200</height>
798
693
  <yaxismin>0.0000</yaxismin>
@@ -812,25 +707,81 @@
812
707
  <graph_item>
813
708
  <sortorder>0</sortorder>
814
709
  <drawtype>0</drawtype>
710
+ <color>C80000</color>
711
+ <yaxisside>0</yaxisside>
712
+ <calc_fnc>2</calc_fnc>
713
+ <type>0</type>
714
+ <item>
715
+ <host>Disk Stats</host>
716
+ <key>disk.io[{#DISK_DEVICE},io_time]</key>
717
+ </item>
718
+ </graph_item>
719
+ <graph_item>
720
+ <sortorder>1</sortorder>
721
+ <drawtype>0</drawtype>
815
722
  <color>6666FF</color>
816
723
  <yaxisside>0</yaxisside>
817
724
  <calc_fnc>2</calc_fnc>
818
725
  <type>0</type>
819
726
  <item>
820
727
  <host>Disk Stats</host>
821
- <key>disk.io[{#DISK_DEVICE},read_per_sec]</key>
728
+ <key>disk.io[{#DISK_DEVICE},read_time]</key>
729
+ </item>
730
+ </graph_item>
731
+ <graph_item>
732
+ <sortorder>2</sortorder>
733
+ <drawtype>0</drawtype>
734
+ <color>00CC00</color>
735
+ <yaxisside>0</yaxisside>
736
+ <calc_fnc>2</calc_fnc>
737
+ <type>0</type>
738
+ <item>
739
+ <host>Disk Stats</host>
740
+ <key>disk.io[{#DISK_DEVICE},write_time]</key>
741
+ </item>
742
+ </graph_item>
743
+ </graph_items>
744
+ </graph_prototype>
745
+ <graph_prototype>
746
+ <name>Disk pie ({#DISK_MOUNT} : {#DISK_DEVICE})</name>
747
+ <width>900</width>
748
+ <height>200</height>
749
+ <yaxismin>0.0000</yaxismin>
750
+ <yaxismax>0.0000</yaxismax>
751
+ <show_work_period>0</show_work_period>
752
+ <show_triggers>0</show_triggers>
753
+ <type>2</type>
754
+ <show_legend>1</show_legend>
755
+ <show_3d>1</show_3d>
756
+ <percent_left>0.0000</percent_left>
757
+ <percent_right>0.0000</percent_right>
758
+ <ymin_type_1>0</ymin_type_1>
759
+ <ymax_type_1>0</ymax_type_1>
760
+ <ymin_item_1>0</ymin_item_1>
761
+ <ymax_item_1>0</ymax_item_1>
762
+ <graph_items>
763
+ <graph_item>
764
+ <sortorder>0</sortorder>
765
+ <drawtype>0</drawtype>
766
+ <color>FF6666</color>
767
+ <yaxisside>0</yaxisside>
768
+ <calc_fnc>2</calc_fnc>
769
+ <type>0</type>
770
+ <item>
771
+ <host>Disk Stats</host>
772
+ <key>disk.space[{#DISK_DEVICE},used]</key>
822
773
  </item>
823
774
  </graph_item>
824
775
  <graph_item>
825
776
  <sortorder>1</sortorder>
826
777
  <drawtype>0</drawtype>
827
- <color>EE0000</color>
778
+ <color>0000C8</color>
828
779
  <yaxisside>0</yaxisside>
829
780
  <calc_fnc>2</calc_fnc>
830
781
  <type>0</type>
831
782
  <item>
832
783
  <host>Disk Stats</host>
833
- <key>disk.io[{#DISK_DEVICE},write_per_sec]</key>
784
+ <key>disk.space[{#DISK_DEVICE},available]</key>
834
785
  </item>
835
786
  </graph_item>
836
787
  </graph_items>
@@ -0,0 +1,258 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <zabbix_export>
3
+ <version>2.0</version>
4
+ <date>2013-09-27T21:29:48Z</date>
5
+ <groups>
6
+ <group>
7
+ <name>Linux servers</name>
8
+ </group>
9
+ </groups>
10
+ <templates>
11
+ <template>
12
+ <template>Load</template>
13
+ <name>Load (zrc)</name>
14
+ <groups>
15
+ <group>
16
+ <name>Linux servers</name>
17
+ </group>
18
+ </groups>
19
+ <applications>
20
+ <application>
21
+ <name>Load</name>
22
+ </application>
23
+ </applications>
24
+ <items>
25
+ <item>
26
+ <name>1 min</name>
27
+ <type>2</type>
28
+ <snmp_community/>
29
+ <multiplier>0</multiplier>
30
+ <snmp_oid/>
31
+ <key>load[one]</key>
32
+ <delay>0</delay>
33
+ <history>90</history>
34
+ <trends>365</trends>
35
+ <status>0</status>
36
+ <value_type>0</value_type>
37
+ <allowed_hosts/>
38
+ <units/>
39
+ <delta>0</delta>
40
+ <snmpv3_securityname/>
41
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
42
+ <snmpv3_authpassphrase/>
43
+ <snmpv3_privpassphrase/>
44
+ <formula>1</formula>
45
+ <delay_flex/>
46
+ <params/>
47
+ <ipmi_sensor/>
48
+ <data_type>0</data_type>
49
+ <authtype>0</authtype>
50
+ <username/>
51
+ <password/>
52
+ <publickey/>
53
+ <privatekey/>
54
+ <port/>
55
+ <description/>
56
+ <inventory_link>0</inventory_link>
57
+ <applications>
58
+ <application>
59
+ <name>Load</name>
60
+ </application>
61
+ </applications>
62
+ <valuemap/>
63
+ </item>
64
+ <item>
65
+ <name>5 min</name>
66
+ <type>2</type>
67
+ <snmp_community/>
68
+ <multiplier>0</multiplier>
69
+ <snmp_oid/>
70
+ <key>load[five]</key>
71
+ <delay>0</delay>
72
+ <history>90</history>
73
+ <trends>365</trends>
74
+ <status>0</status>
75
+ <value_type>0</value_type>
76
+ <allowed_hosts/>
77
+ <units/>
78
+ <delta>0</delta>
79
+ <snmpv3_securityname/>
80
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
81
+ <snmpv3_authpassphrase/>
82
+ <snmpv3_privpassphrase/>
83
+ <formula>1</formula>
84
+ <delay_flex/>
85
+ <params/>
86
+ <ipmi_sensor/>
87
+ <data_type>0</data_type>
88
+ <authtype>0</authtype>
89
+ <username/>
90
+ <password/>
91
+ <publickey/>
92
+ <privatekey/>
93
+ <port/>
94
+ <description/>
95
+ <inventory_link>0</inventory_link>
96
+ <applications>
97
+ <application>
98
+ <name>Load</name>
99
+ </application>
100
+ </applications>
101
+ <valuemap/>
102
+ </item>
103
+ <item>
104
+ <name>15 min</name>
105
+ <type>2</type>
106
+ <snmp_community/>
107
+ <multiplier>0</multiplier>
108
+ <snmp_oid/>
109
+ <key>load[fifteen]</key>
110
+ <delay>0</delay>
111
+ <history>90</history>
112
+ <trends>365</trends>
113
+ <status>0</status>
114
+ <value_type>0</value_type>
115
+ <allowed_hosts/>
116
+ <units/>
117
+ <delta>0</delta>
118
+ <snmpv3_securityname/>
119
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
120
+ <snmpv3_authpassphrase/>
121
+ <snmpv3_privpassphrase/>
122
+ <formula>1</formula>
123
+ <delay_flex/>
124
+ <params/>
125
+ <ipmi_sensor/>
126
+ <data_type>0</data_type>
127
+ <authtype>0</authtype>
128
+ <username/>
129
+ <password/>
130
+ <publickey/>
131
+ <privatekey/>
132
+ <port/>
133
+ <description/>
134
+ <inventory_link>0</inventory_link>
135
+ <applications>
136
+ <application>
137
+ <name>Load</name>
138
+ </application>
139
+ </applications>
140
+ <valuemap/>
141
+ </item>
142
+ <item>
143
+ <name>Procs</name>
144
+ <type>2</type>
145
+ <snmp_community/>
146
+ <multiplier>0</multiplier>
147
+ <snmp_oid/>
148
+ <key>load[procs]</key>
149
+ <delay>0</delay>
150
+ <history>90</history>
151
+ <trends>365</trends>
152
+ <status>0</status>
153
+ <value_type>3</value_type>
154
+ <allowed_hosts/>
155
+ <units/>
156
+ <delta>0</delta>
157
+ <snmpv3_securityname/>
158
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
159
+ <snmpv3_authpassphrase/>
160
+ <snmpv3_privpassphrase/>
161
+ <formula>1</formula>
162
+ <delay_flex/>
163
+ <params/>
164
+ <ipmi_sensor/>
165
+ <data_type>0</data_type>
166
+ <authtype>0</authtype>
167
+ <username/>
168
+ <password/>
169
+ <publickey/>
170
+ <privatekey/>
171
+ <port/>
172
+ <description/>
173
+ <inventory_link>0</inventory_link>
174
+ <applications>
175
+ <application>
176
+ <name>Load</name>
177
+ </application>
178
+ </applications>
179
+ <valuemap/>
180
+ </item>
181
+ </items>
182
+ <discovery_rules/>
183
+ <macros/>
184
+ <templates/>
185
+ <screens/>
186
+ </template>
187
+ </templates>
188
+ <graphs>
189
+ <graph>
190
+ <name>Load</name>
191
+ <width>900</width>
192
+ <height>200</height>
193
+ <yaxismin>0.0000</yaxismin>
194
+ <yaxismax>100.0000</yaxismax>
195
+ <show_work_period>1</show_work_period>
196
+ <show_triggers>1</show_triggers>
197
+ <type>0</type>
198
+ <show_legend>1</show_legend>
199
+ <show_3d>0</show_3d>
200
+ <percent_left>0.0000</percent_left>
201
+ <percent_right>0.0000</percent_right>
202
+ <ymin_type_1>1</ymin_type_1>
203
+ <ymax_type_1>0</ymax_type_1>
204
+ <ymin_item_1>0</ymin_item_1>
205
+ <ymax_item_1>0</ymax_item_1>
206
+ <graph_items>
207
+ <graph_item>
208
+ <sortorder>0</sortorder>
209
+ <drawtype>0</drawtype>
210
+ <color>AA8800</color>
211
+ <yaxisside>0</yaxisside>
212
+ <calc_fnc>2</calc_fnc>
213
+ <type>0</type>
214
+ <item>
215
+ <host>Load</host>
216
+ <key>load[one]</key>
217
+ </item>
218
+ </graph_item>
219
+ <graph_item>
220
+ <sortorder>1</sortorder>
221
+ <drawtype>0</drawtype>
222
+ <color>997700</color>
223
+ <yaxisside>0</yaxisside>
224
+ <calc_fnc>2</calc_fnc>
225
+ <type>0</type>
226
+ <item>
227
+ <host>Load</host>
228
+ <key>load[five]</key>
229
+ </item>
230
+ </graph_item>
231
+ <graph_item>
232
+ <sortorder>2</sortorder>
233
+ <drawtype>0</drawtype>
234
+ <color>775500</color>
235
+ <yaxisside>0</yaxisside>
236
+ <calc_fnc>2</calc_fnc>
237
+ <type>0</type>
238
+ <item>
239
+ <host>Load</host>
240
+ <key>load[fifteen]</key>
241
+ </item>
242
+ </graph_item>
243
+ <graph_item>
244
+ <sortorder>3</sortorder>
245
+ <drawtype>0</drawtype>
246
+ <color>FF6600</color>
247
+ <yaxisside>0</yaxisside>
248
+ <calc_fnc>2</calc_fnc>
249
+ <type>0</type>
250
+ <item>
251
+ <host>Load</host>
252
+ <key>load[procs]</key>
253
+ </item>
254
+ </graph_item>
255
+ </graph_items>
256
+ </graph>
257
+ </graphs>
258
+ </zabbix_export>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <zabbix_export>
3
+ <version>2.0</version>
4
+ <date>2013-09-27T21:30:35Z</date>
5
+ <groups>
6
+ <group>
7
+ <name>Linux servers</name>
8
+ </group>
9
+ </groups>
10
+ <templates>
11
+ <template>
12
+ <template>Linux System</template>
13
+ <name>Linux System (zrc)</name>
14
+ <groups>
15
+ <group>
16
+ <name>Linux servers</name>
17
+ </group>
18
+ </groups>
19
+ <applications/>
20
+ <items/>
21
+ <discovery_rules/>
22
+ <macros/>
23
+ <templates>
24
+ <template>
25
+ <name>CPU zrc</name>
26
+ </template>
27
+ <template>
28
+ <name>Disk Stats</name>
29
+ </template>
30
+ <template>
31
+ <name>Load</name>
32
+ </template>
33
+ <template>
34
+ <name>Memory ZRC</name>
35
+ </template>
36
+ <template>
37
+ <name>Network</name>
38
+ </template>
39
+ </templates>
40
+ <screens/>
41
+ </template>
42
+ </templates>
43
+ </zabbix_export>
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - mose
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-25 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: thor
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,33 +41,29 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: A zabbix alternative to zabbix-agent using zabbix-sender.
@@ -97,6 +88,7 @@ files:
97
88
  - lib/zabbix-ruby-client/plugins/apache.rb
98
89
  - lib/zabbix-ruby-client/plugins/cpu.rb
99
90
  - lib/zabbix-ruby-client/plugins/disk.rb
91
+ - lib/zabbix-ruby-client/plugins/load.rb
100
92
  - lib/zabbix-ruby-client/plugins/memory.rb
101
93
  - lib/zabbix-ruby-client/plugins/network.rb
102
94
  - lib/zabbix-ruby-client/version.rb
@@ -122,38 +114,33 @@ files:
122
114
  - zabbix-templates/apache_tpl.xml
123
115
  - zabbix-templates/cpu_tpl.xml
124
116
  - zabbix-templates/disk_tpl.xml
117
+ - zabbix-templates/load_tpl.xml
125
118
  - zabbix-templates/memory_tpl.xml
126
119
  - zabbix-templates/network_tpl.xml
120
+ - zabbix-templates/system_tpl.xml
127
121
  homepage: https://github.com/eduvo/zabbix-ruby-client
128
122
  licenses:
129
123
  - MIT
124
+ metadata: {}
130
125
  post_install_message:
131
126
  rdoc_options: []
132
127
  require_paths:
133
128
  - lib
134
129
  required_ruby_version: !ruby/object:Gem::Requirement
135
- none: false
136
130
  requirements:
137
- - - ! '>='
131
+ - - '>='
138
132
  - !ruby/object:Gem::Version
139
133
  version: '0'
140
- segments:
141
- - 0
142
- hash: 3749295528258282577
143
134
  required_rubygems_version: !ruby/object:Gem::Requirement
144
- none: false
145
135
  requirements:
146
- - - ! '>='
136
+ - - '>='
147
137
  - !ruby/object:Gem::Version
148
138
  version: '0'
149
- segments:
150
- - 0
151
- hash: 3749295528258282577
152
139
  requirements: []
153
140
  rubyforge_project:
154
- rubygems_version: 1.8.23
141
+ rubygems_version: 2.0.3
155
142
  signing_key:
156
- specification_version: 3
143
+ specification_version: 4
157
144
  summary: This tool is intended to use zabbix sender to propagate monitoring data for
158
145
  Zabbix server.
159
146
  test_files: