Class: ZabbixManager
- Inherits:
-
Object
show all
- Defined in:
- lib/zabbix_manager.rb,
lib/zabbix_manager/client.rb,
lib/zabbix_manager/version.rb,
lib/zabbix_manager/classes/hosts.rb,
lib/zabbix_manager/classes/items.rb,
lib/zabbix_manager/classes/roles.rb,
lib/zabbix_manager/classes/users.rb,
lib/zabbix_manager/classes/drules.rb,
lib/zabbix_manager/classes/errors.rb,
lib/zabbix_manager/classes/events.rb,
lib/zabbix_manager/classes/graphs.rb,
lib/zabbix_manager/classes/server.rb,
lib/zabbix_manager/classes/actions.rb,
lib/zabbix_manager/classes/proxies.rb,
lib/zabbix_manager/classes/screens.rb,
lib/zabbix_manager/classes/scripts.rb,
lib/zabbix_manager/basic/basic_func.rb,
lib/zabbix_manager/basic/basic_init.rb,
lib/zabbix_manager/classes/problems.rb,
lib/zabbix_manager/classes/triggers.rb,
lib/zabbix_manager/classes/unusable.rb,
lib/zabbix_manager/basic/basic_alias.rb,
lib/zabbix_manager/basic/basic_logic.rb,
lib/zabbix_manager/classes/httptests.rb,
lib/zabbix_manager/classes/templates.rb,
lib/zabbix_manager/classes/valuemaps.rb,
lib/zabbix_manager/basic/basic_extend.rb,
lib/zabbix_manager/classes/hostgroups.rb,
lib/zabbix_manager/classes/mediatypes.rb,
lib/zabbix_manager/classes/usergroups.rb,
lib/zabbix_manager/classes/usermacros.rb,
lib/zabbix_manager/classes/maintenance.rb,
lib/zabbix_manager/classes/applications.rb,
lib/zabbix_manager/classes/configurations.rb
Defined Under Namespace
Classes: Actions, Applications, BaseError, Basic, Client, Configurations, Drules, Events, Graphs, HostGroups, Hosts, HttpError, HttpTests, Items, Maintenance, ManagerError, Mediatypes, Problems, Proxies, Roles, Screens, Scripts, Server, Templates, Triggers, Usergroups, Usermacros, Users, ValueMaps
Constant Summary
collapse
- VERSION =
"5.0.8"
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Initializes a new ZabbixManager object
73
74
75
|
# File 'lib/zabbix_manager.rb', line 73
def initialize(options = {})
@client = Client.new(options)
end
|
Instance Attribute Details
40
41
42
|
# File 'lib/zabbix_manager.rb', line 40
def client
@client
end
|
Class Method Details
Initializes a new ZabbixManager object
46
47
48
|
# File 'lib/zabbix_manager.rb', line 46
def self.connect(options = {})
new(options)
end
|
51
52
53
|
# File 'lib/zabbix_manager.rb', line 51
def self.current
@current ||= ZabbixManager.new
end
|
Instance Method Details
78
79
80
|
# File 'lib/zabbix_manager.rb', line 78
def actions
@actions ||= Actions.new(@client)
end
|
83
84
85
|
# File 'lib/zabbix_manager.rb', line 83
def applications
@applications ||= Applications.new(@client)
end
|
88
89
90
|
# File 'lib/zabbix_manager.rb', line 88
def configurations
@configurations ||= Configurations.new(@client)
end
|
193
194
195
|
# File 'lib/zabbix_manager.rb', line 193
def drules
@drules ||= Drules.new(@client)
end
|
93
94
95
|
# File 'lib/zabbix_manager.rb', line 93
def events
@events ||= Events.new(@client)
end
|
98
99
100
|
# File 'lib/zabbix_manager.rb', line 98
def graphs
@graphs ||= Graphs.new(@client)
end
|
103
104
105
|
# File 'lib/zabbix_manager.rb', line 103
def hostgroups
@hostgroups ||= HostGroups.new(@client)
end
|
108
109
110
|
# File 'lib/zabbix_manager.rb', line 108
def hosts
@hosts ||= Hosts.new(@client)
end
|
113
114
115
|
# File 'lib/zabbix_manager.rb', line 113
def httptests
@httptests ||= HttpTests.new(@client)
end
|
118
119
120
|
# File 'lib/zabbix_manager.rb', line 118
def items
@items ||= Items.new(@client)
end
|
#logout ⇒ Boolean
Invalidate current authentication token
65
66
67
|
# File 'lib/zabbix_manager.rb', line 65
def logout
@client.logout
end
|
123
124
125
|
# File 'lib/zabbix_manager.rb', line 123
def maintenance
@maintenance ||= Maintenance.new(@client)
end
|
128
129
130
|
# File 'lib/zabbix_manager.rb', line 128
def mediatypes
@mediatypes ||= Mediatypes.new(@client)
end
|
133
134
135
|
# File 'lib/zabbix_manager.rb', line 133
def problems
@problems ||= Problems.new(@client)
end
|
138
139
140
|
# File 'lib/zabbix_manager.rb', line 138
def proxies
@proxies ||= Proxies.new(@client)
end
|
#query(data) ⇒ Hash
Executes an API request directly using a custom query
59
60
61
|
# File 'lib/zabbix_manager.rb', line 59
def query(data)
@client.manager_request(method: data[:method], params: data[:params])
end
|
143
144
145
|
# File 'lib/zabbix_manager.rb', line 143
def roles
@roles ||= Roles.new(@client)
end
|
148
149
150
|
# File 'lib/zabbix_manager.rb', line 148
def screens
@screens ||= Screens.new(@client)
end
|
153
154
155
|
# File 'lib/zabbix_manager.rb', line 153
def scripts
@scripts ||= Scripts.new(@client)
end
|
158
159
160
|
# File 'lib/zabbix_manager.rb', line 158
def server
@server ||= Server.new(@client)
end
|
163
164
165
|
# File 'lib/zabbix_manager.rb', line 163
def templates
@templates ||= Templates.new(@client)
end
|
168
169
170
|
# File 'lib/zabbix_manager.rb', line 168
def triggers
@triggers ||= Triggers.new(@client)
end
|
173
174
175
|
# File 'lib/zabbix_manager.rb', line 173
def usergroups
@usergroups ||= Usergroups.new(@client)
end
|
178
179
180
|
# File 'lib/zabbix_manager.rb', line 178
def usermacros
@usermacros ||= Usermacros.new(@client)
end
|
183
184
185
|
# File 'lib/zabbix_manager.rb', line 183
def users
@users ||= Users.new(@client)
end
|
188
189
190
|
# File 'lib/zabbix_manager.rb', line 188
def valuemaps
@valuemaps ||= ValueMaps.new(@client)
end
|