zabbix-ruby-client 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Zabbbix Ruby Client Changelog
2
2
  -----------------------------
3
3
 
4
+ ### v0.0.14 - 2013-10-14
5
+
6
+ * better explanation about how to make custom plugins
7
+ * note on the readme about security and ssh tunnels
8
+ * added a redis plugin and template
9
+
4
10
  ### v0.0.13 - 2013-10-08
5
11
 
6
12
  * added an nginx plugin
data/README.md CHANGED
@@ -50,7 +50,7 @@ You can use -c to specify another config file, and -t to use another list of plu
50
50
  Here is an example setup using the files generated by the init:
51
51
 
52
52
  * * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload"
53
- 0 0/6 * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t hourly.yml"
53
+ 0 * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t hourly.yml"
54
54
  0 0 1 * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t monthly.yml"
55
55
 
56
56
  ## plugins
@@ -70,12 +70,108 @@ There are a set of standart plugins included in the package, aimed at linux syst
70
70
  * apache (depends on mod_status with status_extended on) [apache_tpl](master/zabbix-templates/apache_tpl.xml)
71
71
  * mysql (uses mysqladmin extended-status) [mysql_tpl](master/zabbix-templates/mysql_tpl.xml)
72
72
  * nginx (requires httpStubStatus nginx module) [nginx_tpl](master/zabbix-templates/nginx_tpl.xml)
73
+ * redis (uses redis-cli info) [redis_tpl](master/zabbix-templates/redis_tpl.xml) (unfinished)
74
+ * args [ "/path/to/redis-cli", "options to connect" ]
73
75
 
74
76
  You can add extra plugins in a plugins/ dir in the working dir, just by copying one of the existing plugins in the repo and change to your need. All plugins present in plugins/ will be loaded if present in the config file you use. That can be convenient to test by using the -t flag, for example `bundle exec zrc -t testplugin.yml` where testplugin.yml only contains the name and args for yoiur plugin.
75
77
 
78
+ ## Custom plugins how-to
79
+
80
+ With the default config there is a plugins/ dir specified where you can put your own custom plugins. Those plugins need at least one `collect(*args)` method and optionaly a `discover(*args)` if this plugins plays the discover role.
81
+
82
+ Here is a basic plugin skeleton you can reproduce:
83
+
84
+ ```ruby
85
+ class ZabbixRubyClient
86
+ module Plugins
87
+ module Myplugin
88
+ extend self
89
+
90
+ def collect(*args)
91
+ host = args[0]
92
+ # the rest of args are the params you pass in the args: in your yml config file
93
+ string = args[1]
94
+ int = args[2]
95
+
96
+ time = Time.now.to_i
97
+ back = []
98
+ back << "#{host} myplugin[item] #{time} #{string} #{int}"
99
+ return back
100
+ end
101
+
102
+ end
103
+ end
104
+ end
105
+
106
+ ZabbixRubyClient::Plugins.register('myplugin', ZabbixRubyClient::Plugins::Myplugin)
107
+ ```
108
+
109
+ You can test custom plugins by creating a new `myplugin.yml` file with:
110
+
111
+ ```yaml
112
+ ---
113
+ - name: myplugin
114
+ args: [ "something", 42 ]
115
+ ```
116
+
117
+ and then use the `show` command to try it out and see what will be sent to the server, and use `upload` for testing the template you made for it on the zabbix configuration panel:
118
+
119
+ ```
120
+ $ bundle exec zrc show -t myplugin.yml
121
+ myhost myplugin[item] 1381669455 something 42
122
+ ```
123
+
124
+ ## Note about security
125
+
126
+ As you may already know, Zabbix is not very concerned about securing exchanges between agent and server, or sender and server. A cautious sysadmin will then properly manage his setup using ssh tunneling.
127
+
128
+ After launching manual tunnels and ensuring their survival with monit I tried `autossh` which is much more reliable. It requires to have keys exchanged from server and client, in my case I prefer doing reverse tunnels from server, because I have some plan about doing a resend from client in case server didn't open the tunnel (in case of server reboot or network failure). That resend trick is not implemented yet though.
129
+
130
+ I first created on both sides an autossh user with no console and no password:
131
+
132
+ ```
133
+ sudo useradd -m -r -s /bin/false -d /usr/local/zabtunnel zabtunnel
134
+ ```
135
+
136
+ On the zabbix server I created a key that I transfered to the clients in `/usr/local/zabtunnel/,ssh/authorized_keys`
137
+
138
+ ```
139
+ sudo su -s /bin/bash - zabtunnel
140
+ ssh-keygen
141
+ ```
142
+
143
+ Then I copy `id_rsa.pub` over to `/usr/local/zabtunnel/.ssh/authorized_keys` on each client.
144
+
145
+ Check [autossh doc](http://www.harding.motd.ca/autossh/README), note that ubuntu has a package for it. Here is what my `/usr/local/bin/autossh.sh` looks like:
146
+
147
+ ```bash
148
+ #!/bin/sh
149
+
150
+ HOSTLIST="host1 host2 host3 etc"
151
+
152
+ for i in $HOSTLIST; do
153
+ sudo -u zabtunnel \
154
+ AUTOSSH_LOGLEVEL=6 \
155
+ AUTOSSH_LOGFILE=/usr/local/zabtunnel/$i.log \
156
+ AUTOSSH_PIDFILE=/usr/local/zabtunnel/$i.pid \
157
+ /usr/bin/autossh -2 -M 0 -f -qN \
158
+ -o 'ServerAliveInterval 60' \
159
+ -o 'ServerAliveCountMax 3' \
160
+ -R 10051:localhost:10051 $i
161
+ done
162
+
163
+ exit 0
164
+ ```
165
+
166
+ Then you can change zabbix-server config and add a localhost ListenIP (by default it listens to all interfaces)
167
+
168
+ ```
169
+ ListenIP 127.0.0.1
170
+ ```
171
+
76
172
  ## Todo
77
173
 
78
- * read /proc rather than rely on installed tools
174
+ * read /proc rather than rely on installed tools (done)
79
175
  * write tests
80
176
  * add more plugins
81
177
  * memcache
@@ -83,7 +179,7 @@ You can add extra plugins in a plugins/ dir in the working dir, just by copying
83
179
  * mysql master/slave
84
180
  * monit
85
181
  * passenger
86
- * nginx
182
+ * nginx (done)
87
183
  * logged users
88
184
  * denyhosts
89
185
  * postfix
@@ -91,7 +187,8 @@ You can add extra plugins in a plugins/ dir in the working dir, just by copying
91
187
  * airbrake
92
188
  * disk occupation (done)
93
189
  * try to work out a way to create host/graphs/alerts from the client using Zabbix API
94
- * verify compatibility with ruby 1.9
190
+ * verify compatibility with ruby 1.9 (done)
191
+ * create a resend system that will store timed data on client if connection to server fails, and will send pending (missed) data on next batch.
95
192
 
96
193
 
97
194
  ## Contributing
@@ -0,0 +1,51 @@
1
+ # this is a simple version for standalone redis server
2
+
3
+ class ZabbixRubyClient
4
+ module Plugins
5
+ module Redis
6
+ extend self
7
+
8
+ def collect(*args)
9
+ host = args[0]
10
+ redis = args[1] || 'redis-cli'
11
+ opts = args[2] || ""
12
+ redisinfo = `#{redis} #{opts} info`
13
+ if $?.to_i == 0
14
+ info = get_info(redisinfo)
15
+ else
16
+ logger.warn "Redis connection failed."
17
+ return []
18
+ end
19
+
20
+ info[:keyspace_total] = info[:keyspace_hits].to_i + info[:keyspace_misses].to_i
21
+
22
+ time = Time.now.to_i
23
+ back = []
24
+ back << "#{host} redis[role] #{time} #{info[:role]}"
25
+ back << "#{host} redis[version] #{time} #{info[:redis_version]}"
26
+ back << "#{host} redis[used_memory] #{time} #{info[:used_memory]}"
27
+ back << "#{host} redis[connections] #{time} #{info[:total_connections_received]}"
28
+ back << "#{host} redis[commands] #{time} #{info[:total_commands_processed]}"
29
+ back << "#{host} redis[hits] #{time} #{info[:keyspace_hits]}"
30
+ back << "#{host} redis[misses] #{time} #{info[:keyspace_misses]}"
31
+ back << "#{host} redis[total] #{time} #{info[:keyspace_total]}"
32
+ back << "#{host} redis[changes_since_last_save] #{time} #{info[:rdb_changes_since_last_save]}"
33
+ return back
34
+ end
35
+
36
+ def get_info(meat)
37
+ ret = {}
38
+ meat.each_line do |line|
39
+ if line.size > 0 && line[0] != '#'
40
+ key, value = line.split(/\:/)
41
+ ret[key.to_sym] = value
42
+ end
43
+ end
44
+ ret
45
+ end
46
+
47
+ end
48
+ end
49
+ end
50
+
51
+ ZabbixRubyClient::Plugins.register('redis', ZabbixRubyClient::Plugins::Redis)
@@ -1,3 +1,3 @@
1
1
  class ZabbixRubyClient
2
- VERSION ||= "0.0.13"
2
+ VERSION ||= "0.0.14"
3
3
  end
@@ -0,0 +1,3 @@
1
+ ---
2
+ - name: redis
3
+ args: [ "/usr/local/bin/redis-cli", "-h 127.0.0.1 -p 6379" ]
@@ -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-10-04T10:13:53Z</date>
4
+ <date>2013-10-11T05:38:53Z</date>
5
5
  <groups>
6
6
  <group>
7
7
  <name>3. Service db</name>
@@ -47,7 +47,7 @@
47
47
  <status>0</status>
48
48
  <value_type>0</value_type>
49
49
  <allowed_hosts/>
50
- <units>qps</units>
50
+ <units>rps</units>
51
51
  <delta>1</delta>
52
52
  <snmpv3_securityname/>
53
53
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -164,7 +164,7 @@
164
164
  <status>0</status>
165
165
  <value_type>0</value_type>
166
166
  <allowed_hosts/>
167
- <units>qps</units>
167
+ <units>rps</units>
168
168
  <delta>1</delta>
169
169
  <snmpv3_securityname/>
170
170
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -203,7 +203,7 @@
203
203
  <status>0</status>
204
204
  <value_type>0</value_type>
205
205
  <allowed_hosts/>
206
- <units>qps</units>
206
+ <units>rps</units>
207
207
  <delta>1</delta>
208
208
  <snmpv3_securityname/>
209
209
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -242,7 +242,7 @@
242
242
  <status>0</status>
243
243
  <value_type>0</value_type>
244
244
  <allowed_hosts/>
245
- <units>qps</units>
245
+ <units>rps</units>
246
246
  <delta>1</delta>
247
247
  <snmpv3_securityname/>
248
248
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -320,7 +320,7 @@
320
320
  <status>0</status>
321
321
  <value_type>0</value_type>
322
322
  <allowed_hosts/>
323
- <units>qps</units>
323
+ <units>rps</units>
324
324
  <delta>1</delta>
325
325
  <snmpv3_securityname/>
326
326
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -359,7 +359,7 @@
359
359
  <status>0</status>
360
360
  <value_type>0</value_type>
361
361
  <allowed_hosts/>
362
- <units>qps</units>
362
+ <units>rps</units>
363
363
  <delta>1</delta>
364
364
  <snmpv3_securityname/>
365
365
  <snmpv3_securitylevel>0</snmpv3_securitylevel>
@@ -643,7 +643,7 @@
643
643
  <yaxismax>100.0000</yaxismax>
644
644
  <show_work_period>1</show_work_period>
645
645
  <show_triggers>1</show_triggers>
646
- <type>0</type>
646
+ <type>1</type>
647
647
  <show_legend>1</show_legend>
648
648
  <show_3d>0</show_3d>
649
649
  <percent_left>0.0000</percent_left>
@@ -656,7 +656,7 @@
656
656
  <graph_item>
657
657
  <sortorder>0</sortorder>
658
658
  <drawtype>0</drawtype>
659
- <color>C8C800</color>
659
+ <color>006400</color>
660
660
  <yaxisside>0</yaxisside>
661
661
  <calc_fnc>2</calc_fnc>
662
662
  <type>0</type>
@@ -668,7 +668,7 @@
668
668
  <graph_item>
669
669
  <sortorder>1</sortorder>
670
670
  <drawtype>0</drawtype>
671
- <color>006400</color>
671
+ <color>A0CE58</color>
672
672
  <yaxisside>0</yaxisside>
673
673
  <calc_fnc>2</calc_fnc>
674
674
  <type>0</type>
@@ -678,7 +678,7 @@
678
678
  </item>
679
679
  </graph_item>
680
680
  <graph_item>
681
- <sortorder>2</sortorder>
681
+ <sortorder>3</sortorder>
682
682
  <drawtype>0</drawtype>
683
683
  <color>C80000</color>
684
684
  <yaxisside>0</yaxisside>
@@ -690,9 +690,9 @@
690
690
  </item>
691
691
  </graph_item>
692
692
  <graph_item>
693
- <sortorder>3</sortorder>
693
+ <sortorder>4</sortorder>
694
694
  <drawtype>0</drawtype>
695
- <color>0000EE</color>
695
+ <color>99CCFF</color>
696
696
  <yaxisside>0</yaxisside>
697
697
  <calc_fnc>2</calc_fnc>
698
698
  <type>0</type>
@@ -702,7 +702,7 @@
702
702
  </item>
703
703
  </graph_item>
704
704
  <graph_item>
705
- <sortorder>4</sortorder>
705
+ <sortorder>2</sortorder>
706
706
  <drawtype>0</drawtype>
707
707
  <color>640000</color>
708
708
  <yaxisside>0</yaxisside>
@@ -714,9 +714,9 @@
714
714
  </item>
715
715
  </graph_item>
716
716
  <graph_item>
717
- <sortorder>5</sortorder>
717
+ <sortorder>6</sortorder>
718
718
  <drawtype>0</drawtype>
719
- <color>00C800</color>
719
+ <color>66DD66</color>
720
720
  <yaxisside>0</yaxisside>
721
721
  <calc_fnc>2</calc_fnc>
722
722
  <type>0</type>
@@ -726,9 +726,9 @@
726
726
  </item>
727
727
  </graph_item>
728
728
  <graph_item>
729
- <sortorder>6</sortorder>
729
+ <sortorder>5</sortorder>
730
730
  <drawtype>0</drawtype>
731
- <color>C800C8</color>
731
+ <color>6666CC</color>
732
732
  <yaxisside>0</yaxisside>
733
733
  <calc_fnc>2</calc_fnc>
734
734
  <type>0</type>
@@ -783,5 +783,109 @@
783
783
  </graph_item>
784
784
  </graph_items>
785
785
  </graph>
786
+ <graph>
787
+ <name>s. MySQL operations</name>
788
+ <width>900</width>
789
+ <height>200</height>
790
+ <yaxismin>0.0000</yaxismin>
791
+ <yaxismax>100.0000</yaxismax>
792
+ <show_work_period>1</show_work_period>
793
+ <show_triggers>0</show_triggers>
794
+ <type>1</type>
795
+ <show_legend>0</show_legend>
796
+ <show_3d>0</show_3d>
797
+ <percent_left>0.0000</percent_left>
798
+ <percent_right>0.0000</percent_right>
799
+ <ymin_type_1>0</ymin_type_1>
800
+ <ymax_type_1>0</ymax_type_1>
801
+ <ymin_item_1>0</ymin_item_1>
802
+ <ymax_item_1>0</ymax_item_1>
803
+ <graph_items>
804
+ <graph_item>
805
+ <sortorder>0</sortorder>
806
+ <drawtype>0</drawtype>
807
+ <color>006400</color>
808
+ <yaxisside>0</yaxisside>
809
+ <calc_fnc>2</calc_fnc>
810
+ <type>0</type>
811
+ <item>
812
+ <host>Mysql</host>
813
+ <key>mysql.status[Com_begin]</key>
814
+ </item>
815
+ </graph_item>
816
+ <graph_item>
817
+ <sortorder>1</sortorder>
818
+ <drawtype>0</drawtype>
819
+ <color>A0CE58</color>
820
+ <yaxisside>0</yaxisside>
821
+ <calc_fnc>2</calc_fnc>
822
+ <type>0</type>
823
+ <item>
824
+ <host>Mysql</host>
825
+ <key>mysql.status[Com_commit]</key>
826
+ </item>
827
+ </graph_item>
828
+ <graph_item>
829
+ <sortorder>3</sortorder>
830
+ <drawtype>0</drawtype>
831
+ <color>C80000</color>
832
+ <yaxisside>0</yaxisside>
833
+ <calc_fnc>2</calc_fnc>
834
+ <type>0</type>
835
+ <item>
836
+ <host>Mysql</host>
837
+ <key>mysql.status[Com_delete]</key>
838
+ </item>
839
+ </graph_item>
840
+ <graph_item>
841
+ <sortorder>4</sortorder>
842
+ <drawtype>0</drawtype>
843
+ <color>99CCFF</color>
844
+ <yaxisside>0</yaxisside>
845
+ <calc_fnc>2</calc_fnc>
846
+ <type>0</type>
847
+ <item>
848
+ <host>Mysql</host>
849
+ <key>mysql.status[Com_insert]</key>
850
+ </item>
851
+ </graph_item>
852
+ <graph_item>
853
+ <sortorder>2</sortorder>
854
+ <drawtype>0</drawtype>
855
+ <color>640000</color>
856
+ <yaxisside>0</yaxisside>
857
+ <calc_fnc>2</calc_fnc>
858
+ <type>0</type>
859
+ <item>
860
+ <host>Mysql</host>
861
+ <key>mysql.status[Com_rollback]</key>
862
+ </item>
863
+ </graph_item>
864
+ <graph_item>
865
+ <sortorder>6</sortorder>
866
+ <drawtype>0</drawtype>
867
+ <color>66DD66</color>
868
+ <yaxisside>0</yaxisside>
869
+ <calc_fnc>2</calc_fnc>
870
+ <type>0</type>
871
+ <item>
872
+ <host>Mysql</host>
873
+ <key>mysql.status[Com_select]</key>
874
+ </item>
875
+ </graph_item>
876
+ <graph_item>
877
+ <sortorder>5</sortorder>
878
+ <drawtype>0</drawtype>
879
+ <color>6666CC</color>
880
+ <yaxisside>0</yaxisside>
881
+ <calc_fnc>2</calc_fnc>
882
+ <type>0</type>
883
+ <item>
884
+ <host>Mysql</host>
885
+ <key>mysql.status[Com_update]</key>
886
+ </item>
887
+ </graph_item>
888
+ </graph_items>
889
+ </graph>
786
890
  </graphs>
787
891
  </zabbix_export>
@@ -0,0 +1,505 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <zabbix_export>
3
+ <version>2.0</version>
4
+ <date>2013-10-14T11:20:44Z</date>
5
+ <groups>
6
+ <group>
7
+ <name>3. Service Ubuntu</name>
8
+ </group>
9
+ </groups>
10
+ <templates>
11
+ <template>
12
+ <template>Redis</template>
13
+ <name>Redis (zrc)</name>
14
+ <groups>
15
+ <group>
16
+ <name>3. Service Ubuntu</name>
17
+ </group>
18
+ </groups>
19
+ <applications>
20
+ <application>
21
+ <name>Redis</name>
22
+ </application>
23
+ </applications>
24
+ <items>
25
+ <item>
26
+ <name>Changes since last save</name>
27
+ <type>2</type>
28
+ <snmp_community/>
29
+ <multiplier>0</multiplier>
30
+ <snmp_oid/>
31
+ <key>redis[changes_since_last_save]</key>
32
+ <delay>0</delay>
33
+ <history>90</history>
34
+ <trends>365</trends>
35
+ <status>0</status>
36
+ <value_type>3</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>Redis</name>
60
+ </application>
61
+ </applications>
62
+ <valuemap/>
63
+ </item>
64
+ <item>
65
+ <name>Commands per sec</name>
66
+ <type>2</type>
67
+ <snmp_community/>
68
+ <multiplier>0</multiplier>
69
+ <snmp_oid/>
70
+ <key>redis[commands]</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>2</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>Redis</name>
99
+ </application>
100
+ </applications>
101
+ <valuemap/>
102
+ </item>
103
+ <item>
104
+ <name>Connections per second</name>
105
+ <type>2</type>
106
+ <snmp_community/>
107
+ <multiplier>0</multiplier>
108
+ <snmp_oid/>
109
+ <key>redis[connections]</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>1</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>Redis</name>
138
+ </application>
139
+ </applications>
140
+ <valuemap/>
141
+ </item>
142
+ <item>
143
+ <name>Hits per second</name>
144
+ <type>2</type>
145
+ <snmp_community/>
146
+ <multiplier>0</multiplier>
147
+ <snmp_oid/>
148
+ <key>redis[hits]</key>
149
+ <delay>0</delay>
150
+ <history>90</history>
151
+ <trends>365</trends>
152
+ <status>0</status>
153
+ <value_type>0</value_type>
154
+ <allowed_hosts/>
155
+ <units/>
156
+ <delta>1</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>Redis</name>
177
+ </application>
178
+ </applications>
179
+ <valuemap/>
180
+ </item>
181
+ <item>
182
+ <name>Misses per second</name>
183
+ <type>2</type>
184
+ <snmp_community/>
185
+ <multiplier>0</multiplier>
186
+ <snmp_oid/>
187
+ <key>redis[misses]</key>
188
+ <delay>0</delay>
189
+ <history>90</history>
190
+ <trends>365</trends>
191
+ <status>0</status>
192
+ <value_type>0</value_type>
193
+ <allowed_hosts/>
194
+ <units/>
195
+ <delta>1</delta>
196
+ <snmpv3_securityname/>
197
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
198
+ <snmpv3_authpassphrase/>
199
+ <snmpv3_privpassphrase/>
200
+ <formula>1</formula>
201
+ <delay_flex/>
202
+ <params/>
203
+ <ipmi_sensor/>
204
+ <data_type>0</data_type>
205
+ <authtype>0</authtype>
206
+ <username/>
207
+ <password/>
208
+ <publickey/>
209
+ <privatekey/>
210
+ <port/>
211
+ <description/>
212
+ <inventory_link>0</inventory_link>
213
+ <applications>
214
+ <application>
215
+ <name>Redis</name>
216
+ </application>
217
+ </applications>
218
+ <valuemap/>
219
+ </item>
220
+ <item>
221
+ <name>Role</name>
222
+ <type>2</type>
223
+ <snmp_community/>
224
+ <multiplier>0</multiplier>
225
+ <snmp_oid/>
226
+ <key>redis[role]</key>
227
+ <delay>0</delay>
228
+ <history>90</history>
229
+ <trends>365</trends>
230
+ <status>0</status>
231
+ <value_type>4</value_type>
232
+ <allowed_hosts/>
233
+ <units/>
234
+ <delta>0</delta>
235
+ <snmpv3_securityname/>
236
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
237
+ <snmpv3_authpassphrase/>
238
+ <snmpv3_privpassphrase/>
239
+ <formula>1</formula>
240
+ <delay_flex/>
241
+ <params/>
242
+ <ipmi_sensor/>
243
+ <data_type>0</data_type>
244
+ <authtype>0</authtype>
245
+ <username/>
246
+ <password/>
247
+ <publickey/>
248
+ <privatekey/>
249
+ <port/>
250
+ <description/>
251
+ <inventory_link>0</inventory_link>
252
+ <applications>
253
+ <application>
254
+ <name>Redis</name>
255
+ </application>
256
+ </applications>
257
+ <valuemap/>
258
+ </item>
259
+ <item>
260
+ <name>Total per second</name>
261
+ <type>2</type>
262
+ <snmp_community/>
263
+ <multiplier>0</multiplier>
264
+ <snmp_oid/>
265
+ <key>redis[total]</key>
266
+ <delay>0</delay>
267
+ <history>90</history>
268
+ <trends>365</trends>
269
+ <status>0</status>
270
+ <value_type>0</value_type>
271
+ <allowed_hosts/>
272
+ <units/>
273
+ <delta>1</delta>
274
+ <snmpv3_securityname/>
275
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
276
+ <snmpv3_authpassphrase/>
277
+ <snmpv3_privpassphrase/>
278
+ <formula>1</formula>
279
+ <delay_flex/>
280
+ <params/>
281
+ <ipmi_sensor/>
282
+ <data_type>0</data_type>
283
+ <authtype>0</authtype>
284
+ <username/>
285
+ <password/>
286
+ <publickey/>
287
+ <privatekey/>
288
+ <port/>
289
+ <description/>
290
+ <inventory_link>0</inventory_link>
291
+ <applications>
292
+ <application>
293
+ <name>Redis</name>
294
+ </application>
295
+ </applications>
296
+ <valuemap/>
297
+ </item>
298
+ <item>
299
+ <name>Used Memory</name>
300
+ <type>2</type>
301
+ <snmp_community/>
302
+ <multiplier>0</multiplier>
303
+ <snmp_oid/>
304
+ <key>redis[used_memory]</key>
305
+ <delay>0</delay>
306
+ <history>90</history>
307
+ <trends>365</trends>
308
+ <status>0</status>
309
+ <value_type>3</value_type>
310
+ <allowed_hosts/>
311
+ <units>B</units>
312
+ <delta>0</delta>
313
+ <snmpv3_securityname/>
314
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
315
+ <snmpv3_authpassphrase/>
316
+ <snmpv3_privpassphrase/>
317
+ <formula>1</formula>
318
+ <delay_flex/>
319
+ <params/>
320
+ <ipmi_sensor/>
321
+ <data_type>0</data_type>
322
+ <authtype>0</authtype>
323
+ <username/>
324
+ <password/>
325
+ <publickey/>
326
+ <privatekey/>
327
+ <port/>
328
+ <description/>
329
+ <inventory_link>0</inventory_link>
330
+ <applications>
331
+ <application>
332
+ <name>Redis</name>
333
+ </application>
334
+ </applications>
335
+ <valuemap/>
336
+ </item>
337
+ <item>
338
+ <name>Version</name>
339
+ <type>2</type>
340
+ <snmp_community/>
341
+ <multiplier>0</multiplier>
342
+ <snmp_oid/>
343
+ <key>redis[version]</key>
344
+ <delay>0</delay>
345
+ <history>90</history>
346
+ <trends>365</trends>
347
+ <status>0</status>
348
+ <value_type>4</value_type>
349
+ <allowed_hosts/>
350
+ <units/>
351
+ <delta>0</delta>
352
+ <snmpv3_securityname/>
353
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
354
+ <snmpv3_authpassphrase/>
355
+ <snmpv3_privpassphrase/>
356
+ <formula>1</formula>
357
+ <delay_flex/>
358
+ <params/>
359
+ <ipmi_sensor/>
360
+ <data_type>0</data_type>
361
+ <authtype>0</authtype>
362
+ <username/>
363
+ <password/>
364
+ <publickey/>
365
+ <privatekey/>
366
+ <port/>
367
+ <description/>
368
+ <inventory_link>0</inventory_link>
369
+ <applications>
370
+ <application>
371
+ <name>Redis</name>
372
+ </application>
373
+ </applications>
374
+ <valuemap/>
375
+ </item>
376
+ </items>
377
+ <discovery_rules/>
378
+ <macros/>
379
+ <templates/>
380
+ <screens/>
381
+ </template>
382
+ </templates>
383
+ <graphs>
384
+ <graph>
385
+ <name>Redis Commands</name>
386
+ <width>900</width>
387
+ <height>200</height>
388
+ <yaxismin>0.0000</yaxismin>
389
+ <yaxismax>100.0000</yaxismax>
390
+ <show_work_period>1</show_work_period>
391
+ <show_triggers>1</show_triggers>
392
+ <type>0</type>
393
+ <show_legend>1</show_legend>
394
+ <show_3d>0</show_3d>
395
+ <percent_left>0.0000</percent_left>
396
+ <percent_right>0.0000</percent_right>
397
+ <ymin_type_1>0</ymin_type_1>
398
+ <ymax_type_1>0</ymax_type_1>
399
+ <ymin_item_1>0</ymin_item_1>
400
+ <ymax_item_1>0</ymax_item_1>
401
+ <graph_items>
402
+ <graph_item>
403
+ <sortorder>0</sortorder>
404
+ <drawtype>0</drawtype>
405
+ <color>C80000</color>
406
+ <yaxisside>0</yaxisside>
407
+ <calc_fnc>2</calc_fnc>
408
+ <type>0</type>
409
+ <item>
410
+ <host>Redis</host>
411
+ <key>redis[commands]</key>
412
+ </item>
413
+ </graph_item>
414
+ </graph_items>
415
+ </graph>
416
+ <graph>
417
+ <name>Redis Keyspace per second</name>
418
+ <width>900</width>
419
+ <height>200</height>
420
+ <yaxismin>0.0000</yaxismin>
421
+ <yaxismax>100.0000</yaxismax>
422
+ <show_work_period>1</show_work_period>
423
+ <show_triggers>1</show_triggers>
424
+ <type>0</type>
425
+ <show_legend>1</show_legend>
426
+ <show_3d>0</show_3d>
427
+ <percent_left>0.0000</percent_left>
428
+ <percent_right>0.0000</percent_right>
429
+ <ymin_type_1>0</ymin_type_1>
430
+ <ymax_type_1>0</ymax_type_1>
431
+ <ymin_item_1>0</ymin_item_1>
432
+ <ymax_item_1>0</ymax_item_1>
433
+ <graph_items>
434
+ <graph_item>
435
+ <sortorder>0</sortorder>
436
+ <drawtype>0</drawtype>
437
+ <color>9999FF</color>
438
+ <yaxisside>0</yaxisside>
439
+ <calc_fnc>7</calc_fnc>
440
+ <type>0</type>
441
+ <item>
442
+ <host>Redis</host>
443
+ <key>redis[hits]</key>
444
+ </item>
445
+ </graph_item>
446
+ <graph_item>
447
+ <sortorder>1</sortorder>
448
+ <drawtype>0</drawtype>
449
+ <color>FF6666</color>
450
+ <yaxisside>0</yaxisside>
451
+ <calc_fnc>7</calc_fnc>
452
+ <type>0</type>
453
+ <item>
454
+ <host>Redis</host>
455
+ <key>redis[misses]</key>
456
+ </item>
457
+ </graph_item>
458
+ <graph_item>
459
+ <sortorder>2</sortorder>
460
+ <drawtype>2</drawtype>
461
+ <color>00BB00</color>
462
+ <yaxisside>0</yaxisside>
463
+ <calc_fnc>7</calc_fnc>
464
+ <type>0</type>
465
+ <item>
466
+ <host>Redis</host>
467
+ <key>redis[total]</key>
468
+ </item>
469
+ </graph_item>
470
+ </graph_items>
471
+ </graph>
472
+ <graph>
473
+ <name>Redis Memory</name>
474
+ <width>900</width>
475
+ <height>200</height>
476
+ <yaxismin>0.0000</yaxismin>
477
+ <yaxismax>100.0000</yaxismax>
478
+ <show_work_period>1</show_work_period>
479
+ <show_triggers>1</show_triggers>
480
+ <type>0</type>
481
+ <show_legend>1</show_legend>
482
+ <show_3d>0</show_3d>
483
+ <percent_left>0.0000</percent_left>
484
+ <percent_right>0.0000</percent_right>
485
+ <ymin_type_1>1</ymin_type_1>
486
+ <ymax_type_1>0</ymax_type_1>
487
+ <ymin_item_1>0</ymin_item_1>
488
+ <ymax_item_1>0</ymax_item_1>
489
+ <graph_items>
490
+ <graph_item>
491
+ <sortorder>0</sortorder>
492
+ <drawtype>5</drawtype>
493
+ <color>C80000</color>
494
+ <yaxisside>0</yaxisside>
495
+ <calc_fnc>7</calc_fnc>
496
+ <type>0</type>
497
+ <item>
498
+ <host>Redis</host>
499
+ <key>redis[used_memory]</key>
500
+ </item>
501
+ </graph_item>
502
+ </graph_items>
503
+ </graph>
504
+ </graphs>
505
+ </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.13
4
+ version: 0.0.14
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-08 00:00:00.000000000 Z
12
+ date: 2013-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -103,6 +103,7 @@ files:
103
103
  - lib/zabbix-ruby-client/plugins/mysql.rb
104
104
  - lib/zabbix-ruby-client/plugins/network.rb
105
105
  - lib/zabbix-ruby-client/plugins/nginx.rb
106
+ - lib/zabbix-ruby-client/plugins/redis.rb
106
107
  - lib/zabbix-ruby-client/plugins/sysinfo.rb
107
108
  - lib/zabbix-ruby-client/plugins/who.rb
108
109
  - lib/zabbix-ruby-client/version.rb
@@ -128,6 +129,7 @@ files:
128
129
  - templates/client/minutely.yml
129
130
  - templates/client/monthly.yml
130
131
  - templates/client/mysql.yml
132
+ - templates/client/redis.yml
131
133
  - zabbix-ruby-client.gemspec
132
134
  - zabbix-templates/apache_tpl.xml
133
135
  - zabbix-templates/apt_tpl.xml
@@ -138,6 +140,7 @@ files:
138
140
  - zabbix-templates/mysql_tpl.xml
139
141
  - zabbix-templates/network_tpl.xml
140
142
  - zabbix-templates/nginx_tpl.xml
143
+ - zabbix-templates/redis_tpl.xml
141
144
  - zabbix-templates/sysinfo_tpl.xml
142
145
  - zabbix-templates/system_tpl.xml
143
146
  homepage: https://github.com/eduvo/zabbix-ruby-client
@@ -155,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
158
  version: '0'
156
159
  segments:
157
160
  - 0
158
- hash: 349719088865258310
161
+ hash: 2522849002021600929
159
162
  required_rubygems_version: !ruby/object:Gem::Requirement
160
163
  none: false
161
164
  requirements:
@@ -164,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
167
  version: '0'
165
168
  segments:
166
169
  - 0
167
- hash: 349719088865258310
170
+ hash: 2522849002021600929
168
171
  requirements: []
169
172
  rubyforge_project:
170
173
  rubygems_version: 1.8.23