Skip to main content

Python module to work with zabbix.

Project description

Build Status Coverage PyPi downloads PyPi version

Zabbix module for Python


You can install Zabbix modules for Python with pip:

pip install py-zabbix

Official documentaion for py-zabbix



from zabbix.api import ZabbixAPI

# Create ZabbixAPI class instance
zapi = ZabbixAPI(url='https://localhost/zabbix/', user='admin', password='zabbix')

# Get all monitored hosts
result1 =, output='extend')

# Get all disabled hosts
result2 = zapi.do_request('host.get',
                              'filter': {'status': 1},
                              'output': 'extend'

# Filter results
hostnames1 = [host['host'] for host in result1]
hostnames2 = [host['host'] for host in result2['result']]


from pyzabbix import ZabbixMetric, ZabbixSender

# Send metrics to zabbix trapper
packet = [
  ZabbixMetric('hostname1', 'test[cpu_usage]', 2),
  ZabbixMetric('hostname1', 'test[system_status]', "OK"),
  ZabbixMetric('hostname1', 'test[disk_io]', '0.1'),
  ZabbixMetric('hostname1', 'test[cpu_usage]', 20, 1411598020),

result = ZabbixSender(use_config=True).send(packet)

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
py_zabbix-1.1.5-py3-none-any.whl (13.1 kB) Copy SHA256 hash SHA256 Wheel py3
py-zabbix-1.1.5.tar.gz (9.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page