Sha256: f23c264121de05fe3e35a0acbe49e1f81f61294971275a2a7179fba7c6e3bbf3
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
= Ruby Zabbix Api Module. Simple and lightweight ruby module for work with zabbix api version 1.8.x {<img src="https://travis-ci.org/vadv/zabbixapi.png">}[https://travis-ci.org/vadv/zabbixapi] You can: * Create and delete host/template/application/items/triggers/maintenance and screens; * Get info about all zabbix essences; == Installation gem install zabbixapi == Get Start * Create host and get hostid from zabbix api: zbx = Zabbix::ZabbixApi.new('https://zabbix.example.com', 'login', 'password') host_options = { "ip" => '127.0.0.1', "dns" => 'my.example.com', "host" => 'my.example.com', "useip" => 1, "groups" => [zbx.get_group_id('some_group')] } if zbx.create_host(host_options) puts zbx.get_host_id('my.example.com') end * Create hostgroup and get hostgroupid from zabbix api: zbx = Zabbix::ZabbixApi.new('https://zabbix.example.com', 'login', 'password') if zbx.add_group('some_group') puts zbx.get_group_id('some_group') end * Debugging For debug information on requests set zbx.debug = true More see in spec please... == Dependencies * net/http * net/https * json == Use examples * zabbix_la - LoadAverage template cd examples ruby zabbix_la -E development -g Templates * -E - env from examples/config.yml (like RAILS_ENV) * -g - group in zabbix for templates == Zabbix documentation * Zabbix Project Homepage -> http://zabbix.com/ * Zabbix Api docs -> http://www.zabbix.com/documentation/1.8/api
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
zabbixapi-0.3.0 | README.rdoc |
zabbixapi-0.2.0 | README.rdoc |
zabbixapi-0.1.9 | README.rdoc |
zabbixapi-0.1.8 | README.rdoc |
zabbixapi-0.1.7 | README.rdoc |