Ad Widget

Collapse

Zabbix API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • develo999
    Junior Member
    • Mar 2019
    • 17

    #1

    Zabbix API

    does Zabbix has an API, to which i can send XML or JSON or any other format,
    that will raise and alarm or remove it?
  • brunohl
    Senior Member
    Zabbix Certified Specialist
    • Mar 2019
    • 215

    #2
    I don't know if I got what you mean, but Zabbix has an API to close events:

    Comment

    • develo999
      Junior Member
      • Mar 2019
      • 17

      #3
      thanks, this is only close event,
      i want also raise event using API.

      Comment

      • brunohl
        Senior Member
        Zabbix Certified Specialist
        • Mar 2019
        • 215

        #4
        I guess that's not possible.

        The only way to raise an event that I know is to make an item value activate a trigger. What you could do is use zabbix_sender to send data activate a custom trigger for each problem you want to create.

        Comment

        • develo999
          Junior Member
          • Mar 2019
          • 17

          #5
          can i test and make alert from command line?

          Comment

          • brunohl
            Senior Member
            Zabbix Certified Specialist
            • Mar 2019
            • 215

            #6
            You will not create an alert from command line, you will send a value to an item that will activate a trigger, thus creating a problem.

            Comment

            • develo999
              Junior Member
              • Mar 2019
              • 17

              #7
              ok how can i do that? only with an agent?

              Comment

              • brunohl
                Senior Member
                Zabbix Certified Specialist
                • Mar 2019
                • 215

                #8
                Actually you can use something that wraps zabbix_sender, like (https://www.npmjs.com/package/node-zabbix-sender) or event zabbix_sender cli (https://www.zabbix.com/documentation...oncepts/sender) and use Zabbix Trapper on item configuration.

                Comment

                • kloczek
                  Senior Member
                  • Jun 2006
                  • 1771

                  #9
                  Originally posted by develo999
                  thanks, this is only close event,
                  i want also raise event using API.
                  You cannot do that.
                  Events are created by triggers .. automatically.
                  Zabbix it is not ticket system. It is monitoring software which means that this software processes monitoring data and as few types of the outcomes are produced out of those data alarms.
                  Rising alarm manually would change zabbix to something which no longer would be monitoring software.
                  http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                  https://kloczek.wordpress.com/
                  zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                  My zabbix templates https://github.com/kloczek/zabbix-templates

                  Comment

                  • develo999
                    Junior Member
                    • Mar 2019
                    • 17

                    #10
                    How event is raised today?
                    you setup a trigger and the zabbix event send an alert to the server.
                    i look for tha API solution becuase there are system that can send http but can't install an agent on them.

                    Comment

                    • develo999
                      Junior Member
                      • Mar 2019
                      • 17

                      #11
                      Originally posted by brunohl
                      Actually you can use something that wraps zabbix_sender, like (https://www.npmjs.com/package/node-zabbix-sender) or event zabbix_sender cli (https://www.zabbix.com/documentation...oncepts/sender) and use Zabbix Trapper on item configuration.
                      brunohl - this can be good solution too, where can i get the command tool?

                      Comment

                      • ZaBeast
                        Member
                        • Sep 2019
                        • 42

                        #12
                        zabbix_sender tool comes with agent, just install Zabbix agent.

                        Comment

                        Working...