zabbapi 3.0.0 → 3.0.1
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 +4 -4
- data/lib/zabbapi.rb +7 -1
- data/lib/zabbapi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 070b8eadaacee7ec30783794ff3e185f117ff02e
|
|
4
|
+
data.tar.gz: 9f54468ae553109a7b32da8b1375c22ad724113f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92d65de0e24ffa79c3adc938a72f165dd6def58049898c6e1367df43ab86de89180f7da60dfd8cbcaba15d701501b36457ba4c1484d5645427c2e3db392d25ce
|
|
7
|
+
data.tar.gz: 16af19a9c2e31bfdbf9dec9cd8d0ab981c0d0f248a89e760be66d6ab1c48b4afe23b4710bfe1a6882c302b7a3f36d2ad00ac8aa5ca3396fcc42c6d22c1bf2723
|
data/lib/zabbapi.rb
CHANGED
|
@@ -150,6 +150,7 @@ end
|
|
|
150
150
|
$tplid = '100100000010001'
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
+
|
|
153
154
|
begin
|
|
154
155
|
zbx.query(:method => "host.create" ,
|
|
155
156
|
:params => {
|
|
@@ -214,7 +215,12 @@ end
|
|
|
214
215
|
:hosts_id => [zbx.hosts.get_id(:host => @hostname)],
|
|
215
216
|
:templates_id => [100100000010962 , 100100000010003 , 100100000010099 , 100100000011805]
|
|
216
217
|
)
|
|
217
|
-
|
|
218
|
+
if $host[2] == "i"
|
|
219
|
+
zbx.templates.mass_add(
|
|
220
|
+
:hosts_id => [zbx.hosts.get_id(:host => @hostname)],
|
|
221
|
+
:templates_id => [200200000010062]
|
|
222
|
+
)
|
|
223
|
+
end
|
|
218
224
|
puts "Add host to group..."
|
|
219
225
|
|
|
220
226
|
zbx.query(:method => "hostgroup.massadd" , :params => {:groups => {:groupid => "100100000000614"} , :hosts => {:hostid => zbx.hosts.get_id(:host => @hostname)}} )
|
data/lib/zabbapi/version.rb
CHANGED