Skip to content

michelmarinho/api-zabbix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix API

Codes for use Zabbix API

  • ack_event_zabbix.py
  • itervices_zabbix.py

Installation

You need lib zabbix-api and pip

# apt-get install pip git
# pip install zabbix-api

$ git clone https://github.com/janssenlima/api-zabbix

How to use - examples

ack_event_zabbix.py

Inform the Event ID generated in Zabbix as a parameter

$ python ack_event_zabbix.py <event.id>

itservices_zabbix.py

Inform the function to be used

list groups

Syntaxy: get_hostgroups()

No parameter is required

$ python -c "execfile('itservices_zabbix.py'); get_hostgroups()"
list hosts of specific group

Syntax: get_hosts('<name_of_group>')"

$ python -c "execfile('itservices_zabbix.py');  get_hosts('Linux servers')"
list items of a specific host that has associated trigger

Syntax: get_items_hosts('<name_of_host>')"

$ python -c "execfile('itservices_zabbix.py');  get_hosts('Apache Web Server')"
delete full service tree

Syntax: delete_tree_itservices()

No parameter is required

$ python -c "execfile('itservices_zabbix.py');  delete_tree_itservices()"
automatically create service tree

Syntax: mk_populate()

No parameter is required

$ python -c "execfile('itservices_zabbix.py');  mk_populate()"

Development

Want to contribute? Great!

Send suggestions, problems, errors etc for janssenreislima@gmail.com

Visit http://blog.conectsys.com.br

Todos

  • Do not list groups without hosts
  • Create menu for selecting options and call the internal modules
  • And others

About

Códigos para utilização da API do Zabbix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%