cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Action Logic Help

Jump to solution

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?

0 Kudos
7 Replies
tomiannelli
Level 13

Re: Trigger Action Logic Help

Jump to solution

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

0 Kudos

Re: Trigger Action Logic Help

Jump to solution

Thanks for the answer! I did it using the component monitor wizard. Right now what I am trying to do is create a swql query to divide the component statistic results from one component by the other. Do you think this would be the best method?

0 Kudos
jrouviere
Level 14

Re: Trigger Action Logic Help

Jump to solution

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.

0 Kudos

Re: Trigger Action Logic Help

Jump to solution

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?

0 Kudos
jrouviere
Level 14

Re: Trigger Action Logic Help

Jump to solution

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.

Re: Trigger Action Logic Help

Jump to solution

Thanks for your ideas!!!

I will see what I can figure out with what you have given me!

tomiannelli
Level 13

Re: Trigger Action Logic Help

Jump to solution

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:

2019-08-19_15h19_23.png