I have a traceroute hop count sensor where I have the Change Trigger notification set up to run a script but when the hop count changes my script doesn't run. I can get the script to run if I assign it to a State Trigger of Down but I need the script to run when the hop count changes. Thanks.


Article Comments

This is not currently possible but such a feature wil be available in a future version, most likely in Q2 / Q3 2012. Please bear with us.


Jan, 2012 - Permalink

Hi Jason,

This sensor has a setting to set the sensor into a warning or down state when the route changes. If you setup a trigger to one of these events, and also set this sensor setting, your script should run.

Regards,


Jan, 2012 - Permalink

If I enable warning when the hop count changes, how long does it stay at warning before going back to green? For example if the hop count is 8 and it changes to 10 and the sensor alerts a warning how long will it be in a warning state before it goes back to green given that it stays at 10?


Jan, 2012 - Permalink

Hi Jason,

The change is measured between two consecutive scans. Assuming you choose the "set to warning" option, your sensor will go into a warning state if the result differs from the previous scan.

ScanResultSensor Status
18Ok
28Ok
310Warning
48Warning
58Ok

Regards,


Jan, 2012 - Permalink

Thanks for your help. If the results went: 8, 8, 8, 10, 10, 10, 10 would the sensor stay in the Warning state or would it go back to Ok.


Jan, 2012 - Permalink

Hi Jason,

As said, the sensor will go into a warning state if the result differs from the previous scan. So 8 -> 8 is Ok, 8 -> 10 is Warning and 10 -> 10 is Ok.

Regards,


Jan, 2012 - Permalink

Thanks, let me give it a try.


Jan, 2012 - Permalink

Well I set the Traceroute Hop Count Sensor to "If route changes Set Sensor to Warning" and it immediately went into a warning state even though the hop count didn't change. It looks like the sensor is going into a warning state every other time it scans. My script that I am running logs a tracert when the sensor state changes to warning and it looks like although the hop count doesn't change there is an IP at hop 6 that is varying back and forth (XX.XX.25.114 to XX.XX.26.157 and back)

What I am trying to do is set this up so that when a reroute occurs the sensor logs the route change but minor changes like a single hop being balanced isn't of concern. Any way I can achieve this so that the new route is only logged if there is a major change to the route?

Thanks


Jan, 2012 - Permalink

Hi Jason,

In one of the next PRTG versions there will be an option for this sensor to only count the number of hops, without actually comparing the IP's.

Regards,


Jan, 2012 - Permalink

I guess I will have to wait. Thanks


Jan, 2012 - Permalink

Here is the solution I am using:

I created a vbs that does the tracert and returns the hop number (Custom VBS Sensor in PRTG). As part of this I create a file that contains the tracert in it. If the count changes I set up a notification VBS that moves and renames the file with the date and time.

Thanks for all the help.


Jan, 2012 - Permalink