RSS Feed for This PostCurrent Article

Tip of the Month: Layer 3 Dependency Checker

This tip has been adapted from Wouter ‘netdata’ D’Haeseleer’s post on Zenoss-Users:
http://community.zenoss.com/forums/viewtopic.php?p=23030

Download this file and put it in $ZENHOME/bin
http://www.zenoss.com/Members/netdata/tracepath.py

or if your Zenoss server has direct access to the internet you could do this:
wget http://www.zenoss.com/Members/netdata/tracepath.py -O $ZENHOME/bin/tracepath.py
or
curl -O http://www.zenoss.com/Members/netdata/tracepath.py -o $ZENHOME/bin/tracepath.py

Set the permissions:
chmod +x tracepath.py

You can now run it against any device you want to see if Zenoss is able to build layer 3 dependencies for.

tracepath.py swiss11
Getting path from zenoss0101 to swiss11...
zenoss -> VGB-DC01-SW01 -> VG_Turnhout -> pbru223.controlnet.equant.net -> pkt47.controlnet.equant.net -> CHEL-ZO01-SW01 -> swiss11

This reveals the path from the Zenoss server to the device passed in.

When Zenoss is unable to trace the path it will throw an error:

tracepath.py pkt1401
Getting path from zenoss0101 to pkt1401...
Traceback (most recent call last):
  File "/opt/zenoss/bin/tracepath.py", line 30, in ?
    path = source.os.traceRoute(destination, [])
  File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 121, in traceRoute
    return nextdev.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/Device.py", line 507, in traceRoute
    return self.os.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 121, in traceRoute
    return nextdev.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/Device.py", line 507, in traceRoute
    return self.os.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 121, in traceRoute
    return nextdev.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/Device.py", line 507, in traceRoute
    return self.os.traceRoute(target, ippath)
  File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 122, in traceRoute
    raise TraceRouteGap("unable to trace to %s, gap at %s" % (target.id,
Products.ZenModel.Exceptions.TraceRouteGap: unable to trace to pkt1401, gap at pbr213.controlnet.equant.net

Zenoss throws an error that there is a gap at pbr213.controlnet.equant.net. This means the Zenoss server is unable to see the routes that will lead to pkt1401.

When you use this script without a correct device it will lead to this:

tracepath.py foobar
Getting path from zenoss0101 to foobar...
Invalid destination.

Sphere: Related Content

Trackback URL

RSS Feed for This Post1 Comment(s)

  1. Jeff Schroeder | Aug 26, 2008 | Reply

    This is very cool, keep pointing out little things like this

RSS Feed for This PostPost a Comment