Skip to main content

zappix - a package for Zabbix sender and get.

zappix aims to be a drop-in replacement for zabbix_get as well as zabbix_sender. Its components are available not only as a module but from the command line as well.

zappix requires Python3 and is guaranteed to work with 3.6.

Instalation

zappix is not dependant on any third party modules. The easiest way to install it with pip:

pip install zappix

Usage

As mentioned earlier - zappix can be used both as a module inside of an application, as well as from the Command Line Interface.

As a module

At the moment zappix has two classes: Sender and Get. Both of which can be imported in the following manner:

>>> from zappix.sender import Sender
>>> from zappix.get import Get

Then you can send or get some data. Asuming both Zabbix Agent and Server run on localhost and default ports:

>>> getter = Get("127.0.0.1")
>>> getter.get_value("agent.ping")
1
>>> sender = Sender("127.0.0.1")
>>> sender.send_value('testhost', 'test', 1)
{"processed": 1, "failed": 0, "total": 1, "seconds spent": 0.005}

CLI

To use this utility from the command line, you need to invoke python with the -m flag, followed by the module name and required parameters:

python -m zappix.sender -z 127.0.0.1 -s testhost -k testkey -o 1

Testing

If you wish to contribute it's good to know how to conduct tests. You can go with mocked tests only or add integration tests as well.

To enable integration tests, set the envvar ZAPPIX_TEST_INTEGRATION=yes

After if you wish to proceed with services in docker containers run the following:

docker run -d -e "ZBX_CACHEUPDATEFREQUENCY=1" -p 10051:10051 -p 80:80 zabbix/zabbix-appliance
docker run -d -e "ZBX_SERVER_HOST=0.0.0.0/0" -p 10050:10050 zabbix/zabbox-agent

Note that the zabbix-appliance might take a while to start. Once both containers are up and running, just run tox.

If you have your custom Zabbix services, it is possible to configure tests via envvars to connect to those:

envvar usage
ZAPPIX_AGENT IP address or DNS name of running Zabbix agent
ZAPPIX_SERVER IP address or DNS name of running Zabbix Server
ZAPPIX_API URL of Zabbix fronted. Schema is required
ZAPPIX_API_USER User for creating entities via API. Should have RW permissions to a Host group with ID=2 - Usually 'Linux Servers'
ZAPPIX_API_PASS Password for that user

Release files for zappix 1.2.3

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

Source distribution (sdist)

Source distribution for zappix 1.2.3
File Size Uploaded
zappix-1.2.3.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zappix 1.2.3
File Interpreter ABI Platform
zappix-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / zappix-1.2.3.tar.gz

Download URL zappix-1.2.3.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c22b658f838dad5a7e059580470a425aac13b156350b51276ae6c69a5f864c1c
BLAKE2b-256 checksum
How to use checksums
0e3ffed6b95e28b529825d9231aacd84cb4cc5b255ec272ee8aa1245a6065c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / zappix-1.2.3-py3-none-any.whl

Download URL zappix-1.2.3-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
806ae490c1e8297ada4217bae2704063a1adf1c3248bd57571ce3310a9b694a8
BLAKE2b-256 checksum
How to use checksums
94f42b48a2824a3bf6871a4645cd941ed76a1036418b14b0ba61854c133c7876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.1.3

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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