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
- #hostgroups ⇒ Object
- #hosts ⇒ Object
-
#initialize(options = {}) ⇒ ZabbixAPI
constructor
A new instance of ZabbixAPI.
- #templates ⇒ 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
#hostgroups ⇒ Object
17 18 19 |
# File 'lib/zapix.rb', line 17 def hostgroups @hostgroups ||= HostGroups.new(@client) end |