More Related Content

Zabbix API at FISL12 by Takanori Suzuki

  1. Zabbix API and related tools - How to interface with Zabbix- Takanori Suzuki
  2. Zabbix proxy stop sending data bug patch
  3. Disk monitoring improvement patch for LVM
  4.  
  5. distributed monitoring with centralised WEB administration
  6. server software for many Un*x
  7. native high performance agents for almost all famous OS
  8. agent-less monitoring
  9. web-based interface
  10. etc…
  11. Zabbix API
  12. Zabbix API enables us to control Zabbix by program.
  13. Non official command line tools are available.
  14. Mobile phone applications for Zabbix are released
  15. Libraries for API, easy to use from perl, php, ruby and python.
  16. Enables controlking Zabbix by command line and interactive shell
  17. Installable by Ruby gem
  18. By redirecting Zabbix commands, it returns result. $ echo get host|./zabcon.rb hostid,host 10017,Zabbix Server $ echo 'get item hostids=10017'|./zabcon.rb itemid,description,key_ 18435,Ping to the server (TCP),agent.ping 18436,Version of zabbix_agent(d) running,agent.version 18438,Maximum number of opened files,kernel.maxfiles 18439,Maximum number of processes,kernel.maxproc … ...
  19. Let's go to the demo!
  20. Using Zabbix API //get auth id $ curl -d '{"auth":null,"method":"user.authenticate","id":1,"params":{"password":"zabbix","user":"api_user"},"jsonrpc":"2.0"}' -H "Content-Type: application/json-rpc" http://localhost/zabbix185/api_jsonrpc.php //get item in "Zabbix Server" $ curl -d '{"jsonrpc":"2.0","method":"item.get","params":{"output":"shorten","host":"Zabbix Server","limit":0},"auth":"PUT_HERE_AUTH_ID","id":1}' -H "Content-Type: application/json-rpc" http://localhost/zabbix185/api_jsonrpc.php
  21. Ruby: http://trac.red-tux.net/wiki/zbx_api
  22. Python: https://github.com/gescheit/scripts/tree/master/zabbix/
  23. Perl: https://github.com/mikeda/ZabbixAPI
  24. Zabbix web interface access functions without JSON, but directly access same functions.
  25. If Zabbix web frontend is installed, we can use it by including 'include/config.inc.php' .
  26. Other useful way to interface with Zabbix
  27. Zabbix Sender protocol
  28. Zabbix Agent (Active) protocol
  29. Questions
  30. Thank you The original artwork by orngjce223 is distributed under CC BY license (http://creativecommons.org/licenses/by/3.0/us/)