A Zabbix sender module with async features
Project description
Zabbix Async Sender module for Python
Install
pip install zabbix-sender-async
Examples
import asyncio
from zabbixasync.sender import AsyncSender, ItemData
async def sendmetrics():
sender = AsyncSender('localhost', 10051)
metric = ItemData(host='hostname', key='test.metric.text', value='test package import')
result = await sender.send(metric)
print(result)
asyncio.run(sendmetrics())
Expected result:
ZabbixResponse(processed=1, failed=0, total=1, seconds_spent=0.00019, response='success')
TLS-PSK example (compatible with Zabbix sender PSK mode):
import asyncio
from zabbixasync.sender import AsyncSender, ItemData
async def sendmetrics():
sender = AsyncSender(
'zabbix-proxy.local',
10051,
tls_connect='psk',
tls_psk_identity='my-host-psk',
tls_psk_file='/etc/zabbix/zabbix_agent2.psk',
)
metric = ItemData(host='my-host', key='app.metric', value='42')
result = await sender.send(metric)
print(result)
asyncio.run(sendmetrics())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zabbix_sender_async-1.1.1.tar.gz
(35.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zabbix_sender_async-1.1.1.tar.gz.
File metadata
- Download URL: zabbix_sender_async-1.1.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d3d08c35e2a29ca29d0e4fc95e3b6c84c4ee28c286ec747a8730006cf627603
|
|
| MD5 |
d5e7a538e6e56346a40a354af4a1ec62
|
|
| BLAKE2b-256 |
a050caf36c7f3ce243f1538084cc931e7b4c8e66d533a6fc2474c99aa58d60d3
|
File details
Details for the file zabbix_sender_async-1.1.1-py3-none-any.whl.
File metadata
- Download URL: zabbix_sender_async-1.1.1-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05989c92edd159a755931ff7a05504628c896bd83c30334b5171e27704b41c4a
|
|
| MD5 |
09038ca7ac952a7790dd049636e0aedc
|
|
| BLAKE2b-256 |
43f4b95f0c39aa0f4b83d0345e4a903cae570898b3cac055f3ade5468be3ce6e
|