zabbix-ruby-client 0.0.20 → 0.0.21

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.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -1
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +10 -1
  5. data/README.md +7 -2
  6. data/lib/zabbix-ruby-client/plugin_base.rb +28 -0
  7. data/lib/zabbix-ruby-client/plugins/ovpn.rb +55 -0
  8. data/lib/zabbix-ruby-client/plugins/postgres.rb +45 -0
  9. data/lib/zabbix-ruby-client/runner.rb +11 -1
  10. data/lib/zabbix-ruby-client/version.rb +1 -1
  11. data/spec/files/system/net_dev +1 -1
  12. data/spec/lib/cli_spec.rb +7 -7
  13. data/spec/lib/data_spec.rb +5 -5
  14. data/spec/lib/plugin_base_spec.rb +6 -6
  15. data/spec/lib/plugins/apache_spec.rb +1 -1
  16. data/spec/lib/plugins/apt_spec.rb +5 -5
  17. data/spec/lib/plugins/cpu_spec.rb +3 -3
  18. data/spec/lib/plugins/disk_spec.rb +40 -40
  19. data/spec/lib/plugins/load_spec.rb +5 -5
  20. data/spec/lib/plugins/memory_spec.rb +52 -52
  21. data/spec/lib/plugins/network_spec.rb +28 -29
  22. data/spec/lib/runner_spec.rb +21 -8
  23. data/zabbix-templates/apache_tpl.xml +115 -46
  24. data/zabbix-templates/apt_tpl.xml +13 -4
  25. data/zabbix-templates/cisco_tpl.xml +2089 -0
  26. data/zabbix-templates/cpu_tpl.xml +116 -53
  27. data/zabbix-templates/disk_tpl.xml +75 -29
  28. data/zabbix-templates/load_tpl.xml +21 -9
  29. data/zabbix-templates/memory_tpl.xml +52 -28
  30. data/zabbix-templates/mysql_tpl.xml +70 -28
  31. data/zabbix-templates/network_tpl.xml +40 -96
  32. data/zabbix-templates/nginx_tpl.xml +37 -16
  33. data/zabbix-templates/openvpn_tpl.xml +312 -0
  34. data/zabbix-templates/postgres_tpl.xml +891 -8
  35. data/zabbix-templates/redis_tpl.xml +46 -19
  36. data/zabbix-templates/sysinfo_tpl.xml +21 -3
  37. data/zabbix-templates/system_tpl.xml +339 -3
  38. metadata +26 -42
@@ -1,13 +1,285 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <zabbix_export>
3
3
  <version>2.0</version>
4
- <date>2013-10-02T08:36:05Z</date>
4
+ <date>2014-01-02T03:33:56Z</date>
5
5
  <groups>
6
6
  <group>
7
7
  <name>3. Service Ubuntu</name>
8
8
  </group>
9
9
  </groups>
10
10
  <templates>
11
+ <template>
12
+ <template>Sysinfo</template>
13
+ <name>Sysinfo (zrc)</name>
14
+ <groups>
15
+ <group>
16
+ <name>3. Service Ubuntu</name>
17
+ </group>
18
+ </groups>
19
+ <applications>
20
+ <application>
21
+ <name>Sysinfo</name>
22
+ </application>
23
+ </applications>
24
+ <items>
25
+ <item>
26
+ <name>Arch</name>
27
+ <type>2</type>
28
+ <snmp_community/>
29
+ <multiplier>0</multiplier>
30
+ <snmp_oid/>
31
+ <key>sysinfo[kernel]</key>
32
+ <delay>0</delay>
33
+ <history>365</history>
34
+ <trends>365</trends>
35
+ <status>0</status>
36
+ <value_type>4</value_type>
37
+ <allowed_hosts/>
38
+ <units/>
39
+ <delta>0</delta>
40
+ <snmpv3_contextname/>
41
+ <snmpv3_securityname/>
42
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
43
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
44
+ <snmpv3_authpassphrase/>
45
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
46
+ <snmpv3_privpassphrase/>
47
+ <formula>1</formula>
48
+ <delay_flex/>
49
+ <params/>
50
+ <ipmi_sensor/>
51
+ <data_type>0</data_type>
52
+ <authtype>0</authtype>
53
+ <username/>
54
+ <password/>
55
+ <publickey/>
56
+ <privatekey/>
57
+ <port/>
58
+ <description/>
59
+ <inventory_link>5</inventory_link>
60
+ <applications>
61
+ <application>
62
+ <name>Sysinfo</name>
63
+ </application>
64
+ </applications>
65
+ <valuemap/>
66
+ </item>
67
+ <item>
68
+ <name>Hostname</name>
69
+ <type>2</type>
70
+ <snmp_community/>
71
+ <multiplier>0</multiplier>
72
+ <snmp_oid/>
73
+ <key>sysinfo[hostname]</key>
74
+ <delay>0</delay>
75
+ <history>365</history>
76
+ <trends>365</trends>
77
+ <status>0</status>
78
+ <value_type>4</value_type>
79
+ <allowed_hosts/>
80
+ <units/>
81
+ <delta>0</delta>
82
+ <snmpv3_contextname/>
83
+ <snmpv3_securityname/>
84
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
85
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
86
+ <snmpv3_authpassphrase/>
87
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
88
+ <snmpv3_privpassphrase/>
89
+ <formula>1</formula>
90
+ <delay_flex/>
91
+ <params/>
92
+ <ipmi_sensor/>
93
+ <data_type>0</data_type>
94
+ <authtype>0</authtype>
95
+ <username/>
96
+ <password/>
97
+ <publickey/>
98
+ <privatekey/>
99
+ <port/>
100
+ <description/>
101
+ <inventory_link>4</inventory_link>
102
+ <applications>
103
+ <application>
104
+ <name>Sysinfo</name>
105
+ </application>
106
+ </applications>
107
+ <valuemap/>
108
+ </item>
109
+ <item>
110
+ <name>Kernel</name>
111
+ <type>2</type>
112
+ <snmp_community/>
113
+ <multiplier>0</multiplier>
114
+ <snmp_oid/>
115
+ <key>sysinfo[kernell]</key>
116
+ <delay>0</delay>
117
+ <history>365</history>
118
+ <trends>365</trends>
119
+ <status>0</status>
120
+ <value_type>4</value_type>
121
+ <allowed_hosts/>
122
+ <units/>
123
+ <delta>0</delta>
124
+ <snmpv3_contextname/>
125
+ <snmpv3_securityname/>
126
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
127
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
128
+ <snmpv3_authpassphrase/>
129
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
130
+ <snmpv3_privpassphrase/>
131
+ <formula>1</formula>
132
+ <delay_flex/>
133
+ <params/>
134
+ <ipmi_sensor/>
135
+ <data_type>0</data_type>
136
+ <authtype>0</authtype>
137
+ <username/>
138
+ <password/>
139
+ <publickey/>
140
+ <privatekey/>
141
+ <port/>
142
+ <description/>
143
+ <inventory_link>6</inventory_link>
144
+ <applications>
145
+ <application>
146
+ <name>Sysinfo</name>
147
+ </application>
148
+ </applications>
149
+ <valuemap/>
150
+ </item>
151
+ <item>
152
+ <name>Name</name>
153
+ <type>2</type>
154
+ <snmp_community/>
155
+ <multiplier>0</multiplier>
156
+ <snmp_oid/>
157
+ <key>sysinfo[name]</key>
158
+ <delay>0</delay>
159
+ <history>365</history>
160
+ <trends>365</trends>
161
+ <status>0</status>
162
+ <value_type>4</value_type>
163
+ <allowed_hosts/>
164
+ <units/>
165
+ <delta>0</delta>
166
+ <snmpv3_contextname/>
167
+ <snmpv3_securityname/>
168
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
169
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
170
+ <snmpv3_authpassphrase/>
171
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
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>3</inventory_link>
186
+ <applications>
187
+ <application>
188
+ <name>Sysinfo</name>
189
+ </application>
190
+ </applications>
191
+ <valuemap/>
192
+ </item>
193
+ <item>
194
+ <name>Platform</name>
195
+ <type>2</type>
196
+ <snmp_community/>
197
+ <multiplier>0</multiplier>
198
+ <snmp_oid/>
199
+ <key>sysinfo[platform]</key>
200
+ <delay>0</delay>
201
+ <history>365</history>
202
+ <trends>365</trends>
203
+ <status>0</status>
204
+ <value_type>4</value_type>
205
+ <allowed_hosts/>
206
+ <units/>
207
+ <delta>0</delta>
208
+ <snmpv3_contextname/>
209
+ <snmpv3_securityname/>
210
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
211
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
212
+ <snmpv3_authpassphrase/>
213
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
214
+ <snmpv3_privpassphrase/>
215
+ <formula>1</formula>
216
+ <delay_flex/>
217
+ <params/>
218
+ <ipmi_sensor/>
219
+ <data_type>0</data_type>
220
+ <authtype>0</authtype>
221
+ <username/>
222
+ <password/>
223
+ <publickey/>
224
+ <privatekey/>
225
+ <port/>
226
+ <description/>
227
+ <inventory_link>7</inventory_link>
228
+ <applications>
229
+ <application>
230
+ <name>Sysinfo</name>
231
+ </application>
232
+ </applications>
233
+ <valuemap/>
234
+ </item>
235
+ <item>
236
+ <name>Serial</name>
237
+ <type>2</type>
238
+ <snmp_community/>
239
+ <multiplier>0</multiplier>
240
+ <snmp_oid/>
241
+ <key>sysinfo[serial]</key>
242
+ <delay>0</delay>
243
+ <history>365</history>
244
+ <trends>365</trends>
245
+ <status>0</status>
246
+ <value_type>4</value_type>
247
+ <allowed_hosts/>
248
+ <units/>
249
+ <delta>0</delta>
250
+ <snmpv3_contextname/>
251
+ <snmpv3_securityname/>
252
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
253
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
254
+ <snmpv3_authpassphrase/>
255
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
256
+ <snmpv3_privpassphrase/>
257
+ <formula>1</formula>
258
+ <delay_flex/>
259
+ <params/>
260
+ <ipmi_sensor/>
261
+ <data_type>0</data_type>
262
+ <authtype>0</authtype>
263
+ <username/>
264
+ <password/>
265
+ <publickey/>
266
+ <privatekey/>
267
+ <port/>
268
+ <description/>
269
+ <inventory_link>8</inventory_link>
270
+ <applications>
271
+ <application>
272
+ <name>Sysinfo</name>
273
+ </application>
274
+ </applications>
275
+ <valuemap/>
276
+ </item>
277
+ </items>
278
+ <discovery_rules/>
279
+ <macros/>
280
+ <templates/>
281
+ <screens/>
282
+ </template>
11
283
  <template>
12
284
  <template>Ubuntu System</template>
13
285
  <name>Ubuntu System (zrc)</name>
@@ -17,7 +289,52 @@
17
289
  </group>
18
290
  </groups>
19
291
  <applications/>
20
- <items/>
292
+ <items>
293
+ <item>
294
+ <name>SSH Check</name>
295
+ <type>3</type>
296
+ <snmp_community/>
297
+ <multiplier>0</multiplier>
298
+ <snmp_oid/>
299
+ <key>net.tcp.service[ssh,,{$SSH_PORT}]</key>
300
+ <delay>60</delay>
301
+ <history>7</history>
302
+ <trends>365</trends>
303
+ <status>0</status>
304
+ <value_type>3</value_type>
305
+ <allowed_hosts/>
306
+ <units/>
307
+ <delta>0</delta>
308
+ <snmpv3_contextname/>
309
+ <snmpv3_securityname/>
310
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
311
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
312
+ <snmpv3_authpassphrase/>
313
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
314
+ <snmpv3_privpassphrase/>
315
+ <formula>1</formula>
316
+ <delay_flex/>
317
+ <params/>
318
+ <ipmi_sensor/>
319
+ <data_type>3</data_type>
320
+ <authtype>0</authtype>
321
+ <username/>
322
+ <password/>
323
+ <publickey/>
324
+ <privatekey/>
325
+ <port/>
326
+ <description/>
327
+ <inventory_link>0</inventory_link>
328
+ <applications>
329
+ <application>
330
+ <name>System</name>
331
+ </application>
332
+ </applications>
333
+ <valuemap>
334
+ <name>Service state</name>
335
+ </valuemap>
336
+ </item>
337
+ </items>
21
338
  <discovery_rules/>
22
339
  <macros/>
23
340
  <templates>
@@ -34,7 +351,7 @@
34
351
  <name>Load</name>
35
352
  </template>
36
353
  <template>
37
- <name>Memory ZRC</name>
354
+ <name>Memory zrc</name>
38
355
  </template>
39
356
  <template>
40
357
  <name>Network</name>
@@ -42,6 +359,9 @@
42
359
  <template>
43
360
  <name>Sysinfo</name>
44
361
  </template>
362
+ <template>
363
+ <name>Who</name>
364
+ </template>
45
365
  </templates>
46
366
  <screens>
47
367
  <screen>
@@ -68,6 +388,7 @@
68
388
  <name>Load</name>
69
389
  <host>Ubuntu System</host>
70
390
  </resource>
391
+ <application/>
71
392
  </screen_item>
72
393
  <screen_item>
73
394
  <resourcetype>0</resourcetype>
@@ -88,6 +409,7 @@
88
409
  <name>Memory use</name>
89
410
  <host>Ubuntu System</host>
90
411
  </resource>
412
+ <application/>
91
413
  </screen_item>
92
414
  <screen_item>
93
415
  <resourcetype>0</resourcetype>
@@ -108,6 +430,7 @@
108
430
  <name>CPU used</name>
109
431
  <host>Ubuntu System</host>
110
432
  </resource>
433
+ <application/>
111
434
  </screen_item>
112
435
  <screen_item>
113
436
  <resourcetype>0</resourcetype>
@@ -128,10 +451,23 @@
128
451
  <name>s. CPU Details</name>
129
452
  <host>Ubuntu System</host>
130
453
  </resource>
454
+ <application/>
131
455
  </screen_item>
132
456
  </screen_items>
133
457
  </screen>
134
458
  </screens>
135
459
  </template>
136
460
  </templates>
461
+ <triggers>
462
+ <trigger>
463
+ <expression>{Ubuntu System:net.tcp.service[ssh,,{$SSH_PORT}].max(180)}=0</expression>
464
+ <name>SSH Down</name>
465
+ <url/>
466
+ <status>0</status>
467
+ <priority>5</priority>
468
+ <description/>
469
+ <type>0</type>
470
+ <dependencies/>
471
+ </trigger>
472
+ </triggers>
137
473
  </zabbix_export>
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
5
- prerelease:
4
+ version: 0.0.21
6
5
  platform: ruby
7
6
  authors:
8
7
  - mose
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-25 00:00:00.000000000 Z
11
+ date: 2014-07-31 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
37
33
  version: '1.3'
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
45
40
  version: '1.3'
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
  - !ruby/object:Gem::Dependency
79
70
  name: webmock
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: coveralls
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: A zabbix alternative to zabbix-agent using zabbix-sender.
@@ -115,9 +102,10 @@ executables:
115
102
  extensions: []
116
103
  extra_rdoc_files: []
117
104
  files:
118
- - .coveralls.yml
119
- - .gitignore
120
- - .travis.yml
105
+ - ".coveralls.yml"
106
+ - ".gitignore"
107
+ - ".ruby-version"
108
+ - ".travis.yml"
121
109
  - CHANGELOG.md
122
110
  - Gemfile
123
111
  - LICENSE.txt
@@ -139,6 +127,7 @@ files:
139
127
  - lib/zabbix-ruby-client/plugins/mysql.rb
140
128
  - lib/zabbix-ruby-client/plugins/network.rb
141
129
  - lib/zabbix-ruby-client/plugins/nginx.rb
130
+ - lib/zabbix-ruby-client/plugins/ovpn.rb
142
131
  - lib/zabbix-ruby-client/plugins/postgres.rb
143
132
  - lib/zabbix-ruby-client/plugins/redis.rb
144
133
  - lib/zabbix-ruby-client/plugins/sysinfo.rb
@@ -192,6 +181,7 @@ files:
192
181
  - zabbix-ruby-client.gemspec
193
182
  - zabbix-templates/apache_tpl.xml
194
183
  - zabbix-templates/apt_tpl.xml
184
+ - zabbix-templates/cisco_tpl.xml
195
185
  - zabbix-templates/cpu_tpl.xml
196
186
  - zabbix-templates/disk_tpl.xml
197
187
  - zabbix-templates/load_tpl.xml
@@ -199,6 +189,7 @@ files:
199
189
  - zabbix-templates/mysql_tpl.xml
200
190
  - zabbix-templates/network_tpl.xml
201
191
  - zabbix-templates/nginx_tpl.xml
192
+ - zabbix-templates/openvpn_tpl.xml
202
193
  - zabbix-templates/postgres_tpl.xml
203
194
  - zabbix-templates/redis_tpl.xml
204
195
  - zabbix-templates/sysinfo_tpl.xml
@@ -206,33 +197,26 @@ files:
206
197
  homepage: https://github.com/eduvo/zabbix-ruby-client
207
198
  licenses:
208
199
  - MIT
200
+ metadata: {}
209
201
  post_install_message:
210
202
  rdoc_options: []
211
203
  require_paths:
212
204
  - lib
213
205
  required_ruby_version: !ruby/object:Gem::Requirement
214
- none: false
215
206
  requirements:
216
- - - ! '>='
207
+ - - ">="
217
208
  - !ruby/object:Gem::Version
218
209
  version: '0'
219
- segments:
220
- - 0
221
- hash: 2258474499150129505
222
210
  required_rubygems_version: !ruby/object:Gem::Requirement
223
- none: false
224
211
  requirements:
225
- - - ! '>='
212
+ - - ">="
226
213
  - !ruby/object:Gem::Version
227
214
  version: '0'
228
- segments:
229
- - 0
230
- hash: 2258474499150129505
231
215
  requirements: []
232
216
  rubyforge_project:
233
- rubygems_version: 1.8.23
217
+ rubygems_version: 2.2.2
234
218
  signing_key:
235
- specification_version: 3
219
+ specification_version: 4
236
220
  summary: This tool is intended to use zabbix sender to propagate monitoring data for
237
221
  Zabbix server.
238
222
  test_files: