zabbix_nudge 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.md +4 -1
- data/bin/zabbix_nudge +2 -2
- data/lib/zabbix_nudge/nudge_cli.rb +9 -3
- data/lib/zabbix_nudge/version.rb +1 -1
- data/lib/zabbix_nudge.rb +4 -1
- data/zabbix_nudge.gemspec +2 -2
- metadata +6 -8
- data/bin/zabbix_nudged +0 -11
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
zabbix_nudge
|
2
2
|
============
|
3
3
|
|
4
|
+
This project based on zabbix-pusher module https://github.com/iteh/zabbix_pusher.
|
5
|
+
Thanks Edmund Haselwanter for main idea and initial version source code.
|
6
|
+
|
4
7
|
Set of tools for grab metrics from different sources and push (nudge) this information to the zabbix or zabbix proxy server
|
data/bin/zabbix_nudge
CHANGED
@@ -4,11 +4,11 @@ require "rubygems"
|
|
4
4
|
require "ap"
|
5
5
|
|
6
6
|
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
7
|
-
|
8
7
|
require "zabbix_nudge"
|
9
8
|
require "zabbix_nudge/nudge_cli"
|
10
9
|
require "zabbix_nudge/jmx_cli"
|
11
10
|
|
11
|
+
|
12
12
|
cli = ZabbixNudge::NudgeCLI.new
|
13
13
|
cli.parse_options(ARGV)
|
14
14
|
cli.config
|
@@ -17,4 +17,4 @@ values = ZabbixNudge::Nudge.new(cli.config[:templates],cli.config.merge(:jmx =>
|
|
17
17
|
|
18
18
|
ap values if cli.config[:show_send_values]
|
19
19
|
|
20
|
-
|
20
|
+
puts Socket.gethostname if cli.config[:zabbix_agent_mode]
|
@@ -9,7 +9,7 @@ module ZabbixNudge
|
|
9
9
|
:short => "-c CONFIG",
|
10
10
|
:long => "--config CONFIG",
|
11
11
|
:default => '/etc/zabbix-nudge/config.rb',
|
12
|
-
:description => "The configuration file to use"
|
12
|
+
:description => "The configuration file to use. Default is /etc/zabbix-nudge/config.rb"
|
13
13
|
|
14
14
|
option :templates,
|
15
15
|
:short => "-t FILE",
|
@@ -19,7 +19,7 @@ module ZabbixNudge
|
|
19
19
|
:proc => Proc.new { |t| (t =~ /,/) ? t.split(',') : t }
|
20
20
|
|
21
21
|
option :zabbix_server_name,
|
22
|
-
:short => "-
|
22
|
+
:short => "-s SERVER",
|
23
23
|
:long => "--zabbix-server SERVER",
|
24
24
|
:default => 'localhost',
|
25
25
|
:description => "Hostname or IP address of Zabbix Server. Default is localhost"
|
@@ -31,7 +31,7 @@ module ZabbixNudge
|
|
31
31
|
:description => "Specify port number of server trapper running on the server. Default is 10051"
|
32
32
|
|
33
33
|
option :sender_hostname,
|
34
|
-
:short => "-
|
34
|
+
:short => "-h HOST",
|
35
35
|
:long => "--host HOSTNAME",
|
36
36
|
:default => Socket.gethostname,
|
37
37
|
:description => "Specify host name. Default is current hostname"
|
@@ -42,6 +42,12 @@ module ZabbixNudge
|
|
42
42
|
:description => "Set the log level (debug, info, warn, error, fatal)",
|
43
43
|
:proc => Proc.new { |l| l.to_sym }
|
44
44
|
|
45
|
+
option :zabbix_agent_mode,
|
46
|
+
:short => "-z",
|
47
|
+
:long => "--zabbix-agent-mode",
|
48
|
+
:description => "return execution state if running from Zabbix agent user parameters",
|
49
|
+
:boolean => false
|
50
|
+
|
45
51
|
option :show_send_values,
|
46
52
|
:short => "-v",
|
47
53
|
:long => "--show_send_values",
|
data/lib/zabbix_nudge/version.rb
CHANGED
data/lib/zabbix_nudge.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
-
require "zabbix_nudge/version"
|
2
1
|
require "active_support/core_ext/string/inflections.rb"
|
3
2
|
require 'nokogiri'
|
4
3
|
require 'yajl/json_gem'
|
5
4
|
require 'zabbix'
|
6
5
|
require "socket"
|
6
|
+
|
7
|
+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
7
8
|
require "zabbix_nudge/jmx"
|
9
|
+
require "zabbix_nudge/version"
|
10
|
+
|
8
11
|
|
9
12
|
module ZabbixNudge
|
10
13
|
|
data/zabbix_nudge.gemspec
CHANGED
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.license = 'GPL'
|
13
13
|
|
14
14
|
s.summary = %q{Collect metrics from different sources and push (nudge) data to Zabbix}
|
15
|
-
s.description = %q{
|
15
|
+
s.description = %q{zabbix_nudge is a gem to collect metrics from different sources, parse zabbix templates and push (nudge) the data to zabbix proxy or server}
|
16
16
|
|
17
|
-
s.rubyforge_project = "
|
17
|
+
s.rubyforge_project = "zabbix_nudge"
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbix_nudge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Myroslav Rys
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-09-
|
18
|
+
date: 2012-09-18 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: nokogiri
|
@@ -193,13 +193,12 @@ dependencies:
|
|
193
193
|
version: 1.3.0
|
194
194
|
type: :development
|
195
195
|
version_requirements: *id011
|
196
|
-
description:
|
196
|
+
description: zabbix_nudge is a gem to collect metrics from different sources, parse zabbix templates and push (nudge) the data to zabbix proxy or server
|
197
197
|
email:
|
198
198
|
- stonevil@gmail.com
|
199
199
|
executables:
|
200
200
|
- zabbix_nudge
|
201
201
|
- zabbix_nudge_jmx
|
202
|
-
- zabbix_nudged
|
203
202
|
extensions: []
|
204
203
|
|
205
204
|
extra_rdoc_files: []
|
@@ -212,7 +211,6 @@ files:
|
|
212
211
|
- Rakefile
|
213
212
|
- bin/zabbix_nudge
|
214
213
|
- bin/zabbix_nudge_jmx
|
215
|
-
- bin/zabbix_nudged
|
216
214
|
- examples/tomcat_template.xml
|
217
215
|
- lib/zabbix_nudge.rb
|
218
216
|
- lib/zabbix_nudge/jmx.rb
|
@@ -252,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
250
|
version: "0"
|
253
251
|
requirements: []
|
254
252
|
|
255
|
-
rubyforge_project:
|
253
|
+
rubyforge_project: zabbix_nudge
|
256
254
|
rubygems_version: 1.8.24
|
257
255
|
signing_key:
|
258
256
|
specification_version: 3
|