zabbixapi 0.5.2b → 0.5.2b2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zabbixapi/classes/triggers.rb +3 -5
- data/lib/zabbixapi/version.rb +1 -1
- metadata +2 -2
@@ -47,20 +47,18 @@ class ZabbixApi
|
|
47
47
|
data[:expression] = data[:expression].gsub(/{.*\:/,"{") #TODO ugly regexp
|
48
48
|
data.delete(:templateid)
|
49
49
|
|
50
|
-
log "[DEBUG] expression: #{expression}\n data: #{data[:expression]}"
|
50
|
+
log "[DEBUG] expression: #{dump[:expression]}\n data: #{data[:expression]}"
|
51
51
|
|
52
52
|
if hash_equals?(dump, data)
|
53
53
|
log "[DEBUG] Equal keys #{dump} and #{data}, skip update"
|
54
54
|
item_id
|
55
55
|
else
|
56
56
|
data[:expression] = old_expression
|
57
|
-
data_update = array_flag ? [data] : data
|
58
|
-
data_update.delete(:triggerid)
|
59
57
|
# disable old trigger
|
60
58
|
log "[DEBUG] disable :" + @client.api_request(:method => "#{method_name}.update", :params => [{:triggerid=> data[:triggerid], :status => "1" }]).inspect
|
61
59
|
# create new trigger
|
62
|
-
|
63
|
-
|
60
|
+
data.delete(:triggerid)
|
61
|
+
create(data)
|
64
62
|
end
|
65
63
|
|
66
64
|
end
|
data/lib/zabbixapi/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.2b2
|
5
5
|
prerelease: 5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
segments:
|
81
81
|
- 0
|
82
|
-
hash:
|
82
|
+
hash: 3153601881555273577
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|