6 Replies Latest reply on Jul 18, 2013 6:26 PM by Leon Adato

    (EDIT- it was caused by a bug, the NONE condition group doesn't work with more than 1 argument)Can't figure out why this trigger condition is not working properly...

    tmart

      This alert is supposed to alert when a node goes down as long as it doesn't contain certain things in it's node name, but it is alerting even when the node name contains these things.

       

       

      Here is what it looks like:

       

       

      Trigger alert when ALL of the following apply:

           Node status is equal to down

           Trigger alert when NONE of the following apply

                Node name contains "abcd"

                Node name contains "efgh"

       

       

       

      In the trigger actions I have it email me with the variable ${NodeName}, when I enable the alert I get alerts for servers with node names such as "abcd-server-2" and "efgh-system-h".  The body of the email will confirm that the node name contains "abcd" and "efgh" with the ${NodeName} variable.   To make it even stranger, I have an identical alert that says "trigger alert when ANY of the following apply" in the 2nd condition group and it works just perfectly(basically those alerts go to email group one, and all node down alerts that don't go to group one will go to email group two.)

        • Re: Can't figure out why this trigger condition is not working properly...
          Leon Adato

          Try changing the "NONE" option to "NOT ANY".

           

          (I believe) NONE is the equivalent of ANY, and NOT ANY is the same as ALL. In the negative, of course.

            • Re: Can't figure out why this trigger condition is not working properly...
              tmart

              There is no "not any" option, only "all", "any", "none" and "not all".

               

               

               

              This logic is pretty basic, unless I am missing something glaring at me I really think that something is wrong with the way Orion is checking triggers...

                • Re: Can't figure out why this trigger condition is not working properly...
                  Leon Adato

                  My mistake - try it with "not all". Again, the issue is OUR understanding of what NONE and NOT ALL indicate.

                    • Re: Can't figure out why this trigger condition is not working properly...
                      tmart

                      There is only one way that NONE and NOT ALL work in the english language.

                       

                      "N" = the total number of objects

                       

                      NONE means 0 out of  "N" number of objects.

                       

                      NOT ALL means anything less than "N" number of objects

                       

                       

                      If i had used "NOT ALL" here it would not work because there can never be more than 1 condition true in this condition group, therefor it would always be in a "NOT ALL" status.

                        • Re: Can't figure out why this trigger condition is not working properly...
                          Leon Adato

                          So I just tested this:

                           

                          Where ALL are true

                               NodeId = 1

                               Where NONE are true

                                    Node status is up

                                    Node status is down

                           

                          Result? Instant ticket (Node 1 is up)

                           

                          Then I tested this

                          Where ALL are true

                               NodeId = 1

                               Where NOT ALL are true

                                    Node status is up

                                    Node status is down

                           

                          To your point about the English language, If I recall in the murky depths of my memory, "NOT ALL" is really short for "ALL ARE NOT" (or something like that)

                           

                          Meaning:

                          1) NONE matches if and only if all the conditions are matching. If you have 2 out of three, there's no match

                          2) NOT ALL matches if any of those items are matched, even if others aren't. So if you have 1 out of three, there's a match.

                           

                          So I reverse what I said earlier- NONE is the same as ALL - everything has to match. NOT ALL is the same as ANY - any single item in the bunch causes a match.

                           

                          Upshot: Try it with NOT ALL. What have you got to lose?

                  • Re: Can't figure out why this trigger condition is not working properly...
                    tmart

                    So after a bunch of troubleshooting I have the alert working now, but the way I had to get it to work is not very encouraging.

                     

                    I have determined that when you use "trigger the alert if NONE of these conditions exist", you cannot use more than 1 argument within that condition group or it will ignore the entire group.   I figured this out by removing all but 1 condition in the "NONE" condition group.    So to make my alert work I had to force  the "NONE" group to only have 1 argument by turning it into an "ANY" inside of a "NONE".  Here's what it looks like now:

                     

                    Trigger alert when ALL of the following apply:

                         Node status is equal to down

                         Trigger alert when NONE of the following apply:

                             Trigger alert when ANY of the following apply:

                                    Node name contains "abcd"  

                                    Node name contains "efgh"

                     

                     

                     

                    I'm glad to have it working, but there is obviously a bug here.  This bug is easy to reproduce, try it for yourself:  Create a new alert that alerts when NONE of the following apply:  node status = UP, node status = DOWN.    This should send an alert out only when a node is neither up nor down, but when you enable it it will alert on every single node in your environment that is up or down.