Ad Widget

Collapse

How to report data in active mode, without authentication?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nagylzs
    Junior Member
    • Nov 2017
    • 8

    #1

    How to report data in active mode, without authentication?

    I need to add zabbix support to a service that runs behind a firewall. My only option is to use active mode: the agent connects to the server. I'm using pyzabbix ( https://github.com/lukecyca/pyzabbix ) but that is not important. Esentially, it uses the JSONRPC API to send data to the server.

    Usually, when I install a new zabbix agent on a computer, I do not need to do authentication. Host auto-registration is enabled on the server, and my agents don't need to authenticate to send data to the server. So it works for the official zabbix agent program. But I need to do the same for my custom service. I don't see how I could do this with the JSONRPC API, and I don't like the idea of storing my user name and password in a local (exposed) configuration file anyway. I don't need to query data, I just need to send updates. Is it possible to auto-create a host and send item data without using a user name and a password? The official zabbix agent seems to be doing this, so it must be possible. Can I do this with JSON RPC, or should I use something else?
  • nagylzs
    Junior Member
    • Nov 2017
    • 8

    #2
    To answer my own question: the Zabbix API cannot be used to send data at all. You need to use zabbix_sender for that. There is already a python module for that (pyZabbixSender) but it works with Python 2 only. I'm in the process of creating a modified version for Python 3.

    Comment

    Working...