Ad Widget

Collapse

Incoming Webhook into Zabbix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tralston
    Junior Member
    • May 2020
    • 4

    #1

    Incoming Webhook into Zabbix?

    I'm somewhat familiar with how webhooks work, and how they work in Zabbix. The webhooks are a (media) pushing mechanism out to other external services via HTTP/S. What I'd like to do is find a way to perform the reverse operation: have an external service push data to Zabbix over HTTP/S. Can this be accomplished with the current/almost released version of Zabbix? (i.e. data originates from external service, pushed to Zabbix, then recorded in some item somewhere on some host).

    The only workaround I could think of was to have my own custom http server listening at a certain port, exposed to the internet, that receives pushed data, and somehow passes it on to Zabbix on our internal network. But I haven't figured out how to get it into Zabbix yet, since Zabbix usually checks for things periodically, it doesn't actively wait for something to push to it, right?
  • tralston
    Junior Member
    • May 2020
    • 4

    #2
    Thank you splitek for the quick answer. It sounds like trapper items are the way to go. In the second link you provide, it says:

    In the simplest of cases, we may use zabbix_sender utility to send in some 'test value':
    What are the other ways to send in values to Zabbix without useing the zabbix_sender command? Could I send data in without having the sender utility installed on the originating machine?

    Comment

    • tralston
      Junior Member
      • May 2020
      • 4

      #3
      Thanks splitek . I'll give that a try.

      Comment

      • zaheerabbas1988
        Junior Member
        • Feb 2020
        • 22

        #4
        Originally posted by tralston
        Thanks splitek . I'll give that a try.
        Hi @tralston​, did you manage to find any efficient way to handle this? I am also looking for a way to receive and process incoming webhook from Juniper MIST and it would be really helpful if I could get any lessons learned from you

        Comment

        • Bdoydie
          Junior Member
          • Jun 2022
          • 2

          #5
          Did you manage to figure this out? As im needing something similar and i cannot see any replies to the OP's comments to help me out

          Comment

          • tralston
            Junior Member
            • May 2020
            • 4

            #6
            I have not.

            Comment

            • PeterZielony
              Senior Member
              • Nov 2022
              • 146

              #7
              Well it depends from where you want to push it in.


              Zabbix api doesn't allow pushing metrics in.

              But there are few "clientless" (without zbx sender) clients - still require work on caller side regardless but im pretty sure it is possible from each platform.

              Recently one of our devs approached me as they want to integrate some logging from .net and we tested it out and works (6.2) to trapper.

              https://www.nuget.org/packages/Seril...nfiguration%3A

              ​​i guess you can wrap this around http and send it directly


              Another approach would be some sorts powershell clientless code (was looking recently for one)
              https://www.powershellgallery.com/pa...ZabbixTrap/1.2
              (Did not test it yet)


              Or .. found this, but again i had not time to test it but sounds promising. Http relay with MQTT
              It's zabbix relay that can send data to your zabbix server using POST or GET requests and MQTT. - leruetkins/zbx-np


              Maybe would be possible to docker it and deploy along with supported msg broker - but not needed (love to see it with rabbitmq)
              Last edited by PeterZielony; 25-09-2023, 22:23.

              Hiring in the UK? Drop a message

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                We used to have a small web server, that accepted data over http(s) and emulated trapper on the background. Some people considered it easier to use that installing a sender binary and use it...
                definitions are here https://www.zabbix.com/documentation.../items/trapper and here https://www.zabbix.com/documentation...header_datalen

                Comment


                • PeterZielony
                  PeterZielony commented
                  Editing a comment
                  do you still have this small web server as a package maybe? or is it just a bespoke service w/o documentation?
              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #9
                It was someones quick test of skill without much docs... by now disappeared into closet of lost items...

                Comment

                • zaheerabbas1988
                  Junior Member
                  • Feb 2020
                  • 22

                  #10
                  Originally posted by zaheerabbas1988

                  Hi @tralston​, did you manage to find any efficient way to handle this? I am also looking for a way to receive and process incoming webhook from Juniper MIST and it would be really helpful if I could get any lessons learned from you
                  I end up creating a bash script to satisfy this requirement, here is the github repo if someone is interested to have a look:
                  Zabbix 6.x does not support incoming webhooks, So this is a simple bash implementation for a daemon listening to webhook calls and then send the same to zabbix - zaheerabbas1988/bash-webhook_listen...

                  Comment


                  • karam
                    karam commented
                    Editing a comment
                    Hi @zaheerabbas1988
                    does it support http
                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4807

                  #11
                  There is a thing in roadmap for v7.. https://support.zabbix.com/browse/ZBXNEXT-5731 Item Type Webhook

                  Comment

                  Working...