tcp traceroute
list Troy Adams
In the same way that the conn test can be asked to "trace" by performing a traceroute upon failure, I would like to perform a TCP traceroute when a TCP test fails with "no route to host". I expect this isn't built right into Xymon now but has anybody got any pointers on what to hack to implement this myself?
cheers,
Troy
--
This communication is intended for the use of the recipient to whom it
is addressed, and may contain confidential, personal, and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take
action relying on it. Any communications received in error, or
subsequent reply, should be deleted or destroyed.
---
list Tom Diehl
▸
On Thu, 30 May 2013, Troy Adams wrote:
In the same way that the conn test can be asked to "trace" by performing a traceroute upon failure, I would like to perform a TCP traceroute when a TCP test fails with "no route to host". I expect this isn't built right into Xymon now but has anybody got any pointers on what to hack to implement this myself?
Magic built in not tacked on later!!
From the hosts.cfg man page:
trace
If the connectivity test fails, run a "traceroute" and include the output
from this in the status message from the failed connectivity test. Note:
For this to work, you may have to define the TRACEROUTE environment
variable, see xymonserver.cfg(5)
Is that what you are looking for?
--
Tom user-dcee455aaab0@xymon.invalid Spamtrap address user-4d123f9c385b@xymon.invalid
list Japheth Cleaver
▸
On Thu, 30 May 2013, Troy Adams wrote:In the same way that the conn test can be asked to "trace" by performing a traceroute upon failure, I would like to perform a TCP traceroute when a TCP test fails with "no route to host". I expect this isn't built right into Xymon now but has anybody got any pointers on what to hack to implement this myself?Magic built in not tacked on later!! From the hosts.cfg man page: trace If the connectivity test fails, run a "traceroute" and include the output from this in the status message from the failed connectivity test. Note: For this to work, you may have to define the TRACEROUTE environment variable, see xymonserver.cfg(5) Is that what you are looking for? --
"trace" in hosts.cfg and a suitable entry in xymonserver.cfg should be all you need. (You can also just add --trace to the xymonnet options in tasks.cfg.) Since you're running as the 'xymon' user (presumably), don't forget privilege escalation for traceroute in TCP mode. tasks.cfg: CMD xymonnet --report --ping --trace --checkresponse xymonserver.cfg:TRACEROUTE="sudo /bin/traceroute -I" HTH, -jc
list Troy Adams
Let's say an HTTP test fails but the conn test for the same host still works . What I want to do at that point, is a tcptraceroute. I need to know where TCP/80 is getting stuck. / Troy ----- Original Message ----- From: user-87556346d4af@xymon.invalid To: "Troy Adams" <user-81e3256385bc@xymon.invalid>, user-dcee455aaab0@xymon.invalid Cc: "Xymon Email List" <xymon at xymon.com> Sent: Thursday, May 30, 2013 4:06:11 PM GMT -07:00 US/Canada Mountain Subject: Re: [Xymon] tcp traceroute
▸
On Thu, 30 May 2013, Troy Adams wrote:In the same way that the conn test can be asked to "trace" by performing a traceroute upon failure, I would like to perform a TCP traceroute when a TCP test fails with "no route to host". I expect this isn't built right into Xymon now but has anybody got any pointers on what to hack to implement this myself?Magic built in not tacked on later!! From the hosts.cfg man page: trace If the connectivity test fails, run a "traceroute" and include the output from this in the status message from the failed connectivity test. Note: For this to work, you may have to define the TRACEROUTE environment variable, see xymonserver.cfg(5) Is that what you are looking for? --
"trace" in hosts.cfg and a suitable entry in xymonserver.cfg should be all you need. (You can also just add --trace to the xymonnet options in tasks.cfg.) Since you're running as the 'xymon' user (presumably), don't forget privilege escalation for traceroute in TCP mode.
tasks.cfg: CMD xymonnet --report --ping --trace --checkresponse xymonserver.cfg:TRACEROUTE="sudo /bin/traceroute -I"
HTH,
-jc
--
This communication is intended for the use of the recipient to whom it
is addressed, and may contain confidential, personal, and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take
action relying on it. Any communications received in error, or
subsequent reply, should be deleted or destroyed.
---
list Betsy Schwartz
One thing you could do is
loop down the board with bbhostgrep looking for http*
when you find an httptest, query the board for status on http and conn
which looks something like
$BB $BBDISP "xymondboard host=$host test=http* fields=color"`
then if http is not green,see if conn is green
then call your custom traceroute test.
you'll have to have an else clause that puts a status into your test so it
doesn't go purple.
OR you could just call it for every host with http and do the right thing
when conn is down. Might be useful to gather metrics that way too.
list Troy Adams
That looks great. Thanks ! cheers, Troy ----- Original Message ----- From: "Betsy Schwartz" <user-c61747246f66@xymon.invalid> To: "Troy Adams" <user-81e3256385bc@xymon.invalid> Cc: "xymon" <xymon at xymon.com> Sent: Friday, June 7, 2013 7:12:38 AM GMT -07:00 US/Canada Mountain Subject: Re: [Xymon] tcp traceroute
▸
One thing you could do is
loop down the board with bbhostgrep looking for http* when you find an httptest, query the board for status on http and conn which looks something like $BB $BBDISP "xymondboard host=$host test=http* fields=color"`
then if http is not green,see if conn is green then call your custom traceroute test.
you'll have to have an else clause that puts a status into your test so it doesn't go purple. OR you could just call it for every host with http and do the right thing when conn is down. Might be useful to gather metrics that way too.
--
This communication is intended for the use of the recipient to whom it
is addressed, and may contain confidential, personal, and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take
action relying on it. Any communications received in error, or
subsequent reply, should be deleted or destroyed.
---