Suggested enhancement to check_http
Posted: Tue Aug 10, 2010 3:56 pm
We're getting a lot of complaints about the check_http module. One thing we would like to see it do is to print out the url that it failed to connect to in case of a failure (or even if it is ok). It would be nice to have a command line parameter (like -z) that would enable this functionality.
I think it would be as simple as creating a new variable called:
char full_url[4096] = {0};
Then inside the check_http you could set it like this:
sprintf(full_url, "%s://%s:%d%s", use_ssl ? "https" : "http", server_address,
server_port, server_url);
In the critical areas, make sure that it will show it when an error occurs: die (STATE_CRITICAL, _("HTTP CRITICAL - Error on receive - %s\n"), full_url);
The reason behind all this is people don't understand some of the alerts they get simply because other people set them up. In smaller shops usually the people will set up all of their own alerts, but oftentimes they do not here.
I think it would be as simple as creating a new variable called:
char full_url[4096] = {0};
Then inside the check_http you could set it like this:
sprintf(full_url, "%s://%s:%d%s", use_ssl ? "https" : "http", server_address,
server_port, server_url);
In the critical areas, make sure that it will show it when an error occurs: die (STATE_CRITICAL, _("HTTP CRITICAL - Error on receive - %s\n"), full_url);
The reason behind all this is people don't understand some of the alerts they get simply because other people set them up. In smaller shops usually the people will set up all of their own alerts, but oftentimes they do not here.