Ad Widget

Collapse

Writing Zabbix agent in java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • allardkrings
    Junior Member
    • Oct 2020
    • 5

    #1

    Writing Zabbix agent in java

    Hi,

    I am trying to write a Zabbix agent in JAVA that can run on z/OS. However when testing it with zabbix_get I get an error message:

    zabbix_get [21238]: Check access restrictions in Zabbix agent configuration

    I know that a standard zabbix-agent has the IP-adress of the allowed Zabbix Server in its configuration. However my prototype has no check on connecting, it allows any program to connect at the moment. Is the check done from the side of the zabbix-get on connecting?

    If yes, how is this check performed?

    Any tips welcome!

    Kind regards

    Allard
  • allardkrings
    Junior Member
    • Oct 2020
    • 5

    #2
    i have made some progress. My java program reacts to a zabbix_get request asking for agent.version: zabbix_get -s 127.0.0.1 -p 10052 -k agent.version.

    The input my java-program reads is “ZBXD “ thats all, no key “agent.version” is read. The agent returns an empty response. Am I reading the Zabbix-request the wrong way from the socket?

    Please help!

    Comment

  • allardkrings
    Junior Member
    • Oct 2020
    • 5

    #3
    I have a java-prototype working on z/OS now. I am now trying to write a Zabbix agent in REXX.

    I am having trouble writing the output in the correct format.

    in PYTHON the code is:

    packet = "ZBXD\1" + struct.pack('<Q', len(data)) + data

    How do I code this in REXX?

    any help appreciated!
    ​​​​​​​

    Comment

    Working...