Sha256: 7473c39c236432f74e0fe14f241657e3bae9b258d8967c1e7f4b09dab7b4926e
Contents?: true
Size: 925 Bytes
Versions: 11
Compression:
Stored size: 925 Bytes
Contents
module Zabbix class ZabbixApi def add_application(app_options) app_options_default = { 'hostid' => nil, 'name' => nil } application = merge_opt(app_options_default, app_options) message = { 'method' => 'application.create', 'params' => application } responce = send_request(message) unless responce.empty? then result = responce['applicationids'][0].to_i else result = nil end return result end end def get_app_id(host_id, app_name) message = { 'method' => 'application.get', 'params' => { 'filter' => { 'name' => app_name, 'hostid' => host_id } } } responce = send_request(message) unless responce.empty? then result = responce[0]['applicationid'] else result = nil end return result end end
Version data entries
11 entries across 11 versions & 2 rubygems