Hi,
I am running Nagios Core 3.4.1 and I need to monitor numerous sites that are running on a few servers. How do I setup Nagios to do a host header check since all the sites run off of one IP?
check host headers in iis and vhosts in apache
-
- Posts: 4
- Joined: Fri Apr 11, 2014 10:36 am
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check host headers in iis and vhosts in apache
Might you be looking for check_http and some of the flags such as:
I posted all the flags that I thought might be of use to you, try some out and see if they give the results you expect. If not please post what you have tried, what didn't work or wasn't expected, and what you would like to see instead.
Code: Select all
-H, --hostname=ADDRESS
Host name argument for servers using host headers (virtual host)
Append a port to include it in the header (eg: example.com:5000)
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup).
-d, --header-string=STRING
String to expect in the response headers
-u, --url=PATH
URL to GET or POST (default: /)
-N, --no-body
Don't wait for document body: stop reading after headers.
(Note that this still does an HTTP GET or POST, not a HEAD.)
-k, --header=STRING
Any other tags to be sent in http header. Use multiple times for additional headers
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
- Posts: 4
- Joined: Fri Apr 11, 2014 10:36 am
Re: check host headers in iis and vhosts in apache
This is exactly what I was looking for. Can I use the check_http -H as both a host and service check?
Re: check host headers in iis and vhosts in apache
You absolutely can. That is true of all plugins, though some make more sense as a host check or vice versa.casey.franks wrote:Can I use the check_http -H as both a host and service check?
Former Nagios employee