Ad Widget

Collapse

Zabbix Trigger {ITEM.LASTVALUE} doesn't update after created

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andvsilva
    Member
    • Aug 2020
    • 39

    #1

    Zabbix Trigger {ITEM.LASTVALUE} doesn't update after created

    Hello,

    I'm using Zabbix Server 5.0 and Zabbix Agent2. So I created a trigger and that trigger doesn't change '{ITEM.LASTVALUE}' in problems.

    For example the Trigger will show to the user "There are 2/10 server with problem check them" but the next checks maybe increse or decrease this numbers, for example the next check is increased so the Trigger name need to changed to "There are 8/10 server with problem check them".

    My trigger expression:

    Code:
    {Jobs_Monitoring:GetIntegrador.DescErro[IP_Server].last(#3)}<>"OK"
    Trigger name is:

    Integrador - DescErro: {ITEM.LASTVALUE1}
    How can I do it? I tried changing to '{ITEM.LASTVALUE1}' but doesn't help.

    If I check the last value of item is correct, showing all the last value that I got from script, but the trigger name doesn't until the problem is solved so the next trigger name is changed.
    Last edited by andvsilva; 19-04-2021, 15:27.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2


    Operational data Operational data allow to define arbitrary strings along with macros. The macros will resolve dynamically to real time data in MonitoringProblems. While macros in the trigger name (see above) will resolve to their values at the moment of a problem happening and will become the basis of a static problem name, the macros in the operational data maintain the ability to display the very latest information dynamically.
    The same set of macros is supported as in the trigger name.
    Supported since Zabbix 4.4.0.

    Comment

    • andvsilva
      Member
      • Aug 2020
      • 39

      #3
      Hi Hamardaban, I tried put this on 'Operational data' but still doesn't changing. Follow my trigger configuration on print.

      Click image for larger version  Name:	Trigger1.png Views:	0 Size:	47.8 KB ID:	423171

      Now for example I have '7/43' but trigger was created with '2/43' so in problems trigger still on '2/43'

      Click image for larger version  Name:	Trigger2.png Views:	0 Size:	5.7 KB ID:	423172

      Look the timestamp:

      Click image for larger version  Name:	Trigger3.png Views:	0 Size:	4.0 KB ID:	423173

      Also I tried changing: 'Integrador - DescErro: {ITEM.LASTVALUE}' to 'Integrador - DescErro: {ITEM.LASTVALUE1}' but doesn't fix ti.
      Last edited by andvsilva; 20-04-2021, 13:32.

      Comment

      • andvsilva
        Member
        • Aug 2020
        • 39

        #4
        Originally posted by cyber
        ITEM.LASTVALUE will display last value... If you add it to operational data, it still resolves to last value, whereever you look at it.. Only place it keeps its "at the time of event" value, is in trigger name field. And even that is not really "keeping a value" but fully resolved trigger name is "frozen" in problem name as text.
        If you use {ITEM.VALUE} there in operational data, then at least in event view you will have "at the time of event" value there... I am not sure about problem view...
        hi cyber I tried put this look at the pictures from my last post. The configuration of the trigger is:

        Name: Integrador - DescErro: {ITEM.LASTVALUE}
        Operational Data: Integrador - DescErro: {ITEM.LASTVALUE1}
        When I look at the lastest data is OK, showing correct value, but trigger name continue freezed.

        Comment

        • andvsilva
          Member
          • Aug 2020
          • 39

          #5
          Originally posted by cyber
          It is a feature to keep it in problem view as it was in the time of problem generation. If you click on that timestamp, it takes you to event page, where you can see that lastvalue in both current (trigger details and operational data) and also "at the time of event" forms (event details)
          Yes It I saw, the problem is operational group they request that values change in the problem page. But it is static doesn't change at all.

          Comment

          • andvsilva
            Member
            • Aug 2020
            • 39

            #6
            Hello everyone,

            I solved my question.

            I left trigger name as 'Integrador - DescErro:' and operational data as '{ITEM.LASTVALUE}'. Then I change problem page to show 'Operational data' I didn't do it before.

            Now trigger works as I expected.

            Thanks Gyus.

            Comment


            • guille.rodriguez
              guille.rodriguez commented
              Editing a comment
              You help to discover a new way to show the triggers. I thougth that Zabbix need to implement something like this (update trigger value), now I discover that this feature already exists.

              Thx man!
          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #7
            ITEM.LASTVALUE will display last value... If you add it to operational data, it still resolves to last value, whereever you look at it.. Only place it keeps its "at the time of event" value, is in trigger name field. And even that is not really "keeping a value" but fully resolved trigger name is "frozen" in problem name as text.
            If you use {ITEM.VALUE} there in operational data, then at least in event view you will have "at the time of event" value there... I am not sure about problem view...

            Comment

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

              #8
              It is a feature to keep it in problem view as it was in the time of problem generation. If you click on that timestamp, it takes you to event page, where you can see that lastvalue in both current (trigger details and operational data) and also "at the time of event" forms (event details)

              Comment

              Working...