Ad Widget

Collapse

Resolve messages to kafka topic - more metadata

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vidmarja
    Junior Member
    • Nov 2025
    • 1

    #1

    Resolve messages to kafka topic - more metadata

    Hi!

    We are setting up zabbix as a new control mechanism. We have a custom build application which follows the state of "business services". Each "business service" is set up from multiple control of application, servers, etc. and based on the state of each elements our application calculates the state of "business service". It works based on error and resolve messages. If any critical application gets an error message inside a certain "business service" the whole service will get state "error". Business service will go to "OK" state after application recevied "resolve messages" from source.

    We use kafka to get events to our custom application. I have set up zabbix kafka connector to send events into kafka topic.

    After some intial test I have realised that zabbix resolve events does not include any metadata. It just includes "id" of "previous event" ("p_eventid").
    example of resolve event:
    HTML Code:
    {
      "clock": 1763968176,
      "eventid": 49891,
      "ns": 269135700,
      "p_eventid": 49775,
      "value": 0
    }
    Our custom application is used to get all the info with every events (resolve or error).

    Is it possible to get more metadata for "resolve events"? Like to configure zabbix so it would send more information?

    I have searched the web and zabbix documentation and have found nothing of sorts :/
    Even my prompt to chatgpt got negative from the start

    Before I started developing a custom logic I just wanted to make sure this is not possible .

    Any help will be appreciated

    Best regards,
    vidmarja
  • Viktors Fomics
    Member
    • Oct 2025
    • 42

    #2
    Hello

    In the resolved event information that you have provided, you can see the related event ID (p_eventid). It is possible to make a Zabbix API call using event.get method with that ID (from the resolve event) as input parameter:

    {
    "jsonrpc": "2.0",
    "method": "event.get",
    "params": {
    "eventids": [p_eventid],
    "output": "extend",
    "selectHosts": ["hostid", "name"],
    "selectRelatedObject": ["triggerid", "description", "priority"]
    },
    "id": 1
    }


    This call should return the metadata of the problem event.

    Comment

    Working...