Ad Widget

Collapse

Issues with custom LLD / autodiscovery creation of prototype

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issues with custom LLD / autodiscovery creation of prototype

    Hey guys - Trying to figure out what's missing in our setup. We are trying to leverage a custom zabbix / mirth project (https://github.com/cboyer/mirth-zabbix/) and have been having issues getting it to work. After much research and testing, we finally got headers and payload to match when compared to other working discovery rules. Our Zabbix server is talking to the "Zabbix Agent" and is returning valid JSON payload with no errors in Zabbix server logs. This is the same experience when we telnet to the agent interface port and send the key items.

    The problem is that Zabbix does not take the marco / value pairs that are returned and do anything with them. There is no follow up requests from the server to the agent for the defined item prototypes in the template. I'm stumped and have been working on this for a couple weeks, not really sure what to try next and would greatly appreciate any assistance!

    Code:
    Example server request / response (HexDump view from WireShark pcap file)
    
    Request from Zabbix server to agent interface:
    00000000 5a 42 58 44 01 17 00 00 00 00 00 00 00 6d 69 72 ZBXD.... .....mir
    00000010 74 68 2e 64 69 73 63 6f 76 65 72 79 2e 63 68 61 th.disco very.cha
    00000020 6e 6e 65 6c nnel
    
    Response from agent interface to Zabbix server:
    00000000 5a 42 58 44 01 b8 00 00 00 00 00 00 00 7b 22 64 ZBXD.... .....{"d
    00000010 61 74 61 22 3a 5b 7b 22 7b 23 49 44 7d 22 3a 22 ata":[{" {#ID}":"
    00000020 38 33 38 37 36 62 38 65 2d 66 34 64 66 2d 34 62 83876b8e -f4df-4b
    00000030 62 35 2d 61 38 66 64 2d 38 66 65 63 62 38 30 30 b5-a8fd- 8fecb800
    00000040 33 32 66 63 22 2c 22 7b 23 4e 41 4d 45 7d 22 3a 32fc","{ #NAME}":
    00000050 22 7a 7a 7a 54 6f 6d 73 20 44 61 74 61 20 52 65 "zzzToms Data Re
    00000060 70 6c 61 79 20 63 68 61 6e 6e 65 6c 20 39 39 30 play cha nnel 990
    00000070 30 22 7d 2c 7b 22 7b 23 49 44 7d 22 3a 22 61 65 0"},{"{# ID}":"ae
    00000080 30 62 37 64 37 35 2d 35 63 65 31 2d 34 38 34 62 0b7d75-5 ce1-484b
    00000090 2d 61 66 65 30 2d 61 66 66 36 66 61 34 31 32 30 -afe0-af f6fa4120
    000000A0 37 33 22 2c 22 7b 23 4e 41 4d 45 7d 22 3a 22 5a 73","{#N AME}":"Z
    000000B0 61 62 62 69 78 20 4d 6f 6e 69 74 6f 72 69 6e 67 abbix Mo nitoring
    000000C0 22 7d 5d 7d "}]}
    
    ASCII JSON payload returned to Zabbix server:
    ZBXD.........{"data":[{"{#ID}":"83876b8e-f4df-4bb5-a8fd-8fecb80032fc","{#NAME}":"zzzToms Data Replay channel 9900"},{"{#ID}":"ae0b7d75-5ce1-484b-afe0-aff6fa412073","{#NAME}":"Zabbix Monitoring"}]}
    Thanks,
    Jay

    #2
    zabbix_server.log shows this agent check fails and comes available regularly, could this change in status "not available" be why the received JSON payload is not being processed as expected? I understand we're doing low-level communication by emulating a zabbix agent, but trying to understand all the pieces that need to be in place for that so we can identify root cause around why item / trigger prototypes are not being created.

    Code:
    12921:20190221:145632.532 enabling Zabbix agent checks on host "SERVERNAME": host became available
    12921:20190221:145702.552 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: first network error, wait for 15 seconds
    12921:20190221:145722.567 resuming Zabbix agent checks on host "SERVERNAME": connection restored
    12921:20190221:145732.574 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: first network error, wait for 15 seconds
    12921:20190221:145802.592 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: another network error, wait for 15 seconds
    12921:20190221:145832.606 temporarily disabling Zabbix agent checks on host "SERVERNAME": host unavailable
    12921:20190221:145932.632 enabling Zabbix agent checks on host "SERVERNAME": host became available
    12921:20190221:150002.655 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: first network error, wait for 15 seconds
    12921:20190221:150022.672 resuming Zabbix agent checks on host "SERVERNAME": connection restored
    12921:20190221:150032.680 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: first network error, wait for 15 seconds
    12921:20190221:150102.693 Zabbix agent item "mirth.discovery.channel" on host "SERVERNAME" failed: another network error, wait for 15 seconds
    12921:20190221:150132.709 temporarily disabling Zabbix agent checks on host "SERVERNAME": host unavailable
    12921:20190221:150232.743 enabling Zabbix agent checks on host "SERVERNAME": host became available

    Comment


      #3
      Channel agent is responding via telnet as expected, as well as responding to the default agent.* keys sent over. Anyone got any ideas on things to look at next?!

      Thanks,
      Jay

      Comment


        #4
        is this forum just a net to catch bot spam?

        Comment


          #5
          hello

          i'm trying too the mirth plugin, with zabbix 4.2.2 and mirth 3.4.1

          but i can't make it works. When i launch a discovery, mirth tell me the end of message (<LF>) could not be found on the message. So it can't be parsed.

          did you changed something on the source of the mirthx channel ?

          Comment

          Announcement

          Collapse
          No announcement yet.
          Working...
          X