Skip to main content

zabbix-enums

Zabbix enumerations for API scripting.

This package aims to provide enumerations for Zabbix object parameters. So instead of using bare numbers and constantly browsing the docs, you can just use a nice enum.

Example 1: Use nice enums in API calls

from zabbix_enums.z60 import TriggerState
from pyzabbix import ZabbixAPI

zapi = ZabbixAPI('http://localhost')
zapi.login('Admin', 'zabbix')

# this
unknown_triggers = zapi.trigger.get(filter={'state': 1})
# becomes this
unknown_triggers = zapi.trigger.get(filter={'state': TriggerState.UNKNOWN})


zapi.user.logout()

Example 2: Filter entities offline, based on their status

from zabbix_enums.z60 import HostStatus
from pyzabbix import ZabbixAPI


zapi = ZabbixAPI('http://localhost')
zapi.login('Admin', 'zabbix')

hosts = zapi.host.get()

monitored = [h for h in hosts if HostStatus(h['status']) == HostStatus.MONITORED]

zapi.user.logout()

Example 3: Filter problems with severities above a certain level

from zabbix_enums.z60 import ProblemSeverity
from pyzabbix import ZabbixAPI


zapi = ZabbixAPI('http://localhost')
zapi.login('Admin', 'zabbix')

problems = zapi.problem.get()

important = [p for p in problems if ProblemSeverity(p['severity']) > ProblemSeverity.AVERAGE]

zapi.user.logout()

Limitations

Please bare in mind that not all enumerations are present at this time. For comparing Enums do not use is keyword - see second example

At this moment, only Zabbix 5.0 and above is supported.

Versioning

The following version schema is used: X.Y.Z

X - major version. If this changes, your code might break - update with caution.

Y - latest supported Zabbix version. I.E 1.60.0 supports Zabbix 6.0 and below but not 6.2.

Z - minor version. For bugfixes.

Metadata

Release files for zabbix-enums 1.74.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zabbix-enums 1.74.0
File Size Uploaded Provenance Actions
zabbix_enums-1.74.0.tar.gz 162.2 kB Without provenance Details for zabbix_enums-1.74.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zabbix-enums 1.74.0
File Interpreter ABI Platform Actions
zabbix_enums-1.74.0-py3-none-any.whl Python 3 none any Details for zabbix_enums-1.74.0-py3-none-any.whl

Total release size: 502.1 kB

Release files / zabbix_enums-1.74.0.tar.gz

Download URL zabbix_enums-1.74.0.tar.gz
Size 162.2 kB
Tags Source
SHA-256 checksum
How to use checksums
60ad52217815a90879db6e55858b82d5abca14169068ab304ac7c77ffd2f6ee7
BLAKE2b-256 checksum
How to use checksums
ce1827c7110035bc32476dd1903450a72402ead44daefbf9e73cf4cb812ea82c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Release files / zabbix_enums-1.74.0-py3-none-any.whl

Download URL zabbix_enums-1.74.0-py3-none-any.whl
Size 339.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea366b3f32b7820f65411334f7393b6c0de0fd81bf468b08a2267074711f0525
BLAKE2b-256 checksum
How to use checksums
c6d622c54485aa4e2438fc6b72fc33c4ffa3c589962997b3f2e13ba67a0cc458
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Security for zabbix-enums 1.74.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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