Skip to main content

Zabbix API wrapper

Project description

fork form : https://github.com/jesuslosada/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.

Changes

0.1.1 (2015-09-19)

  • Fix exception handling.

0.1.0 (2014-08-10)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-zabbix-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file flask-zabbix-0.1.1.tar.gz.

File metadata

  • Download URL: flask-zabbix-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flask-zabbix-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d939e6f68b26994067e0b435f72fd6a739b888e52542191e78d71e9e4963f054
MD5 f9fdd656a0ccd63f685a4218502aac59
BLAKE2b-256 8f116c711daaf8cb278abf6341c7f4ccfde081bc8078129de9457cb7c986349e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page