zcollective 0.0.16 → 0.0.17
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.
- checksums.yaml +7 -0
- data/bin/zcollective +11 -4
- data/lib/zcollective/zabbixclient.rb +2 -0
- metadata +9 -19
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: b7adf8b3521b3f9dd4ecf84e5231859e41892e8e
|
|
4
|
+
data.tar.gz: 979c2f035629d4f624fefde42c7af2e1ec43462d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 645c4a8184df5d0d53015b033f05cf92cca41ea71f4a9802828f9985078a0b17ea2c6cd23d4e6d5163799157a06fa2c61c7521954efea652c5995f64946fe3a2
|
|
7
|
+
data.tar.gz: be2f2a8c4dc07e032a3232d80f490257c832850f68f5dfd7fc94f5d238f9043591926036dd7e396828ecfc0f72daca132cbea84164150b6dd5bebfab5a00dd09
|
data/bin/zcollective
CHANGED
|
@@ -89,6 +89,12 @@ optparse = OptionParser.new do |opts|
|
|
|
89
89
|
options[:timeout] = t.to_i
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
# This timeout matches the default Net::HTTP.read_timeout value.
|
|
93
|
+
options[:http_timeout] = nil
|
|
94
|
+
opts.on('--http-timeout', 'Timeout Zabbix API calls after n seconds.') do |hto|
|
|
95
|
+
options[:http_timeout] = hto
|
|
96
|
+
end
|
|
97
|
+
|
|
92
98
|
options[:host]
|
|
93
99
|
opts.on('-h', '--host hostname', 'Skip mcollective host discovery, use the given host') do |h|
|
|
94
100
|
options[:host] = h
|
|
@@ -175,10 +181,11 @@ end
|
|
|
175
181
|
log.debug( "Connecting to Zabbix RPC service" )
|
|
176
182
|
|
|
177
183
|
zabbix_client = ZCollective::ZabbixClient.new(
|
|
178
|
-
:url
|
|
179
|
-
:user
|
|
180
|
-
:password
|
|
181
|
-
:debug
|
|
184
|
+
:url => options[:zabbix_api_url],
|
|
185
|
+
:user => options[:zabbix_user],
|
|
186
|
+
:password => options[:zabbix_pass],
|
|
187
|
+
:debug => options[:debug],
|
|
188
|
+
:http_timeout => options[:http_timeout],
|
|
182
189
|
)
|
|
183
190
|
|
|
184
191
|
log.debug( "Connected and authenticated" )
|
|
@@ -98,6 +98,8 @@ module ZCollective
|
|
|
98
98
|
uri = URI.parse( @options[:url] )
|
|
99
99
|
proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new
|
|
100
100
|
http = Net::HTTP::Proxy(proxy.host, proxy.port).new( uri.host, uri.port )
|
|
101
|
+
http_timeout = @options[:http_timeout]
|
|
102
|
+
http.read_timeout = http_timeout unless http_timeout.nil?
|
|
101
103
|
|
|
102
104
|
request = Net::HTTP::Post.new( uri.request_uri )
|
|
103
105
|
request.add_field( 'Content-Type', 'application/json-rpc' )
|
metadata
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zcollective
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.0.17
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Jon Topper
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
11
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: netaddr
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: 1.5.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: 1.5.0
|
|
30
27
|
description: ZCollective is a tool used to configure Zabbix using data discovered
|
|
@@ -39,32 +36,25 @@ files:
|
|
|
39
36
|
- bin/zcollective
|
|
40
37
|
homepage: http://github.com/scalefactory/zcollective
|
|
41
38
|
licenses: []
|
|
39
|
+
metadata: {}
|
|
42
40
|
post_install_message:
|
|
43
41
|
rdoc_options: []
|
|
44
42
|
require_paths:
|
|
45
43
|
- lib
|
|
46
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
47
|
-
none: false
|
|
48
45
|
requirements:
|
|
49
|
-
- -
|
|
46
|
+
- - '>='
|
|
50
47
|
- !ruby/object:Gem::Version
|
|
51
48
|
version: '0'
|
|
52
|
-
segments:
|
|
53
|
-
- 0
|
|
54
|
-
hash: 4271424940207899001
|
|
55
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
|
-
none: false
|
|
57
50
|
requirements:
|
|
58
|
-
- -
|
|
51
|
+
- - '>='
|
|
59
52
|
- !ruby/object:Gem::Version
|
|
60
53
|
version: '0'
|
|
61
|
-
segments:
|
|
62
|
-
- 0
|
|
63
|
-
hash: 4271424940207899001
|
|
64
54
|
requirements: []
|
|
65
55
|
rubyforge_project:
|
|
66
|
-
rubygems_version:
|
|
56
|
+
rubygems_version: 2.0.14
|
|
67
57
|
signing_key:
|
|
68
|
-
specification_version:
|
|
58
|
+
specification_version: 4
|
|
69
59
|
summary: Zabbix/MCollective integration
|
|
70
60
|
test_files: []
|