zabbixapi 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zabbixapi/graphs.rb +1 -1
- data/lib/zabbixapi/items.rb +1 -1
- data/lib/zabbixapi/triggers.rb +1 -1
- data/lib/zabbixapi/version.rb +1 -1
- data/spec/localhost.rb +1 -0
- metadata +2 -2
data/lib/zabbixapi/graphs.rb
CHANGED
data/lib/zabbixapi/items.rb
CHANGED
@@ -66,7 +66,7 @@ class ZabbixApi
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def create_or_update(data)
|
69
|
-
itemid = get_id(:description => data[:description])
|
69
|
+
itemid = get_id(:description => data[:description], :hostid => data[:hostid])
|
70
70
|
itemid ? update(data.merge(:itemid => itemid)) : create(data)
|
71
71
|
end
|
72
72
|
|
data/lib/zabbixapi/triggers.rb
CHANGED
@@ -30,7 +30,7 @@ class ZabbixApi
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def create_or_update(data)
|
33
|
-
triggerid = get_id(:description => data[:description])
|
33
|
+
triggerid = get_id(:description => data[:description], :templateid => data[:templateid])
|
34
34
|
triggerid ? update(data.merge(:triggerid => triggerid)) : create(data)
|
35
35
|
end
|
36
36
|
|
data/lib/zabbixapi/version.rb
CHANGED
data/spec/localhost.rb
CHANGED
@@ -3,6 +3,7 @@ require 'zabbixapi'
|
|
3
3
|
# settings
|
4
4
|
#api_url = 'http://zabbix/zabbix12/api_jsonrpc.php'
|
5
5
|
api_url = 'http://zabbix/zabbix13/api_jsonrpc.php'
|
6
|
+
api_url = 'http://monitor02.undev.cc/api_jsonrpc.php'
|
6
7
|
#api_url = 'http://zabbix/zabbix20/api_jsonrpc.php'
|
7
8
|
|
8
9
|
api_login = 'Admin'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbixapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -56,7 +56,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: '0'
|
57
57
|
segments:
|
58
58
|
- 0
|
59
|
-
hash: -
|
59
|
+
hash: -3133925998824390450
|
60
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|