Class: ZabbixAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/zapix.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ZabbixAPI

Returns a new instance of ZabbixAPI.



11
12
13
14
15
# File 'lib/zapix.rb', line 11

def initialize(options = {})
  @client = ZabbixRPCClient.new(options)
  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

#clientObject (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(options = {})
  new(options)
end

Instance Method Details

#actionsObject



45
46
47
# File 'lib/zapix.rb', line 45

def actions
  @actions ||= Actions.new(client)
end

#applicationsObject



29
30
31
# File 'lib/zapix.rb', line 29

def applications
  @applications ||= Applications.new(client)
end

#graphsObject



69
70
71
# File 'lib/zapix.rb', line 69

def graphs
  @graphs ||= Graphs.new(client)
end

#hostgroupsObject



17
18
19
# File 'lib/zapix.rb', line 17

def hostgroups
  @hostgroups ||= HostGroups.new(client)
end

#hostinterfacesObject



41
42
43
# File 'lib/zapix.rb', line 41

def hostinterfaces
  @hostinterfaces ||= Hostinterfaces.new(client)
end

#hostsObject



21
22
23
# File 'lib/zapix.rb', line 21

def hosts
  @hosts ||= Hosts.new(client)
end

#proxiesObject



49
50
51
# File 'lib/zapix.rb', line 49

def proxies
  @proxies ||= Proxies.new(client)
end

#scenariosObject



33
34
35
# File 'lib/zapix.rb', line 33

def scenarios
  @scenarios ||= Scenarios.new(client)
end

#screenitemsObject



65
66
67
# File 'lib/zapix.rb', line 65

def screenitems
  @screenitems ||= ScreenItems.new(client)
end

#screensObject



61
62
63
# File 'lib/zapix.rb', line 61

def screens
  @screens ||= Screens.new(client)
end

#templatesObject



25
26
27
# File 'lib/zapix.rb', line 25

def templates
  @templates ||= Templates.new(client)
end

#triggersObject



37
38
39
# File 'lib/zapix.rb', line 37

def triggers
  @triggers ||= Triggers.new(client)
end

#usergroupsObject



53
54
55
# File 'lib/zapix.rb', line 53

def usergroups
  @usergroups ||= Usergroups.new(client)
end

#usersObject



57
58
59
# File 'lib/zapix.rb', line 57

def users
  @users ||= Users.new(client)
end