Ad Widget

Collapse

Is there a way to zabbix receive events via api?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rafaelbs
    Junior Member
    • May 2019
    • 2

    #1

    Is there a way to zabbix receive events via api?

    Hi,

    I am looking for way to receive data from an app and register it under an item. If something goes wrong in the app, it will send some info to zabbix and generate an action. Does zabbix api support it? If no, does anybody know about some work around to make it work?

    regards.
    Rafael
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    The Zabbix server can receive data from applications using the zabbix_sender command. First, create an item of type "Zabbix Trapper" as an item. When executing the zabbix_sender command, by specifying the host and item name and value, the Zabbix server can receive it as an item value like a normal item. After that, by setting a trigger for the value of the item, Zabbix server can execute an action by judging it as failure when it receives an outlier.

    You do not need to use the Zabbix API.

    Manual:

    Comment

    • rafaelbs
      Junior Member
      • May 2019
      • 2

      #3
      What if I can not have zabbix_sender or zabbix_agent installed on the host that runs the application? The focus is like, app has an event/error, then it sends a POST to zabbix server that will judge it as failuere or not, and trigger some action.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        In order to notify Zabbix server directly from an environment where Zabbix agent cannot be installed, it is necessary to use zabbix_sender command or a protocol compatible with zabbix_sender. Even in this case, it is necessary to install some program or script.
        If nothing can be installed, it is necessary to prepare a separate mechanism to notify the external server of the already installed one. For Zabbix server, it is not possible to pass the value directly by POST using HTTP protocol. If you can only POST from the monitoring target, you need to create a separate mechanism to receive it and notify the Zabbix server. There is a method to notify the server that can install Zabbix agent by POST, output the contents to a log file, and monitor the log file with Zabbix.

        Comment

        Working...