7 Replies Latest reply on Aug 19, 2019 3:21 PM by tomiannelli

    Trigger Action Logic Help

    severen.salvesen

      Hey All,

      I am somewhat new to Solarwinds and need a little help setting up one particular alert.

      I have created two component monitors. One that measures the amount of Windows TCP segments re-transmitted and the other is the total TCP segments sent per second.

      What I would like to do is set up an alert that says if the value of re-transmitted segments divided by the value of total segments sent exceeds .06 then an alert email needs to be sent.

       

      Is there a way to do this with alert trigger logic?

        • Re: Trigger Action Logic Help
          tomiannelli

          severen.salvesen depending upon how you created those two components the answer will vary. What did you use to create them?

          • Re: Trigger Action Logic Help
            jrouviere

            Most likely you're going to be doing a custom SQL/SWQL alert.

             

            tomiannelli has a pertinent question, could suggest some basic query if we know how you've set up the monitoring.

              • Re: Trigger Action Logic Help
                severen.salvesen

                Thanks! I have been trying to do a swql query myself and this is as far as I have gotten:

                 

                SELECT ComponentStatisticData, ComponentName, NodeName

                FROM Orion.APM.CurrentStatistics

                INNER JOIN Orion.Nodes

                ON CurrentStatistics.NodeID = Nodes.NodeID

                WHERE ComponentName = 'Segments Retransmitted/sec'

                 

                and

                 

                SELECT ComponentStatisticData, ComponentName, NodeName

                FROM Orion.APM.CurrentStatistics

                INNER JOIN Orion.Nodes

                ON CurrentStatistics.NodeID = Nodes.NodeID

                WHERE ComponentName = 'Segments Sent/sec'

                 

                 

                These two tables display the data that I need, I just don't know how to perform a function to divide the 'Segments Retransmitted' by the 'Segments Sent' and put the results in a new column. Is that at all possible since the data itself is all part of the "ComponentStatisticData" Table?

                  • Re: Trigger Action Logic Help
                    jrouviere

                    OK, so this wound up being a little bit more complicated via SQL than I originally thought and working into an alert is going to have its own challenges, but this is what I have so far:

                     

                    SELECT  *, (PivotTable.[Segments Retransmitted/sec]/PivotTable.[Segments Sent/sec]) as Ratio

                    FROM

                    (

                    SELECT cs.componentname, cs.componentstatisticdata, Nodes.Caption

                    FROM APM_CurrentStatistics as CS

                    inner join Nodes as Nodes on nodes.nodeid = cs.nodeid

                    where cs.componentname in ('Segments Retransmitted/sec', 'Segments Sent/sec')

                    ) as A

                    Pivot (

                    max(ComponentStatisticData)

                    For ComponentName in ([Segments Retransmitted/sec], [Segments Sent/sec])

                    ) as PivotTable

                     

                    I've been thinking about this and I don't actually see a way to just bake this into an alert as is, as the alerting engine is still a bit restrictive on what the queries allow for SELECT.

                     

                    I'm still mulling this over, but if you have the option to do a simple script, or if someone is better with SQL than I am, you may be able to get the same information by just layering the query slightly differently. The other weakness is using the PIVOT requires using an aggregation function which may not be desirable here, but I wanted to post what I had in case it was helpful.

                    1 of 1 people found this helpful
                • Re: Trigger Action Logic Help
                  tomiannelli

                  I don't have anything collecting that data for anyone right now thru a template. But what you are trying to do sure seems like you could do with a Custom Poller and the correct MIB. Then use a custom poller transformation [calculation] and it is easy to set up an alert against those. Another way I just created is this simple PowerShell script component monitor: TCP-Segments  You could then create an alert against the Ratio statistic for when it was critical.

                   

                  The Other thing, not that I know if it is of any use to you. This also allows for the creation of charts like this:

                  Segment Chart