Need Help - Can Nagios follow a "Meta refresh" redirect?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
joe1871
Posts: 28
Joined: Tue Feb 01, 2011 3:36 pm

Need Help - Can Nagios follow a "Meta refresh" redirect?

Post by joe1871 »

We have a new app that is hadling our web pages in HTML5. I have always monitored the site using check_http. With the latest release of the app that we use, there is a "meta refresh" that is causing check_http to fail. I have tried using the "-f follow" to no success. Anyone tell me how to do this? I cannot monitor these sites, and it is a pretty critical issue for us.

Here is the command we use - masking out sensitive data.

./check_http -H 172.xx.xxx.xxx -v -u /ws/oturl/get?apiKey=-xxxxxxxxxxx -s "/oturl.html?key="

Here is the verbose output following the above command:

http://172.xxx.xxx.xxx:80/ws/oturl/get? ... xxxxxxxxxx is 507 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Server: nginx/1.9.1
Date: Tue, 15 Dec 2015 20:41:54 GMT
Content-Length: 142
Connection: close
Set-Cookie: GWSID=xxxxxxxxxx; expires=Sat, 13 Feb 2016 00:00:00 UTC; path=/;
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
**** CONTENT ****
<HTML><HEAD><META HTTP-EQUIV="refresh" CONTENT="0;URL=/ws/oturl/get?apiKey=xxxxxxxxxxxx"></HEAD><BODY></BODY></HTML>

HTTP CRITICAL: HTTP/1.1 200 OK - string '/oturl.html?key=' not found on 'http://172.xxx.xxx.xxx:80/ws/oturl/get? ... xxxxxxxx"- 507 bytes in 0.004 second response time |time=0.004411s;;;0.000000 size=507B;;;0


Any help, especially quick help, would be incredibly appreciated.

Thanks

Joe
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need Help - Can Nagios follow a "Meta refresh" redirect?

Post by rkennedy »

What version of check_http are you using?

Check with this command -

Code: Select all

./check_http -V
Former Nagios Employee
joe1871
Posts: 28
Joined: Tue Feb 01, 2011 3:36 pm

Re: Need Help - Can Nagios follow a "Meta refresh" redirect?

Post by joe1871 »

Thanks for responding!

the plugin is check_http v2.0.3 (nagios-plugins 2.0.3)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Need Help - Can Nagios follow a "Meta refresh" redirect?

Post by tmcdonald »

I don't believe this will be possible. check_http doesn't have an HTML or a JavaScript engine built in, so it has no concept of what either of those do. Since the refresh is within an HTML element as opposed to an HTTP header, check_http has no way of knowing what the element does, or even is.

You might have more luck with WebInject: https://github.com/sni/Webinject

But it is not our project so any support we could offer would be based solely on our own experiences with it.
Former Nagios employee
Locked