Jul 24, 2008 5:51 AM
Cool tool: Check your layer3 deps
-
Like (0)
wget http://www.zenoss.com/Members/netdata/tracepath.py -O $ZENHOME/bin/tracepath.py
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
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
tracepath.py foobar
Getting path from zenoss0101 to foobar...
Invalid destination.
name YOUR-ZENOSS-SERVER
"zarxcky" wrote:
Hi,
I'm using default zenping configuration. Im not touching anything inside the ZENHOME/etc since the zenoss installed.
Perhaps you can update your code here so I can test the new changes you made.
"zarxcky" wrote:
And restart zenping. Try again tracepath.py against devices locally and remotely shown:
Locally:
python /usr/local/zenoss/bin/tracepath.py 192.168.3.5
Getting path from localhost to 192.168.3.5...
Traceback (most recent call last):
File "/usr/local/zenoss/bin/tracepath.py", line 30, in ?
path = source.os.traceRoute(destination, [])
AttributeError: 'NoneType' object has no attribute 'os'
Localhost:
python /usr/local/zenoss/bin/tracepath.py localhost
Getting path from localhost to localhost...
Invalid destination.
Remotely:
python /usr/local/zenoss/bin/tracepath.py moddar.homeip.net
Getting path from localhost to moddar.homeip.net...
Traceback (most recent call last):
File "/usr/local/zenoss/bin/tracepath.py", line 30, in ?
path = source.os.traceRoute(destination, [])
AttributeError: 'NoneType' object has no attribute 'os'
The same error for locally and remotely.
From the output locally:
tracepath.py 192.168.3.6
Getting path from billion.dyndns.org to 192.168.3.6...
zenoss -> -> 192.168.3.6
What's the mean by the missing link between zenoss & 192.168.3.6 ? Maybe the missing link can be replaced by some readable error message.
print "zenoss -> " \
+ " -> ".join([ dmd.Networks.findIp(ip).device().id for ip in path[:-1] ]) \
+ " -> " + arg
if len(path) > 1:
print "zenoss -> " \
+ " -> ".join([ dmd.Networks.findIp(ip).device().id for ip in path[:-1] ]) \
+ " -> " + arg
else:
print "zenoss -> " + arg
File "/usr/local/zenoss/zenoss/bin/tracepath.py", line 12, in ?
arg = sys.argv[1]
IndexError: list index out of range
Traceback (most recent call last):
File "./tracepath.ph", line 20, in ?
name, source = line.split(' ')
ValueError: need more than 1 value to unpack
"HummerBoy" wrote:
I get the same error. It seems to be unable to get the name from the command line. Any updates would be appreciated.
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 destination"
echo "eg: $0 `hostname`"
else
routepath=""
echo "From "$HOSTNAME" to"
for name in `/usr/sbin/traceroute $1|grep "^ "|awk '{print $2}'`; do
routepath="$routepath$name -> ";
done
echo $routepath| sed s/' ->$'/''/g
fi
Command: tracepath.sh ${device/id}
Description: Trace layer 3 path
Output:
==== ad2-main1 ====
tracepath.sh ad2-main1
From crt-monitor to
fca_cbr1.ourdomain.au -> 10.50.50.2 -> 10.10.11.4 -> 10.9.5.142 -> 10.9.5.141 -> ad2-main1.ourdomain.au
DONE in 3 seconds on 1 targets
zenoss.paris
eth0 (automatic) 192.168.0.2
Default route (automatic) 0.0.0.0/0 => 192.168.0.1
router.paris
eth0 (automatic) : 192.168.0.1
ethcloud (manual) : 192.168.105.1
route (manual) : 192.168.1.0/24 => 192.168.105.2 / ethcloud / local / indirect
router.london
eth0 (automatic) : 192.168.1.1
ethcloud (manual) : 192.168.105.2
route (manual) : 192.168.1.0/24 => none / eth0 / local / direct
device.london
eth0 (automatic) : 192.168.1.2
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||