4 Replies Latest reply on Apr 26, 2013 6:05 AM by thamizh85

    How To Find All Alerts That Fire On A Node?

    cfeltych1911

      Is there a way to select a node in Orion NPM and return all the alerts associated with it?  We're running NPM 10.0.

       

      Thanks in advance.

        • Re: How To Find All Alerts That Fire On A Node?
          superfly99


          When selecting a node, in that particular view you can add in the "Active Alers on This Node" resource. Or the "Node Releated 25 Syslog Messages".

           

          orion2.jpg

            • Re: How To Find All Alerts That Fire On A Node?
              cfeltych1911

              What I need to be able to find is all the alerts that are configured for a given node, not what is currently active on it.  Thanks.

                • Re: How To Find All Alerts That Fire On A Node?
                  cgregors

                  I went thru the same problem and found a _long_ but workable solution.

                   

                  I wrote a php script (my scripting language of choice for the last few years) that did the following:

                   

                  1. for each alert definition in the Orion database
                    1. read the trigger condition
                    2. decompose the sql
                    3. remove portions of the WHERE clause that related to thresholds or state tests
                    4. run the remaining sql against the Orion database
                    5. Take the list of results and associate them with the nodes / apps / components / volumes / interfaces that the alert COULD trigger on.

                   

                  Needless to say, this took a while to write (2-3 days) and most likely doesn't correctly strip all variations of WHERE statements that you could write.

                   

                  Example:

                  alert name :      Node MEM Utilization

                  Original sql:    

                   

                  SELECT DISTINCT Nodes.NodeID AS NetObjectID, Nodes.Caption AS Name

                  FROM Nodes

                  WHERE 

                  (

                    (Nodes.Status = '1') AND

                    (Nodes.Status <> '0') AND

                    (Nodes.Status <> '9') AND

                    (Nodes.customproperty= 1) AND

                    (Nodes.PercentMemoryUsed >= 85)

                  )

                   

                   

                  Stripped sql:

                   

                  SELECT DISTINCT Nodes.NodeID AS NetObjectID, Nodes.Caption AS Name

                  FROM Nodes

                  WHERE ( ( Nodes.customproperty= 1 ) )

                   

                  In this case the idea is to delete the Nodes.Status and Nodes.PercentMemoryUsed qualifiers and see what comes out.

                   

                  You can also start by doing the process by hand to understand what needs to be done.

                   

                  Chris

              • Re: How To Find All Alerts That Fire On A Node?
                thamizh85

                It is a very good question, because by the nature of Alert definition in Orion, it is not very clear which nodes/interfaces it applies to (if your conditions are too detailed).

                Over a course of time, it becomes essential to pick some core nodes and check whether all policies created are applicable for it (i.e, not skipped because of some loosely defined rules)