Xymon Mailing List Archive search

Bug in findhost ?

5 messages in this thread

list Francois Claire · Thu, 3 Dec 2015 09:10:11 +0100 ·
Hi,


I have troubles using the findhost feature with the "Jump to page" box checked. On my xymon server the result URL is using localhost instead of my xymon server's FQDN.

This problem seems to be reproducible on www.xymon.com:
- go to https://www.xymon.com/xymon-cgi/findhost.sh
- enter "ipgw" in the search field
- hit the search button
- you're redirected towards http://vxymon.hswn.dk/services/#ipgw.hswn.dk

Host vxymon.hswn.dk doesn't exist. On my system it's redirecting to http://localhost.

2 questions:
- why is the xymon server hostname changing and is there a place to configure it for findhost's answer ?
- why is the answer redirecting to http when the query was done on a https URL ?


I looked into findhost.c but didn't have enough time to understand how all of this works.


Cheers,
Francois.
list Francois Claire · Fri, 11 Dec 2015 14:00:59 +0100 ·
Up !
Hi,


I have troubles using the findhost feature with the "Jump to page" box checked. On my xymon server the result URL is using localhost instead of my xymon server's FQDN.

This problem seems to be reproducible on www.xymon.com:
- go to https://www.xymon.com/xymon-cgi/findhost.sh
- enter "ipgw" in the search field
- hit the search button
- you're redirected towards http://vxymon.hswn.dk/services/#ipgw.hswn.dk

Host vxymon.hswn.dk doesn't exist. On my system it's redirecting to http://localhost.

2 questions:
- why is the xymon server hostname changing and is there a place to configure it for findhost's answer ?
- why is the answer redirecting to http when the query was done on a https URL ?


I looked into findhost.c but didn't have enough time to understand how all of this works.


Cheers,
Francois.
list Japheth Cleaver · Fri, 11 Dec 2015 10:18:36 -0800 ·
quoted from Francois Claire
On Fri, December 11, 2015 5:00 am, Francois Claire wrote:
I have troubles using the findhost feature with the "Jump to page" box
checked. On my xymon server the result URL is using localhost instead
of my xymon server's FQDN.

This problem seems to be reproducible on www.xymon.com:
- go to https://www.xymon.com/xymon-cgi/findhost.sh
- enter "ipgw" in the search field
- hit the search button
- you're redirected towards http://vxymon.hswn.dk/services/#ipgw.hswn.dk

Host vxymon.hswn.dk doesn't exist. On my system it's redirecting to
http://localhost.

2 questions:
- why is the xymon server hostname changing and is there a place to
configure it for findhost's answer ?
- why is the answer redirecting to http when the query was done on a
https URL ?
Confirmed; thanks for the report. It should just be using a relative URL
by default, so there's certainly an error in there.

A workaround for the moment is to uncheck the "Jump to page" option when
searching.


Regards,
-jc
list Japheth Cleaver · Sat, 12 Dec 2015 12:11:34 -0800 ·
quoted from Japheth Cleaver
On Fri, December 11, 2015 10:18 am, J.C. Cleaver wrote:
On Fri, December 11, 2015 5:00 am, Francois Claire wrote:
I have troubles using the findhost feature with the "Jump to page" box
checked. On my xymon server the result URL is using localhost instead
of my xymon server's FQDN.

This problem seems to be reproducible on www.xymon.com:
- go to https://www.xymon.com/xymon-cgi/findhost.sh
- enter "ipgw" in the search field
- hit the search button
- you're redirected towards
http://vxymon.hswn.dk/services/#ipgw.hswn.dk

Host vxymon.hswn.dk doesn't exist. On my system it's redirecting to
http://localhost.

2 questions:
- why is the xymon server hostname changing and is there a place to
configure it for findhost's answer ?
- why is the answer redirecting to http when the query was done on a
https URL ?
Confirmed; thanks for the report. It should just be using a relative URL
by default, so there's certainly an error in there.

A workaround for the moment is to uncheck the "Jump to page" option when
searching.

There are actually a few different issues here, which will warrant
slightly different solutions in 4.3.25 and 4.4x . The problem stems from
how we're loading the environment in for the CGI scripts, which is
slightly different than initscript-run xymonlaunch tasks or simply using
the xymoncmd command.


As a quick fix, do one of:
- ensure your $XYMONWEBHOST variable in xymonserver.cfg is a statically
assigned URL part, and/or
- ensure $XYMONSERVERHOSTNAME and $XYMONSERVERWWWNAME variables are
hard-coded to your server name, and/or
- add a "MACHINEDOTS=your.hostname.here" entry to cgioptions.cfg

This will also fix a display issue on the "info" page for hosts that have
notes configured (the link works, but the link text URL is wrong).


HTH,
-jc
list Francois Claire · Mon, 14 Dec 2015 14:25:46 +0100 ·
quoted from Japheth Cleaver
Le 12/12/2015 21:11, J.C. Cleaver a écrit :
There are actually a few different issues here, which will warrant slightly different solutions in 4.3.25 and 4.4x . The problem stems from how we're loading the environment in for the CGI scripts, which is slightly different than initscript-run xymonlaunch tasks or simply using the xymoncmd command. As a quick fix, do one of: - ensure your $XYMONWEBHOST variable in xymonserver.cfg is a statically assigned URL part, and/or - ensure $XYMONSERVERHOSTNAME and $XYMONSERVERWWWNAME variables are hard-coded to your server name, and/or - add a "MACHINEDOTS=your.hostname.here" entry to cgioptions.cfg This will also fix a display issue on the "info" page for hosts that have notes configured (the link works, but the link text URL is wrong). HTH, -jc 
Allright, thanks for the workarounds.

And thank you for working on it.


Cheers,
Francois.