Xymon Mailing List Archive search

Changing Host Header

4 messages in this thread

list Thomas Seglard · Mon, 28 Mar 2011 17:13:48 +0200 ·
Hello,
 
First of all, I'm using Xymon 4.2.3 J I want to get the Apache
performance  graphs but to achieve that I need to send a specific host
header due to my Apache configuration. This command is working thanks to
curl :
 
xymonServer:$ curl -H"Host: localhost" http://prdwatweb016:8090/sstatus
 
If I specify any other host, I couldn't get the Apache status. So my
question is : how can I do that with Xymon ?
Sincerly,
 
Thomas S
PS : oh and I really appreciate the new version, that's so great work.
I'm really waiting for this one J
list Henrik Størner · Mon, 28 Mar 2011 17:46:48 +0200 ·
quoted from Thomas Seglard
Den 28-03-2011 17:13, SEGLARD, Thomas skrev:
First of all, I’m using Xymon 4.2.3 J I want to get the Apache
performance graphs but to achieve that I need to send a specific host
header due to my Apache configuration. This command is working thanks to
curl :

xymonServer:$ curl -H"Host: localhost" http://prdwatweb016:8090/sstatus

If I specify any other host, I couldn’t get the Apache status. So my
question is : how can I do that with Xymon ?
Use "apache=http://prdwatweb016:8090/sstatus"; and make sure 
"prdwatweb016" resolves to the right IP. Worst case, add an entry to 
your Xymon servers' /etc/hosts file for it.

(With ordinary http checks, you could specify the IP to use as
    http://prdwatwab016=127.0.0.1:8090/sstatus
  but I'm not sure if that works for the "apache" test).


Regards,
Henrik
list Thomas Seglard · Tue, 29 Mar 2011 14:14:37 +0200 ·
Hi Henrik,

Thanks a lot for answer but none of your solutions work. Basically, I have 30 webservers running Apache and the only way to have their "server status" statistics is putting a header "Host: localhost". When I'm using "apache=http://prdwatweb016:8090/sstatus"; within Xymon configuration, I can see in prdwatweb016's Apache logs that Apache can't get access to /sstatus due to server configuration meaning that it doesn't have the specific header.

I can't modify the Apache's configuration due to our security policy but I can make a little script to get the stats on each server. The main problem is that I don't know how to send these stats to Xymon Server to be analyzed and graphed properly...

Maybe I'm not asking the correct question :) Please feel free to correct me or ask for more infos.
Sincerly,

Thomas S
quoted from Henrik Størner

-----Message d'origine-----
De : Henrik Størner [mailto:user-ce4a2c883f75@xymon.invalid] 
Envoyé : lundi 28 mars 2011 17:47
À : SEGLARD, Thomas
Cc : xymon at xymon.com
Objet : Re: [Xymon] Changing Host Header

Den 28-03-2011 17:13, SEGLARD, Thomas skrev:
First of all, I'm using Xymon 4.2.3 J I want to get the Apache
performance graphs but to achieve that I need to send a specific host
header due to my Apache configuration. This command is working thanks to
curl :

xymonServer:$ curl -H"Host: localhost" http://prdwatweb016:8090/sstatus

If I specify any other host, I couldn't get the Apache status. So my
question is : how can I do that with Xymon ?
Use "apache=http://prdwatweb016:8090/sstatus"; and make sure 
"prdwatweb016" resolves to the right IP. Worst case, add an entry to 
your Xymon servers' /etc/hosts file for it.

(With ordinary http checks, you could specify the IP to use as
    http://prdwatwab016=127.0.0.1:8090/sstatus
  but I'm not sure if that works for the "apache" test).


Regards,
Henrik
list Henrik Størner · Wed, 30 Mar 2011 13:57:00 +0200 ·
On Tue, 29 Mar 2011 14:14:37 +0200, "SEGLARD, Thomas" <user-da8ce279e795@xymon.invalid>
quoted from Thomas Seglard
wrote:
Thanks a lot for answer but none of your solutions work. Basically, I
have
30 webservers running Apache and the only way to have their "server
status"
statistics is putting a header "Host: localhost". 
The equivalent of your "curl" command
xymonServer:$ curl -H"Host: localhost" http://prdwatweb016:8090/sstatus
would be

   10.0.1.1 prdwatweb016 # apache=http://localhost=10.0.1.1:8090/sstatus

assuming your "prdwatweb016" server has IP 10.0.1.1.

But using "localhost" with a non-127.x.x.x IP just doesn't sound right :-)


Regards,
Henrik