<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi all,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>When a check_http check fails, it looks like there is currently
no information in the nagios console, regarding on _<i>what</i>_ condition the
check failed exactly.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>We were wondering if there was a reason this information is
not reported already? It would indeed be very helpful to those working with the
alerts to see i.e. what url and what string/regex failed exactly. <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>A couple of examples on current output:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Current output, OK:<o:p></o:p></p>
<p class=MsoNormal>./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t
60 -e "200" -s "EVERYTHING_IS_OK"<o:p></o:p></p>
<p class=MsoNormal>HTTP OK HTTP/1.1 200 OK - 0.328 second response time |time=0.327952s;5.000000;10.000000;0.000000
size=815B;;;0<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Current output, string not found:<o:p></o:p></p>
<p class=MsoNormal>./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t
60 -e "200" -s "EVERYTHING_IS_OK"<o:p></o:p></p>
<p class=MsoNormal>CRITICAL - string not
found|time=0.025742s;5.000000;10.000000;0.000000 size=815B;;;0 <o:p></o:p></p>
<p class=MsoNormal><span lang=DA><o:p> </o:p></span></p>
<p class=MsoNormal>Current output, unexpected response code:<o:p></o:p></p>
<p class=MsoNormal>./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t
60 -e "200" -s "EVERYTHING_IS_OK"<o:p></o:p></p>
<p class=MsoNormal>Invalid HTTP response received from host<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>The output for the OK scenario is OK, I believe, but we would like
to decorate the output for the other scenarios, perhaps along this line:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<p class=MsoNormal>Improved <span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>output</span>, string not found:<o:p></o:p></p>
<p class=MsoNormal>./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t
60 -e "200" -s "EVERYTHING_IS_OK"<o:p></o:p></p>
<p class=MsoNormal>CRITICAL: http:// fqdn/self_check.php - String not found: EVERYTHING_IS_OK|time=0.025742s;5.000000;10.000000;0.000000
size=815B;;;0 <o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<p class=MsoNormal>Improved <span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>output</span>, unexpected response code:<o:p></o:p></p>
<p class=MsoNormal>./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t
60 -e "200" -s "EVERYTHING_IS_OK"<o:p></o:p></p>
<p class=MsoNormal>CRITICAL: http:// fqdn/self_check.php – Header content
not found: 200|time=0.025742s;5.000000;10.000000;0.000000 size=815B;;;0 <o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>We looked around for other check_http plugins that might be more “human-oriented”
in their output, but found none – so we believe our best bet is to try to
decorate this one, unless there’s a good reason not to.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>Steffen<o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=DA style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'>-- <o:p></o:p></span></p>
<p class=MsoNormal><span lang=DA style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'>Venlig hilsen / Best regards</span><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:7.5pt;
font-family:"Verdana","sans-serif";color:#1F497D'><br>
<b>Steffen Poulsen</b><br>
UNIX System Administrator<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:7.5pt;
font-family:"Verdana","sans-serif";color:#1F497D'>TDC Hosting A/S</span></b><span
style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:#1F497D'><br>
Phone: +45 70 26 25 27<b><o:p></o:p></b></span></p>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'>E-mail: <a href="mailto:ba@tdchosting.dk"><span
style='color:blue'>sp@tdchosting.dk</span></a></span><span style='font-size:
10.0pt;font-family:"Tahoma","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'>Web: <a href="http://www.tdchosting.dk/" target="_blank"><span
style='color:blue'>www.tdchosting.dk</span></a></span><span style='font-size:
10.0pt;font-family:"Tahoma","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>