Skip to main content

Python module to work with zabbix.

Project description

It's a fork of

Zabbix module for Python



git clone
cd ./py-zabbix
pip3 install -e ./


pip3 install 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']]

Add Session Reusage

# Continuation of previous example

session = zapi.auth

other_zapi = ZabbixAPI(


    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)


All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.



  • adjusted for PyPi.


  • README example of session reusage.

[1.2.0] - 2018-08-20


  • api allow session reusage.

Project details

Download files

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

Files for zabbix, version 1.2.4
Filename, size File type Python version Upload date Hashes
Filename, size zabbix-1.2.4-py3-none-any.whl (10.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size zabbix-1.2.4.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page