Ad Widget

Collapse

Zabbix_Sender Disable Trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arne
    Junior Member
    • Jul 2022
    • 5

    #1

    Zabbix_Sender Disable Trigger

    In the previous version of Zabbix 5.4 you could disable a trigger via the Zabbix sender by doing a
    Zabbix_Sernder -z Zabbix -s ServerName -k event.mainteance.trigger -o "enable:ID's of triggers to stop" (The Enable is to start the Maintenance event)
    That does not work in version 6, has anyone found the new syntax for making that work again?
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    "event.mainteance.trigger" is a non-standard zabbix function.
    See in the host setting how the "event.mainteance.trigger" item was created and what happens when this gets a value (I suspect that javascript preprocessing with API access is used )

    Comment

    • Arne
      Junior Member
      • Jul 2022
      • 5

      #3
      Yes I know the event is not a standard, that is one I have created, but the function call to disable triggers is the thing that stopped working from the new version.
      I do get the notification that the server i input is going in to maintenance but the triggers keeps running, and previously if you input there ID they would turn off (disable)

      Comment


      • Hamardaban
        Hamardaban commented
        Editing a comment
        I'll write again - since you did it, then only you know how it works. Either publish the full settings of the components used or figure it out yourself. If API calls were used, refer to the documentation to identify changes.
    • Arne
      Junior Member
      • Jul 2022
      • 5

      #4
      The expressions I have set up for the Maintenance event is as follows

      find(/server125/event.maintenance.trigger.1,,"like","disable")=1
      and find(/server125/event.maintenance.trigger.1.msg,,"regexp",".*")=1

      I believe that should set the trigger id's to disabled when called with "-o disabled:id1,id2"
      I think I misunderstood what you were asking me, and I hope this is more explanatory.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #5
        How are event.maintenance.trigger.1 and event.maintenance.trigger.1.msg items configured?

        Markku

        Comment


        • Hamardaban
          Hamardaban commented
          Editing a comment
          Especially the preprocessing tab!
      • Arne
        Junior Member
        • Jul 2022
        • 5

        #6
        I have taken a few screenshots of the setup, so you might be able to gather a more full picture.

        Click image for larger version

Name:	Event Maintenance trigger.jpg
Views:	655
Size:	39.2 KB
ID:	448829 Click image for larger version

Name:	Event Maintenance PreProcessing.jpg
Views:	658
Size:	10.1 KB
ID:	448827
        Click image for larger version

Name:	Event Maintenance message.jpg
Views:	656
Size:	49.3 KB
ID:	448830 Click image for larger version

Name:	Event Maintenance message Preprocessing.jpg
Views:	637
Size:	34.1 KB
ID:	448828
        Click image for larger version

Name:	Maintenance Trigger.jpg
Views:	666
Size:	82.2 KB
ID:	448831

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1782

          #7
          Ok so the first item is a trapper item that just gets the value that is sent with zabbix_sender. The second item is a dependent item, just copying the contents of the first item (if I got it correctly).

          So, how are your actions configured? There must be something that does something when the trigger fires.

          Markku

          Comment

          • Arne
            Junior Member
            • Jul 2022
            • 5

            #8
            Thank you for you input guys, it got my troubleshooting running, I have found that I have had to modify the script to use localhost instead of name and then its now working again.

            Comment

            Working...