Ad Widget

Collapse

Limit for expressions in a trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fwoosh
    Junior Member
    • Apr 2005
    • 8

    #1

    Limit for expressions in a trigger?

    I have separate 10 urls running with ten separate ip addresses. If we do an apache bounce on the server, I did not want to get ten separate pages, so I tried to consolidate all of the checks into one trigger. For example:

    ({host:check_service[http,ip,port].last(0)}=0)|
    ({host:check_service[http,ip,port].last(0)}=0)|
    ...
    ...
    ...
    ...
    ten lines of this with the last line excluding the trailing '|' or symbol.

    When trying to run this, I get an error in the server log that states:

    Expression ...<data>.... cannot be evaluated.

    I lessen the length down all the way to only 6 expressions and it works. Any more than six, kicks out this error.

    Are there limitations to how many expressions can be placed within a trigger?

    Thanks
  • klavs
    Junior Member
    • Apr 2005
    • 18

    #2
    check the field in mysql - it's most likely not set to enough length. As there seems to be no length checking, you could simply extend the field length for triggers (using phpmyadmin this is deadeasy

    Comment

    • fwoosh
      Junior Member
      • Apr 2005
      • 8

      #3
      I currently have the expression field set to varchar(255). I am nowhere near that limit as of yet. I am currently at a size of 65, if I add one more "or" statement, this increases it to 76 which is still way below the 255.

      Looking at the zabbix_server.log shows:

      026489:20050411:095807 Evaluation of expression [({11709}=0)|({11710}=0)|({11711}=0)|({11712}=0)|({ 11713}=0)|({11714}=0)|({11715}=0)] failed

      026489:20050411:095807 Expression [({11709}=0)|({11710}=0)|({11711}=0)|({11712}=0)|({ 11713}=0)|({11714}=0)|({11715}=0)] cannot be evaluated.

      How many items can be part of an expression?

      By the way, this is with zabbix-1.1alpha7.

      Comment

      • klavs
        Junior Member
        • Apr 2005
        • 18

        #4
        I'm sorry it wasn't that easy

        Only way to solve it - is to follow the trigger-expression through the code - and figure out where it goes wrong and fix it.

        Or hope Alexei knows where it is, and what to do about it.

        Comment

        • fwoosh
          Junior Member
          • Apr 2005
          • 8

          #5
          Further complications



          Thanks for the try. It was worth a shot.....

          To further complicate things, here is my scenario:

          1) create two separate items:
          a) check_service[http,<ip>,<port>]
          b) check_service[http,<another_ip>,port]
          2) create trigger:
          ({<host>:check_service[http,<ip>,<port>].last(0)}=0)|
          ({<host>:check_service[http,<another_ip>,port].last(0)}=0

          3) Go to events screen and you will see that the value is set to off.
          4) Go to the overview for that host and you will see that the box is in gray.
          5) View the zabbix_server.log and you will see an error that it could not evaluate the expression.

          The events screen makes you believe that everything is ok, the overview screen makes it seem as though it has no information. Again, this is version 1.1alpha7

          Comment

          Working...