Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python Zabbix Proto

Module supporting all Zabbix specific communication protocols. At the moment Proxy (active) and sender protocols are supported.

Zabbix server supported versions

Zabbix Proto Zabbix
<=0.0.9 <=3.2
>=1.0.0, <2.0.0 5.0-6.x
>=2.1.0 5.0-7.x

Installation

pip install zabbixproto

Proxy

By default the library uses Zabbix 7.x protocol. To communicate with older servers, pass protocol_version:

from datetime import datetime
from zabbixproto import Proxy, ProxyDataPacket

## Zabbix 7.x (default)
proxy = Proxy('testproxy', '127.0.0.1', 10051)

## Zabbix 5.x/6.x
proxy = Proxy('testproxy', '127.0.0.1', 10051, protocol_version="5.4.0")

## Sending heartbeat to the Zabbix server
## (version-aware: Zabbix 7.x sends an empty "proxy data" keepalive since the
##  "proxy heartbeat" request was removed in 7.0; 5.x/6.x send "proxy heartbeat")
proxy.send_heartbeat()

## Getting "proxy configuration". Includes all hosts, items etc.
resp = proxy.get_config()
print(resp)

data = ProxyDataPacket('testproxy', session=proxy.session,
                       protocol_version=proxy.protocol_version)

## Sending auto-registration packets
data.add_autoregistration(
    host="testhost",
    host_metadata="registerThisTestHost"
)

## Sending metrics
data.add_history_data(
    itemid=12345,
    value=100,
    clock=int(datetime.now().timestamp())
)

## UNSUPPORTED
data.add_history_data(
    itemid=12345,
    value="Unsupported because of this and that",
    state=1,
    clock=int(datetime.now().timestamp())
)

## Unavailable host (v7: interface availability, v5: host availability)
data.add_host_availability(
    hostid=100,
    available=2, # 0 - Unknown, 1 - Available, 2 - Unavailable
    error='Web site is down!'
)

print(proxy.sendWithResponse(data))

Sender

from zabbixproto import Sender, SenderDataPacket

sender = Sender('127.0.0.1', 10051)
packet = SenderDataPacket()
packet.add("hostname", "key", "value")
sender.sendWithResponse(packet)

Download files

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

Source Distribution

zabbixproto-2.2.0rc1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zabbixproto-2.2.0rc1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file zabbixproto-2.2.0rc1.tar.gz.

File metadata

  • Download URL: zabbixproto-2.2.0rc1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for zabbixproto-2.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 1aca1817ae672f2e30b951e613cd51e0ad568030851a32906d88075412b76d88
MD5 0db49339bce68d5b4baf599b36f5c250
BLAKE2b-256 5bc23bbc8629eb6a9aa840e7755bfa4ae3f5f5a2816e941b950b40975e95a37a

See more details on using hashes here.

Provenance

The following attestation bundles were made for zabbixproto-2.2.0rc1.tar.gz:

Publisher: ci.yml on akomic/python-zabbix-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zabbixproto-2.2.0rc1-py3-none-any.whl.

File metadata

  • Download URL: zabbixproto-2.2.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for zabbixproto-2.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 999c640b8947e533f7cbb5423269a456bd48c3816fffa276db38eb0a07d99421
MD5 34c3c3c7b7f782605baa71564fa58291
BLAKE2b-256 72ca580e92d2d31719a8e5cf92397f1ab10c9ff99926add881437cf18809bb6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zabbixproto-2.2.0rc1-py3-none-any.whl:

Publisher: ci.yml on akomic/python-zabbix-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.2.1

2 files

2.2.0

2 files

This release

2.2.0rc1 This release

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.1

1 file

1.0.0

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page