<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000099">
My checkcommands.cfg has an "check_http" entry that looks like this:<br>
<br>
<blockquote># 'check_http' command definition<br>
define command{<br>
        command_name    check_http<br>
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$<br>
        }<br>
</blockquote>
<br>
My services.cfg has a correlating entry that looks like this:<br>
<br>
<blockquote>## HTTP - alternate URL suffix<br>
define service {<br>
        host_name                       server<br>
        service_description             HTTP<br>
        check_command                   check_http!-p 9090 -u /proteus<br>
        ~<br>
        action_url                     
/nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$<br>
}<br>
</blockquote>
<br>
When I run this at the command line, I see:<br>
<br>
<blockquote>/usr/local/nagios/libexec/check_http -I server -p 9090 -u
/proteus<br>
HTTP OK - HTTP/1.1 301 Moved Permanently - 0.002 second response time
|time=0.002480s;;;0.000000 size=577B;;;0<br>
</blockquote>
<br>
So far, so good, but what I really want to see is the URL in the
output. Obviously, looking at the test, I can combine the server name,
port, and URL suffix to figure out the URL. Unfortunately, while I'm
good at shell scripting and perl, I'm not a C guy and the http test
(check_http) is written in C. Anyone know what I would change in
check_http.c to have the output show something like this:<br>
<br>
/usr/local/nagios/libexec/check_http -I server -p 9090 -u /proteus<br>
HTTP OK - HTTP/1.1 301 Moved Permanently <b><a class="moz-txt-link-freetext" href="http://server:9090/proteus">http://server:9090/proteus</a></b>
- 0.002 second response time |time=0.002480s;;;0.000000 size=577B;;;0<br>
<br>
Its one thing to be told that my website is down, but when I'm runnng
multiple copies of Apache, Tomcat, and custom apps and hosting perhaps
20 different URL's and port combinations, it would be a LOT more
convenient if Nagios showed me which URL was failing in the output of
the test.<br>
<pre class="moz-signature" cols="72">-- 


  A. Davis
  Email:     <a class="moz-txt-link-abbreviated" href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>

  "There is no limit to what a man can accomplish
   if he doesn't care who gets the credit." - Ronald Reagan
</pre>
</body>
</html>