Ad Widget

Collapse

1.4.1 ExternalChecks problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eran
    Member
    • Apr 2007
    • 36

    #1

    1.4.1 ExternalChecks problems

    After upgrading to 1.4.1 I noticed that triggers related to external checks didn't behave properly, they seem to turn on and off without any good reason.

    So I tried modifying one such trigger and kept getting "incorrect expression errors", so I went a step back to the items and had the same problem there, until I discovered that if I replaced the parenthesis in the item key with square brackets I could save the item, however now it doesn't work anymore. And the item is now listed as "unsupported"

    This is a sample item that used to work with previous versions:
    GetTodaysStats(Send Mail)

    This is how it looks after I modified it and it stopped working
    GetTodaysStats[Send Mail]

    This is a sample trigger that's behaving weird:
    {WFPost:GetTodaysStats(Send_Fail Mail).sum(#2)}/{WFPost:GetTodaysStats(Send Mail).sum(#2)}>0.5 | {WFPost:GetTodaysStats(Send_Fail Mail).sum(#6)}/{WFPost:GetTodaysStats(Send Mail).sum(#6)}>0.2


    This problem is urgent since it's monitoring a critical system.

    Thanks,
    Eran
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    We have more strict parsing of triggers expressions in 1.4.1, this affected syntax of item keys as well. If "GetTodaysStats(Send_Fail_Mail)" is a user parameter, you may rename it to GetTodaysStats[Send_Fail_Mail] in ZABBIX frontend and in agent's configuration file. It should work.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • eran
      Member
      • Apr 2007
      • 36

      #3
      it's not a user parameter, it's an external script and I need it to have two separate parameters on the command line, so I can't replace the space with underscore.

      For now I went back to the ver. 1.4 of the GUI so I could change the square brackets back to parenthesis but the triggers are still behaving incorrectly and are triggered ON even through they shouldn't be.

      Just so you can see for your self that the above trigger should not be ON. These are the last values for the send_fail items:
      2007.Jul.02 04:24:46 1
      2007.Jul.02 04:23:41 1
      2007.Jul.02 04:13:40 5
      2007.Jul.02 04:03:41 1
      2007.Jul.02 03:53:41 1
      2007.Jul.02 03:43:40 2
      2007.Jul.02 03:33:41 2

      And these are the last values for the send item:
      2007.Jul.02 04:24:47 75
      2007.Jul.02 04:23:39 151
      2007.Jul.02 04:13:40 207
      2007.Jul.02 04:03:39 192
      2007.Jul.02 03:53:40 180
      2007.Jul.02 03:43:40 160
      2007.Jul.02 03:33:40 239
      Last edited by eran; 02-07-2007, 10:30.

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Please, check the latest manual. ZABBIX behaves according to priorities of arithmetical and logical operations. Add brackets to make calculations more predictable.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • eran
          Member
          • Apr 2007
          • 36

          #5
          Thanks Alexei, putting parenthesis there did fix solve the problem, but I can swear the same expressions worked in previous versions. It's wierd.

          May I comment though that the operator precedence is not natural at all. In all programming languages I know logical operators (and, or) have lower precedence than comparison operators (=, <>, etc.). It doesn't really make sense that zabbix would have a different precedence.

          For example, in C the order is: http://www.difranco.net/cop2220/op-prec.htm

          Eran

          Comment

          • eran
            Member
            • Apr 2007
            • 36

            #6
            by the way, is there a solution to the space in the external script parameters (from my initial post)?

            Comment

            • Alexei
              Founder, CEO
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2004
              • 5654

              #7
              I actually followed C logic for trigger expressions. It seems that I incorrectly set precedence for logical | and & higher than for <>=#. It is fixed in pre 1.4.2 code, so your expression will work even without brackets. Documentation updated as well.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              Working...