check_http insecure SSL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

check_http insecure SSL

Post by BanditBBS »

I know this has been asked before, and I tried to search a very little :)

I have a site I want to monitor that has a bad cert. If I use curl -k blah.com:4443 I get the page and everything is good.

Is there not a method with the check_http plugin to mimmic the -k curl usage?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_http insecure SSL

Post by sreinhardt »

You're gonna make me lookup curl usage aren't you? If I recall, that is just an ignore ssl cert errors and continue, correct? If so, the default behavior would already include this, as check_http should never care about expiration or hostname to cert name matching, unless you specify it to check days until expiration.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_http insecure SSL

Post by BanditBBS »

sreinhardt wrote:You're gonna make me lookup curl usage aren't you? If I recall, that is just an ignore ssl cert errors and continue, correct? If so, the default behavior would already include this, as check_http should never care about expiration or hostname to cert name matching, unless you specify it to check days until expiration.
Yes, ignore errors and continue. If I try check_http I get this:

Code: Select all

HTTP CRITICAL - No data received from host
But if I curl -k to that I get all kinds of lovely html code.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_http insecure SSL

Post by sreinhardt »

I assume you are, but are you using -S and possibly -S3? Could you post the output from appending -vvv for me?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_http insecure SSL

Post by BanditBBS »

Code: Select all

[nagios@iss-chi-nag05 libexec]$ ./check_http -H tdocs.trinitylogisticsonline.com --ssl -p 4443 -vvv
GET / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: tdocs.trinitylogisticsonline.com:4443
Accept: */*


HTTP CRITICAL - No data received from host
and

Code: Select all

[nagios@iss-chi-nag05 libexec]$ curl https://tdocs.trinitylogisticsonline.com:4443 -k
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en-US">
<head>
<title>Oracle Collaboration Suite</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="ohs_images/portals.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" link="#663300" vlink="#996633" alink="#FF6600" text="#000000">
<span style="font-size: 1pt"><a href="#portlets" title="List topics on this page"><img src="ohs_images/space.gif" alt="Skip tabs" height="1" width="1" align="right" border="0"></a></span>

<!-- tabs -->
<a name="tabs" id="tabs"></a>
<table summary="" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" valign="top" class="OraLightHeaderSub"><img alt="Oracle Collaboration Suite logo" src="ohs_images/OCSv1_home_banner.gif" width="375" height="16"></td>
</tr>
<tr>
<td>
<table summary="" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>

<!-- blue banner -->
<table summary="" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr valign="top">
<td height="24">
<table summary="" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td bgcolor="#336699" nowrap valign="bottom" align="left" width="50"> </td>
<td style="background: url(Tab_files/asysrtb.gif)" height="30" nowrap valign="top"><img alt="" border="0" height="30" src="Tab_files/asysrt.gif" width="40"></td>
<td style="background: url(ohs_images/rhshadow.gif)" height="30" nowrap valign="top" width="10" align="left"><img alt="" border="0" height="30" src="Tab_files/asylrhs.gif" width="8"></td>
</tr>
<tr>
<td style="background: url(Tab_files/asylttb.gif)" nowrap valign="top" align="left" width="50" height="16"> </td>
<td nowrap valign="top" width="600" height="16"><img alt="" border="0" height="16" src="Tab_files/asysrb.gif" width="40"></td>
<td align="left" valign="top" width="10" height="16"><img alt="" height="1" src="ohs_images/space.gif" width="1"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table><a name="portlets" id="portlets"></a> <span style="font-size: 1pt"><img src="ohs_images/space.gif" alt="This page contains the following topics:" border="0"> <a href="#doc"><img src="ohs_images/space.gif" alt="Documentation" height="1" width="1" border="0"></a> <img src="ohs_images/space.gif" alt="Quick Tutorial" height="1" width="1" border="0"> <img src="ohs_images/space.gif" alt="Release Notes" height="1" width="1" border="0"> <a href="#oem"><img src="ohs_images/space.gif" alt="Oracle Enterprise Manager" height="1" width="1" border="0"></a> <img src="ohs_images/space.gif" alt="New Features" height="1" width="1" border="0"></span>

<!-- main layout table -->
<div align="left">
<table summary="" width="100%" border="0" cellspacing="0" cellpadding="4">
<tr valign="top">

<!-- left column -->
<td>
<div align="left">
<img alt="Welcome to the Oracle Collaboration Suite" src="ohs_images/home.gif" width="500" height="60"><br>
<br>
<br>
</div><a name="doc" id="doc"></a>
<table summary="" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="#CCCC99" colspan="2"><img alt="" src="ohs_images/bisspace.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="142" class="OraInstructionText" width="30%">
<p align="center"><img alt="" src="ohs_images/art3.gif" width="150" height="200"></p>
</td>
<td height="142" class="OraInstructionText" width="70%">
<p><font face="Arial, Helvetica, sans-serif">For the latest documentation, see <a href="http://www.oracle.com/technology/documentation/collab.html">http://www.oracle.com/technology/documentation/collab.html</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif">For the latest technical support information, see <a href="http://metalink.oracle.com/">http://metalink.oracle.com/</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif">To manage and monitor Oracle Collaboration Suite, log on to <a href="http://tlc-365-pap05.tlc.itciss.com:1156">Oracle Enterprise Manager Application Server Control</a>.</font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="left">
<table summary="" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="604"> </td>
<td rowspan="2" valign="bottom" width="12"><img alt="" src="ohs_images/slieghright.gif" width="12" height="15"></td>
</tr>
<tr>
<td bgcolor="#CCCC99" height="1"><img alt="" src="ohs_images/bisspace.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="5"><img alt="" src="ohs_images/bisspace.gif" width="1" height="1"></td>
</tr>
<tr>
<td align="left" class="OraInstructionText"> </td>
</tr>
</table>
</div>
</body>
</html>
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_http insecure SSL

Post by tgriep »

Try changing the command to this.

Code: Select all

./check_http -H tdocs.trinitylogisticsonline.com --ssl -p 4443 -S2
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_http insecure SSL

Post by BanditBBS »

tgriep wrote:Try changing the command to this.

Code: Select all

./check_http -H tdocs.trinitylogisticsonline.com --ssl -p 4443 -S2
Not quite sure who you are, but you are now my favorite nagios employee :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_http insecure SSL

Post by sreinhardt »

Good thing you added the domain in there. It's just check_http not playing nice with autonegotiation, and your server wanting sslv2. Try:

Code: Select all

./check_http -H tdocs.trinitylogisticsonline.com -p 4443 -S2 -vvv
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked