Traceroute ConfigSources
Update:
A ConfigSource, for use with LM Config, to monitor and alert on changes of route from the collector to any of a list of destinations. This is now combined a single ConfigSource that will run for both Windows and Linux collectors:
v1.1.0: JGZ7GK
If you really want to have a different ConfigSource per OS, the original two OS-specific ConfigSources are at: EK4HEG (Windows v1.5.0); HCPCXA (Linux v1.2.0).
To use, you'll need to add a property 'traceroute.list' to the Windows or Linux collector device* you want to use to check the route from, with the value being a comma separated list of destinations, e.g. '8.8.8.8,www.logicmonitor.com'
*You can modify the AppliesTo such that this datasource could apply to any device, however it will always be the collector running the script and doing the traceroute / tracert.
The ConfigSource will run the trace and print a summary of the results in a way that can easily be alerted on (if you really want to) in the event of a route change, plus a full dump of the route information including hop timings for information, in a way that is excluded from alerting.

Credit to @Jake Cohen for the basis of the script these are built from. :)/emoticons/smile@2x.png 2x" title=":)" width="20">
muiz
·6 years agowas able to add the configSource and it seems to be working great for a couple of quick tests i did.
Thank you Antony.
Antony Hawkins
OP6 years agoHi Muiz,
Try now. Thanks for pointing this out!
Antony
muiz
·6 years agoHi Antony,
getting Import Error for this ConfigSource saying "LogicModule is Private, Cannot Read". Would you be able to change that? Thanks.
Antony Hawkins
OP6 years agov1.1.0: JGZ7GK
Antony Hawkins
OP8 years agoHi Jono,
Briefly and off the top of my head, one way to accomplish this could be as follows:
1. Set a device property to list the steps of the known good route, e.g. "10.0.0.1, 10.0.0.55, edgerouter.mynetwork.local, isp.whatever.com"
2. Have a scripted DataSource (not ConfigSource) that ran the traceroute script every five minutes.
The DataSource would be able to pull in the known good route from the device property and compare the listed steps to the result of the traceroute and either confirm the two lists were a match, or not, outputting a suitable 1/0 code which could then be alerted on. Alternatively, it might output 0 if all steps matched vs the step number of the first mis-match.
Clearly you'd have to do some clever parsing if the steps might vary within a domain, e.g. if *.whatever.com were acceptable at step 4 in the above.
Not necessarily pretty, but probably achievable.
Jono
·8 years agoI wonder if anyone has accomplished what I'm looking for with this. I'd like to have a known good traceroute, then have it poll every 5 minutes, then alert if outside the known good traceroute and resolve when it's back inline with known good traceroute.
The changes would be, allow us to poll config source more frequently than 1 hour. Then set a "golden config" to compare against.
Antony Hawkins
OP8 years ago@Jono it should be possible within the proc.eachLine{} section to exclude hops that match a pattern, for example if they end '.mydatacenter.com', or you can add exceptions in the 'RouteHasChanged' diff check.
Jono
·8 years agoThanks! I tested it right away and it works great. I gave it a test associating the traceroute with the device rather than collector and that works also.
My use case is I will have routers I am monitoring over the internet, I have a VPN so it is all private hops for traceroute. I will apply this config to the device, with the traceroute.list property being it's own displayname. This way I will get alerts on route changes that are already associated with the device so I can get alerts and notify people appropriately. I tested this and it seems to work. Next I'll be finding how to omit certain hops in our datacenter that won't indicate a true routing change.
Antony Hawkins
OP8 years ago@Jono should be good to go now, thanks!
Jono
·8 years agoHello,
When trying to download this from the LogicMonitor Exchange, I get the following error,
This LogicModule is currently undergoing security review. It will be available for import only after our engineers have validated the scripted elements.
is there any update on when this will be available?
Antony Hawkins
OP8 years agoNew, OS-agnostic version (basically, it's a merge of both of the above, that runs the relevant Linux- or Windows-specific commands dependent on the collector operating system).
This is now the only one you need...
v1.0.0: RLG279
:)/emoticons/smile@2x.png 2x" title=":)" width="20">
Andrey_Kitsen
·8 years agoHey @Rob , the modules are now available for importing.
Enjoy
Rob
·8 years agoTom_Lasswell
·8 years agoCurious, have you thought about a datasource to calculate hop latency for each hop? We've had requests like that in the past and there's other tools like Ping plotter that do something similar to this. It's an interesting metric to know about if the latency is being caused by some hop down the line.
Antony Hawkins
OP8 years agoUpdated the Windows version to v1.5.0 to accommodate hop outputs recorded as <1ms.
Haniz
·8 years agoawesome stuff!