1. Due to the way some of our infrastructure is set up we have occasion instances where an internal site will still support an essential business function but will not have a valid SSL Certificate; these instances are normally temporary and exist during the decommission or upgrade periods for old internal processes. During this period we still want to be able to use Nagios to monitor the content of the web page to make sure things are loading as expected form databases or what have you. Is there a way to use check_http to monitor the content of a page that has a bad SSL Certificate?
2. We have not had any luck using check_http to check page content behind an HTML redirect. This is a real example with URLs changed for privacy:
this.that.com uses an HTML refresh (redirect) to redirect to http://www.this.com/tr/that/ which contains the following text: "Type the code".
Code: Select all
[root:libexec]# ./check_http -H this.that.com -s 'Type the code' -f follow -u "/" -4
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Type the code' not found on 'http://this.that.com:80/' - 423 bytes in 0.042 second response time |time=0.041859s;;;0.000000 size=423B;;;0Code: Select all
[root:libexec]# ./check_http -H this.that.com -s 'Type the code' -f follow -u "/" -4 -v
GET / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: this.that.com
Accept: */*
http://this.that.com:80/ is 423 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Mon, 08 Dec 2014 19:50:52 GMT
Server: Apache/2.2.15 (CentOS)
Last-Modified: Tue, 14 Jan 2014 19:56:46 GMT
ETag: "40848-9b-4453297891b80"
Accept-Ranges: bytes
Content-Length: 155
Connection: close
Content-Type: text/html; charset=UTF-8
**** CONTENT ****
<html>
<META HTTP-EQUIV="Refresh" Content="0; URL=http://www.this.com/tr/that/">
<head>
<title>this Redirect</title>
</head>
<body>
</body>
</html>
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Type the code' not found on 'http://this.that.com:80/' - 423 bytes in 0.042 second response time |time=0.042296s;;;0.000000 size=423B;;;0