Ad Widget

Collapse

Trigger on string change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvrasmussen
    Junior Member
    • Apr 2011
    • 14

    #16
    Originally posted by Davidus
    In this case I`m out of options, sorry
    It's fine, many thanks for your help

    Mayby we have now got the facts right and someone else mayby have the golden answer

    Comment

    • Davidus
      Senior Member
      • Dec 2010
      • 281

      #17
      by the way, which version of zabbix are you running on?

      Comment

      • mvrasmussen
        Junior Member
        • Apr 2011
        • 14

        #18
        Originally posted by Davidus
        by the way, which version of zabbix are you running on?
        1.8.3 -is that a problem? i have many many machines i would have to upgrade the client on

        Comment

        • Davidus
          Senior Member
          • Dec 2010
          • 281

          #19
          Originally posted by mvrasmussen
          1.8.3 -is that a problem? i have many many machines i would have to upgrade the client on
          yes, unfortunately this is a problem
          strlen This function is supported since Zabbix 1.8.4.

          http://www.zabbix.com/documentation/...onfig/triggers

          Comment

          • mvrasmussen
            Junior Member
            • Apr 2011
            • 14

            #20
            hmm damn.. okay i will see to if i can upgrade the zabbix server, the documentation states that i don't need to upgrade my clients for that

            Comment

            • Davidus
              Senior Member
              • Dec 2010
              • 281

              #21
              Code:
              {HP LaserJet P2055dn:display.diff(0)}>0
              In this case your trigger will fire up on string value change, however, this condition has downside as well
              So if value of item is "Ready " and item receives new value like "Load Paper" - trigger will fire up, however, if item receives this value again it will be acknowledged as normal and there will be no longer trigger active. And if after a while you`ll receive "Ready " again, your trigger will fire up and so on…

              See diff function
              http://www.zabbix.com/documentation/...onfig/triggers

              there might be something i`m missing about this function and you`ll be able to accomplish your goal

              Comment

              • Davidus
                Senior Member
                • Dec 2010
                • 281

                #22
                I got it
                {HP LaserJet P2055dn:display.str(Load Paper)}
                shell work!!!!!!!!

                Comment

                • mvrasmussen
                  Junior Member
                  • Apr 2011
                  • 14

                  #23
                  Originally posted by Davidus
                  I got it
                  {HP LaserJet P2055dn:display.str(Load Paper)}
                  shell work!!!!!!!!
                  I Have now upgraded my zabbix server installation to 1.8.5 and tried this one -with no luck. It does not trigger when the field changes (Can see it change allright in the Latest Data)

                  Comment

                  • MrKen
                    Senior Member
                    • Oct 2008
                    • 652

                    #24
                    You did remember to put the =1 at the end, right?

                    {HP LaserJet P2055dn:display.str(Load Paper)}=1

                    Also, if Load Paper is referring to the Item key 'paper', then it would be

                    {HP LaserJet P2055dnaper.str(Load Paper)}=1

                    Failing that, keep in mind that the string is case sensitive, for example - Load paper.


                    MrKen
                    Last edited by MrKen; 30-06-2011, 13:57. Reason: Disable smilie
                    Disclaimer: All of the above is pure speculation.

                    Comment

                    • mvrasmussen
                      Junior Member
                      • Apr 2011
                      • 14

                      #25
                      Originally posted by MrKen
                      You did remember to put the =1 at the end, right?

                      {HP LaserJet P2055dn:display.str(Load Paper)}=1

                      Also, if Load Paper is referring to the Item key 'paper', then it would be

                      {HP LaserJet P2055dnaper.str(Load Paper)}=1

                      Failing that, keep in mind that the string is case sensitive, for example - Load paper.


                      MrKen
                      That seemed to do the trick -thanks!

                      Comment

                      • Davidus
                        Senior Member
                        • Dec 2010
                        • 281

                        #26
                        my trigger looked exactly like this
                        Code:
                        {HP LaserJet P2055dn:display.str(Load Paper)}
                        I tested it and it worked for me. Trigger fired up as soon as string value appeared to be “Load Paper”
                        Last edited by Davidus; 01-07-2011, 08:22.

                        Comment

                        • Alfista
                          Senior Member
                          • Mar 2017
                          • 136

                          #27
                          Hi,

                          I try to use the diplay.str parameter in trigger in Zabbix 4, but I can't find it.
                          I try to set if the disk status recieved as a string changes on our storage in trigger prototypes.

                          Please can you help me how should I do it?
                          Thanks.

                          Comment

                          Working...