Is this a bug in Nagios core or by design?
Posted: Wed Jun 29, 2016 7:12 am
This is the scenario.
I have two web servers (serverA and serverB) behind a load balanced address serverLB. If you try to connect to the individual servers by hostname you get redirected. One page only (for monitoring) is accesible directly via IP address on each web server.
From the command line I can run the command:
and if I enable verbose I can see that I'm on the respective servers.
So I've assumed that if I set this in my services.cfg file, everything would be OK.
Well it's not OK. Nagios ignores the 'I' option and still uses the hostname, which means I'm not getting the result I wanted or expected.
This looks like a bug to me, unless someone can tell me otherwise?
I have two web servers (serverA and serverB) behind a load balanced address serverLB. If you try to connect to the individual servers by hostname you get redirected. One page only (for monitoring) is accesible directly via IP address on each web server.
From the command line I can run the command:
Code: Select all
./check_http -I 10.10.8.64 -f follow -s "Results check:" or ./check_http -I 10.10.8.65 -f follow -s "Results check:"So I've assumed that if I set this in my services.cfg file, everything would be OK.
Code: Select all
define service{
use generic-service ; Name of service template to use
host_name serverA
service_description Homepage
check_command check_http! -I 10.10.8.64 -f follow -s "Results check:"
}
define service{
use generic-service ; Name of service template to use
host_name serverB
service_description Homepage
check_command check_http! -I 10.10.8.65 -f follow -s "Results check:"
}This looks like a bug to me, unless someone can tell me otherwise?