Page 1 of 2

Website Checks

Posted: Wed Aug 26, 2020 11:58 am
by RebeccaIlene
Hi Team,

We are using the check_http plugin to check the availability of websites.
There is no issue with the availability as we can browse them fine but the check keeps failing with a socket timeout error.
What can cause this and how can it be fixed?

Regards,
Rebecca Murray

Re: Website Checks

Posted: Wed Aug 26, 2020 2:40 pm
by jdunitz
Hi Rebecca,

Do you get the timeouts when you run the check script from the command line, too? Or does this only happen when Nagios runs it?

--Jeffrey

Re: Website Checks

Posted: Thu Aug 27, 2020 1:30 am
by RebeccaIlene
Hi Jeffrey,

The time out occurs when checking from command line as well.

Re: Website Checks

Posted: Thu Aug 27, 2020 5:08 pm
by benjaminsmith
HI Rebecca,

If the failing checks are an intermittent issue, then it's likely the result of network congestion, try adding the -t 60 option to the plugin arguments, and let me know if that helps.

Re: Website Checks

Posted: Fri Aug 28, 2020 12:41 am
by RebeccaIlene
Hi Benjamin,

We have set the timeout as 180 seconds.

It is still the same.

Re: Website Checks

Posted: Fri Aug 28, 2020 2:44 pm
by benjaminsmith
Hi Rebbecca,

So it sounds like it's never returning a valid result, just getting the timeout error. Can you post the full check command to the thread for us to review?

Can you ping the address?

Code: Select all

ping examplesite.com
Are you using an IP address or hostname in the check command? If it's a hostname, is the address resolvable? Thanks, Benjamin
Is the hostname resolvable?

Code: Select all

nslookup examplesite.com

Re: Website Checks

Posted: Mon Aug 31, 2020 11:44 am
by RebeccaIlene
Hi Benjamin,

The checks does give a valid output some times. See the below checks run from the command line:

[root@hostname ]# /$USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -H 10.*.*.* -u https://vpn.domain.com
CRITICAL - Socket timeout after 180 seconds

[root@hostname ]# $USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -H 10.*.*.* -u https://vpn.domain.com
HTTP OK: HTTP/1.1 200 OK - 6075 bytes in 0.062 second response time |time=0.061700s;10.000000;15.000000;0.000000 size=6075B;;;0

When I ping the address it gives 100% loss.

We are using the IP address in the command check not the hostname.

Re: Website Checks

Posted: Tue Sep 01, 2020 1:16 am
by RebeccaIlene
To add to this the network team performed a packet capture to see if any drops but didn't find any drops or latency.

Re: Website Checks

Posted: Tue Sep 01, 2020 1:14 pm
by benjaminsmith
Hi Rebbecca,
To add to this the network team performed a packet capture to see if any drops but didn't find any drops or latency.
If the network capture is good, but 100% packet loss on a ping, something is not quite right. Since you're using the IP address of the host instead, adjust your check_http command to use the -I option to avoid the DNS, for example:

Code: Select all

/$USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -I 10.*.*.* -u https://vpn.domain.com
And then add the -v option for debug output, and post any error message to the thread. Thanks, Benjamin

Code: Select all

/$USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -I 10.*.*.* -u https://vpn.domain.com -v | less

Re: Website Checks

Posted: Wed Sep 02, 2020 11:05 pm
by RebeccaIlene
Hi Benjamin,

The command was successful the first time and then again threw a socket timeout error.


Working:

[root@hostname ~]# $USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -I 10.*.*.* -u https://vpn.domain.com -v
GET https://vpn.domain.com HTTP/1.0
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Accept: */*


https://10.*.*.*:443https://vpn.domain.com is 263 characters
STATUS: HTTP/1.0 302 Found
**** HEADER ****
Server: BigIP
Cache-Control: no-cache, no-store
Connection: Close
Content-Length: 0
Location: /vdesk/hangup.php3
Set-Cookie: LastMRH_Session=ff19456e;path=/;secure
Set-Cookie: MRHSession=962183175d85d0f43a1b8959ff19456e;path=/;secure
**** CONTENT ****

Redirection to http://10.*.*.*:443/vdesk/hangup.php3
GET /vdesk/hangup.php3 HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: 10.*.*.*
Accept: */*


https://10.*.*.*:443/vdesk/hangup.php3 is 5332 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Thu, 03 Sep 2020 03:41:12 GMT
Server: BigIP
Content-Length: 4638
Connection: close
Content-Type: text/html; charset=utf-8
X-Frame-Options: DENY
Set-Cookie: MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Set-Cookie: F5_ST=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Set-Cookie: MRHSHint=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Set-Cookie: F5_HT_shrinked=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Set-Cookie: F5_fullWT=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Set-Cookie: MRHSequence=deleted;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
**** CONTENT ****
<html>
<head>
<meta name="robots" content="noindex,nofollow">
<title>BIG-IP logout page</title>
<link rel="stylesheet" type="text/css" HREF="/public/include/css/apm.css">
<script src="/public/include/js/common.js" language="javascript"></script>
<script src="/public/include/js/u_plugin.js" language="javascript"></script>

<script language="javascript">
function InsertActivexControl(clsid, params)
{
var container = document.getElementById("logoutActivexContainer");

if (navigator.appName == "Microsoft Internet Explorer") {
var paramsCode = "";
for (var item in params) {
paramsCode += "<param name='" + item + "' value='" + params[item] + "'>";
}

container.innerHTML =
"<center><object classId=CLSID:" + clsid + " border=0 width=1 height=1>" +
paramsCode + "</object></center>";
}
else {
var pluginHost = new UPluginHost("", container);
var control = {"clsid": clsid, "width": 1, "height": 1};
pluginHost.hostControl(control, params);
}
}

function OnLoad()
{
var isBrowserControl = false;
try {
isBrowserControl = ("undefined" != typeof(window.external))
&& ("unknown" != typeof(window.external))
&& ("undefined" != typeof(window.external.WebLogonNotifyUser))
&& ("unknown" != typeof(window.external.WebLogonNotifyUser));
}
catch(e) {}
if(!isBrowserControl) {
document.getElementById("newSessionDIV").style.visibility = "visible";
}

try
{
if (get_cookie("F5_PWS") == "1")
{
document.cookie = "F5_PWS=0; path=/; expires=Fri, 01-Jan-1970 00:00:01 GMT";
var pwsClassId = "7E73BE8F-FD87-44EC-8E22-023D5FF960FF";
InsertActivexControl(pwsClassId, {"command": "exit"} );
}
}catch (e) {};
}
</script>
</head>

<body onload="OnLoad();">
<script>
try{

if(window.external && window.external.WebLogonOnAuthFailure) {
window.external.WebLogonOnAuthFailure();
}
}catch(e){};
try {
window.external.OnHostClose();
} catch(e) { }
</script>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" id="viewport" content="initial-scale=1.0" />
<meta name="robots" context="noindex,nofollow">
<script language="javascript">
//orientation toolbox
function setViewport(){
document.getElementById("viewport").setAttribute('content', Math.abs(window.orientation) == 90 ? 'width=device-height, initial-scale=1' : 'width=device-width, initial-scale=1.0' );
}
setViewport();
window.onorientationchange = function() {
setViewport();
}
</script>
<table id="page_header">
<tr >
<td id="header_leftcell"><img src='/public/images/customization/Common/PROD_RemoteUserVPN_vpn.domain.com_access_general_ui/logo_image_en.png'/></td>
<td id="header_rightcell"></td>
</tr>
<tr>
<td></td>
<td id="maxTimeoutTd"><span id="maxTimeoutTag" title=""></span></td>
</tr>
</table>
<noscript>
<div id="noscript_warning_red">JavaScript is not enabled. Please enable JavaScript in your browser or contact your system administrator for assistance.</div>
<div id="noscript_warning_newsession">To open a new session, please <A href="/">click here.</A></div>
</noscript>
<table id="main_table" class="logout_page">
<tr>
<td id="main_table_info_cell">
<table id="interaction_table">
<tr>
<td id="interaction_table_header">Your session is finished.</td>
</tr>
<tr>
<td class="interaction_table_option_cell"><br><DIV ID="sessionDIV" style='visibility:hidden' align=left></DIV>
Logged out successfully.<br> <br>Thank you for using BIG-IP.<br><br>
<div id="newSessionDIV" style='visibility:hidden'>To open a new session, please <A href='/'>click here.</A></div> </td>
</tr>
<tr>
<td class="interaction_table_footer"></td>
</tr>
</table>
</td>
<td id="main_table_image_cell"><img src="/public/images/my/tr.gif"></td></tr>
</table>
<div id="page_footer"><div>This product is licensed from F5 Networks. © 1999-2018 F5 Networks. All rights reserved. </div></div>
<DIV ID="logoutActivexContainer" class="inspectionHostDIVSmall"></DIV>

</body>
</html>

HTTP OK: HTTP/1.1 200 OK - 5332 bytes in 0.043 second response time |time=0.042636s;10.000000;15.000000;0.000000 size=5332B;;;0


Error:

[root@hostname ~]# $USER2$/check_http -t 180 -w 10 -c 15 --ssl -f follow -I 10.*.*.* -u https://vpn.domain.com -v
GET https://vpn.domain.com HTTP/1.0
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Accept: */*


https://10.*.*.*:443https://vpn.domain.com is 263 characters
STATUS: HTTP/1.0 302 Found
**** HEADER ****
Server: BigIP
Cache-Control: no-cache, no-store
Connection: Close
Content-Length: 0
Location: /vdesk/hangup.php3
Set-Cookie: LastMRH_Session=a9d75324;path=/;secure
Set-Cookie: MRHSession=4b2dd710bbb17eece760c2e4a9d75324;path=/;secure
**** CONTENT ****

Redirection to http://10.*.*.*:443/vdesk/hangup.php3
GET /vdesk/hangup.php3 HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: 10.*.*.*
Accept: */*


CRITICAL - Socket timeout after 180 seconds