Xymon Mailing List Archive search

tcp traceroute

6 messages in this thread

list Troy Adams · Thu, 30 May 2013 12:19:13 -0600 (MDT) ·
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 · Thu, 30 May 2013 16:15:35 -0400 (EDT) ·
quoted from Troy Adams
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 · Thu, 30 May 2013 22:06:11 -0000 (UTC) ·
quoted from Troy Adams
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 · Thu, 06 Jun 2013 10:35:50 -0600 (MDT) ·
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 
quoted from Troy Adams

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 · Fri, 7 Jun 2013 09:12:38 -0400 ·
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 · Fri, 07 Jun 2013 10:44:07 -0600 (MDT) ·
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 
quoted from 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. 

-- 
    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.
---