Ad Widget

Collapse

Macro in trigger not updating

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jason
    Senior Member
    • Nov 2007
    • 430

    #1

    Macro in trigger not updating

    Something I've noticed on our current version (4.2.5, but are starting to plan upgrade to 5.0) is that when a trigger with a macro in the name such as {ITEM.LASTVALUE1} doesn't update. I can see this is as per the documentation on https://www.zabbix.com/documentation...ed_by_location which changed in 4.0.I see this is a change in how the triggers are stored. Previously it was really useful to have the trigger name updating as the value changed and it seem a retrograde step to have this fixed at point of triggering. I know we can add latest data to the screen, but it was very helpful to have trigger name updating. For example a trigger name of "Less than 10% disk space remaining on c: (8.75%)" and then as that percentage changed you could see how urgent the trigger was. i.e. 9.5% left is not as bad as 1% left.
    Last edited by Jason; 14-10-2020, 14:44.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    It's a loooong story that started here: https://support.zabbix.com/browse/ZBXNEXT-4792
    Long story short: since 4.4 you have the Operational data for live macros (second text field from the top): https://www.zabbix.com/documentation...iggers/trigger
    Additionally, in 5.2 you get the possibility to set the name of the events that a trigger generates. A new field "Event name" will let you specify the name with macro values corresponding to the time of the event. The feature is ready (you are welcome to try out 5.0.2rc1), but not yet documented, it will appear there ASAP here: https://www.zabbix.com/documentation...iggers/trigger
    Last edited by dimir; 14-10-2020, 14:30.

    Comment

    • Jason
      Senior Member
      • Nov 2007
      • 430

      #3
      Originally posted by dimir
      It's a loooong story that started here: https://support.zabbix.com/browse/ZBXNEXT-4792
      Long story short: since 4.4 you have the Operational data for live macros (second text field from the top): https://www.zabbix.com/documentation...iggers/trigger
      Additionally, in 5.2 you get the possibility to set the name of the events that a trigger generates. A new field "Event name" will let you specify the name with macro values corresponding to the time of the event. The feature is ready (you are welcome to try out 5.0.2rc1), but not yet documented, it will appear there ASAP here: https://www.zabbix.com/documentation...iggers/trigger
      Thank you for this.
      The operational data could be interesting as a workaround till 5.2 is released. Will the event name in 5.2 operate in the same was as it used to in showing the {ITEM.LASTVALUE<X>} in the name on problems screen and is there any data on the performance hit caused by this change?

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        The event name will not be the same as trigger name used to be. If that helps, since 4.4:

        - trigger name: {ITEM.LASTVALUE} evaluates to the value that caused a trigger to fire
        - operational data: {ITEM.LASTVALUE} evaluates to current value
        - event name: {ITEM.LASTVALUE} evaluates to the value that caused event generation (be that problem event or recovery event, their names will be different, and the name will be stored in the database)

        If you don't specify event name it will duplicate trigger name:
        Attached Files
        Last edited by dimir; 14-10-2020, 16:19.

        Comment

        • Jason
          Senior Member
          • Nov 2007
          • 430

          #5
          So operational data is still the only field that will show current value? I think I've got a little confused as I think from that description that trigger name and event name equate to the same thing?

          So for example a trigger for low disk fires at disk <10% (9.55) when the value suddenly drops from 10.1% to 9,5%.

          The trigger name is "low disk space <10% {ITEM.LASTVALUE}" which shows "low disk space <10% (9.5%)". at this point operational data will show the same. and event name will show the same (assuming same formula in both).?

          next time data comes in then there is 5% free.

          Trigger name will still show "low disk space <10% (9.5%)" Operational data will show "low disk space <10% (5%)". Event name shows "low disk space <10% (9.5%)" ?

          Reading that I think I'd want operational data, but is that still an extra field rather like latest data currently is?

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #6
            Yes, it's all correct. Other than for events you might want a completely different name, and with more macros perhaps. For live data - the only way is Operational data, since 4.4 .

            Comment

            • Jason
              Senior Member
              • Nov 2007
              • 430

              #7
              Cheers for that.

              I see a lot of disquiet on that zbxnext link and another based off that. Are there going to be any changes to make the displayed name at least look more like it used to?

              Comment

              • dimir
                Zabbix developer
                • Apr 2011
                • 1080

                #8
                Naah, didn't hear anything like that. I think you have to accept the current behaviour.

                Comment

                Working...