Class: ZabbixAPI
- Inherits:
-
Object
- Object
- ZabbixAPI
- Defined in:
- lib/zapix.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
- #actions ⇒ Object
- #applications ⇒ Object
- #graphs ⇒ Object
- #hostgroups ⇒ Object
- #hostinterfaces ⇒ Object
- #hosts ⇒ Object
-
#initialize(options = {}) ⇒ ZabbixAPI
constructor
A new instance of ZabbixAPI.
- #proxies ⇒ Object
- #scenarios ⇒ Object
- #screenitems ⇒ Object
- #screens ⇒ Object
- #templates ⇒ Object
- #triggers ⇒ Object
- #usergroups ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ZabbixAPI
Returns a new instance of ZabbixAPI.
11 12 13 14 15 |
# File 'lib/zapix.rb', line 11 def initialize( = {}) @client = ZabbixRPCClient.new() Dir["#{File.dirname(__FILE__)}/zapix/zabbix_classes/*.rb"].each { |f| load(f) } Dir["#{File.dirname(__FILE__)}/zapix/proxies/*.rb"].each { |f| load(f) } end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/zapix.rb', line 5 def client @client end |
Class Method Details
.connect(options = {}) ⇒ Object
7 8 9 |
# File 'lib/zapix.rb', line 7 def self.connect( = {}) new() end |
Instance Method Details
#actions ⇒ Object
45 46 47 |
# File 'lib/zapix.rb', line 45 def actions @actions ||= Actions.new(client) end |
#applications ⇒ Object
29 30 31 |
# File 'lib/zapix.rb', line 29 def applications @applications ||= Applications.new(client) end |
#graphs ⇒ Object
69 70 71 |
# File 'lib/zapix.rb', line 69 def graphs @graphs ||= Graphs.new(client) end |
#hostgroups ⇒ Object
17 18 19 |
# File 'lib/zapix.rb', line 17 def hostgroups @hostgroups ||= HostGroups.new(client) end |
#hostinterfaces ⇒ Object
41 42 43 |
# File 'lib/zapix.rb', line 41 def hostinterfaces @hostinterfaces ||= Hostinterfaces.new(client) end |
#proxies ⇒ Object
49 50 51 |
# File 'lib/zapix.rb', line 49 def proxies @proxies ||= Proxies.new(client) end |
#scenarios ⇒ Object
33 34 35 |
# File 'lib/zapix.rb', line 33 def scenarios @scenarios ||= Scenarios.new(client) end |
#screenitems ⇒ Object
65 66 67 |
# File 'lib/zapix.rb', line 65 def screenitems @screenitems ||= ScreenItems.new(client) end |
#screens ⇒ Object
61 62 63 |
# File 'lib/zapix.rb', line 61 def screens @screens ||= Screens.new(client) end |
#templates ⇒ Object
25 26 27 |
# File 'lib/zapix.rb', line 25 def templates @templates ||= Templates.new(client) end |
#triggers ⇒ Object
37 38 39 |
# File 'lib/zapix.rb', line 37 def triggers @triggers ||= Triggers.new(client) end |
#usergroups ⇒ Object
53 54 55 |
# File 'lib/zapix.rb', line 53 def usergroups @usergroups ||= Usergroups.new(client) end |