Skip to main content

A Zabbix sender module with async features

Project description

workflow badge

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


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)

Uploaded Source

Built Distribution

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

zabbix_sender_async-1.1.1-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

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

Hashes for zabbix_sender_async-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2d3d08c35e2a29ca29d0e4fc95e3b6c84c4ee28c286ec747a8730006cf627603
MD5 d5e7a538e6e56346a40a354af4a1ec62
BLAKE2b-256 a050caf36c7f3ce243f1538084cc931e7b4c8e66d533a6fc2474c99aa58d60d3

See more details on using hashes here.

File details

Details for the file zabbix_sender_async-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zabbix_sender_async-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05989c92edd159a755931ff7a05504628c896bd83c30334b5171e27704b41c4a
MD5 09038ca7ac952a7790dd049636e0aedc
BLAKE2b-256 43f4b95f0c39aa0f4b83d0345e4a903cae570898b3cac055f3ade5468be3ce6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page