Zabbix API wrapper
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
zabbix_client Release version 0.1.1 Sep 19, 2015
.gitignore Add packaging stuff to .gitignore Aug 10, 2014
CHANGES.rst Release version 0.1.1 Sep 19, 2015
LICENSE.txt
MANIFEST.in
README.rst Add README information Aug 10, 2014
requirements-extras.txt Add requirements Aug 10, 2014
setup.py Release version 0.1.1 Sep 19, 2015

README.rst

zabbix-client

zabbix-client is a Zabbix API wrapper written in Python. It works on Python 2.6+ and 3.2+.

Zabbix API

Zabbix API was introduced in Zabbix 1.8 and allows you to create, update and fetch Zabbix objects (like hosts, items, graphs and others) through the JSON-RPC 2.0 protocol.

Zabbix API documentation:

JSON-RPC documentation:

zabbix-client supports all Zabbix versions including the JSON-RPC API, starting with Zabbix 1.8.

Usage

Calling a method that does not require authentication:

>>> from zabbix_client import ZabbixServerProxy
>>> s = ZabbixServerProxy('http://localhost/zabbix')
>>> s.apiinfo.version()
'2.0.12'

Calling a method that requires previous authentication:

>>> from zabbix_client import ZabbixServerProxy
>>> s = ZabbixServerProxy('http://localhost/zabbix')
>>> s.user.login(user='Admin', password='zabbix')
'44cfb35933e3e75ef51988845ab15e8b'
>>> s.host.get(output=['hostid', 'host'])
[{'host': 'Zabbix server', 'hostid': '10084'},
    {'host': 'Test', 'hostid': '10085'}]
>>> s.user.logout()
True

License

Licensed under the Apache License.