Ad Widget

Collapse

Problems with String TRIGGER EXPRESSION

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AbrahamAvanzaIT
    Junior Member
    • May 2021
    • 6

    #1

    Problems with String TRIGGER EXPRESSION

    Hi,

    I´m trying to create a trigger with a extern check item which returns me a string ("Successful").

    I´ve tried .last(), .iregexp(), .str(), but anything makes the trigger alerts me.

    The item works, if I click in Test the item, it returns me the "Successful" value and the trigger expression is right too if a I probe it.

    Any ideas?

    Thanks in advance, and sorry for my English level and zabbix experience...

    PS: I include some snapsshots...

    Click image for larger version

Name:	testSuccessful.jpg
Views:	1895
Size:	45.2 KB
ID:	435284

    Click image for larger version

Name:	Trigger.jpg
Views:	1866
Size:	78.0 KB
ID:	435285

    Click image for larger version

Name:	TriggerTestFalse.jpg
Views:	1841
Size:	32.7 KB
ID:	435286

    Click image for larger version

Name:	triggerTestTrue.jpg
Views:	1847
Size:	31.7 KB
ID:	435287

  • Sofia Aguilar
    Junior Member
    • Nov 2021
    • 3

    #2

    Hi, inside the parentheses you must put the word successful and make it equal to 1 so that it is true for example so it would be .last ("successful")} = 1

    Comment

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

      #3
      Originally posted by Sofia Aguilar
      Hi, inside the parentheses you must put the word successful and make it equal to 1 so that it is true for example so it would be .last ("successful")} = 1
      That's not how you can use last() function
      last (<sec|#num>,<time_shift>)
      There is no option to add anything like suggested...

      Comment

      • vicbc
        Member
        • Nov 2021
        • 39

        #4
        Hey there Abraham.

        Let me understand it better.
        You want a trigger that will fire when the "Daily copy has failed".
        And you're complaining that everything is making the Trigger Fire right?

        I think that you mixed up the logic there.
        If you want it to fire only when the copy has FAILED, then your trigger function should be like:

        <item_key>.last() <> "Successful"

        The way it is set, it will fire the trigger every time the "item Value" = Sucessful.

        In the test you're making for the trigger (probar) when it says "FALSE" it's because the trigger didn't fire. So it's not working with "Failed".
        When it says "TRUE" it means the trigger is working with those conditions. So it is firing everytime it says "Successful"

        Let me know if it helped!.

        PS.:
        Don't worry about your english it's pretty much understandable


        Comment


        • AbrahamAvanzaIT
          AbrahamAvanzaIT commented
          Editing a comment
          Hi Vicbc !! Thanks for answer!

          That is not the problem, my trigger is like that to probe that trigger works, but it doesnt ...
          Im working on it yet. Three days ago I realized the external check which returns me the "succesful value" dont execute when it have to. When the item have to execute (interval = 30m) it enters in the zabbbix queue and stay there forever.

          This fact makes me think maybe it is not a trigger problem, the trigger doesnt alerts me because it doesnt have any value to alert !!

          Maybe the problem is harder, why the external check item enter in queue? I probe permissions, timeout in zabbix_proxy.conf ... but nothing works. Any ideas?

          Thanks for answer again! The zabbix community is really helpful for the noobies like me!!
      Working...