zabbixapi 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,7 +45,7 @@ class ZabbixApi
45
45
  end
46
46
 
47
47
  def create_or_update(data)
48
- graphid = get_id(:name => data[:name])
48
+ graphid = get_id(:name => data[:name], :templateid => data[:templateid])
49
49
  graphid ? update(data.merge(:graphid => graphid)) : create(data)
50
50
  end
51
51
 
@@ -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
 
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  class ZabbixApi
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
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
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: -2858425249023380591
59
+ hash: -3133925998824390450
60
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements: