Ad Widget

Collapse

Triggers get overwritten after Template Update

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kiki
    Junior Member
    • Sep 2023
    • 3

    #1

    Triggers get overwritten after Template Update

    Hi everyone,

    I am using a template to monitor all of my systems. For some systems I had to adjust certain triggers because they were being too sensitive. I do that by cloning the trigger from the template on the host itself and then adjust the value in the new trigger. Then I disable the trigger coming from the template.
    Now, whenever I push an update for my template, the trigger from the template gets enabled again and there are two triggers with different values enabled. How do I prevent this trigger from enabling itself again after updating the template?

    Thank you so much for your help!
  • Answer selected by kiki at 12-09-2023, 08:55.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    No.. How would it know, which one is now replaced and which one not.. ?

    I do not know exactly how you "adjusted" those triggers, but for changing thresholds you usually do not need to change trigger but add a host level macro with "local" threshold... That way trigger expression is always the same but calculated against different thresholds...

    Comment

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

      #2

      Find that trigger in template file and modify its status.
      add "status: DISABLED" to that trigger config. It is not there if trigger is enabled
      Example...
      Code:
            items:
              - uuid: 838f1975d70742f695e6b4d82ef3654a
                name: 'Number of zombie processes'
                key: 'proc.num[,,zomb]'
                triggers:
                  - uuid: a87e6895a157433c8eb60384111da11e
                    expression: 'avg(/Template/proc.num[,,zomb],5m)>2'
                    name: 'Too many zombie processes on host'
                    status: DISABLED
                    manual_close: 'YES'

      Comment

      • kiki
        Junior Member
        • Sep 2023
        • 3

        #3
        Thank you. But will this not also disable the trigger for all the hosts that are actually configured by the template?

        Comment

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

          #4
          Originally posted by kiki
          Thank you. But will this not also disable the trigger for all the hosts that are actually configured by the template?
          true... it will be disabled everywhere.

          Comment

          • kiki
            Junior Member
            • Sep 2023
            • 3

            #5
            Originally posted by cyber

            true... it will be disabled everywhere.
            I'd need a solution for it to only be disabled when the trigger gets changed manually. The other hosts still need the trigger as it is in the template. Do you have any suggestions for that?

            Comment

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

              #6
              No.. How would it know, which one is now replaced and which one not.. ?

              I do not know exactly how you "adjusted" those triggers, but for changing thresholds you usually do not need to change trigger but add a host level macro with "local" threshold... That way trigger expression is always the same but calculated against different thresholds...

              Comment

              • jalenkylian
                Junior Member
                • Sep 2023
                • 1

                #7
                How can I ensure that template-triggered adjustments persist and prevent re-enabling upon template updates in my system monitoring setup?

                Comment

                Working...