Suggested enhancement to check_http

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Suggested enhancement to check_http

Post by niebais »

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.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Suggested enhancement to check_http

Post by mmestnik »

You may certinally modify the check commands and even submit changes back upstream. As the full url can be included as part of the display_name it's not needed as part of the check command output.

http://nagios.sourceforge.net/docs/3_0/ ... ml#service
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Suggested enhancement to check_http

Post by niebais »

Ok, I'll see if I can't check something in this next week.
Locked