Page 1 of 1

Url certificate error

Posted: Mon Sep 08, 2014 12:34 am
by ashok
Hi All,

This is reagrding an url monitoring ,

It was accessible ... but in nagios it was showing for 1 or 1 1/2 hrs as
UNKNOWN: /usr/bin/wget --output-document=tmp_html --no-check-certificate -S returns no result!

and then it will go to OK: 200 OK state.


This is frequently happening. I tried many ways. but no use,

Please help me..

Re: Url certificate error

Posted: Mon Sep 08, 2014 8:00 am
by eloyd
It sounds like your URL stops working for a while, and that Nagios is incorrectly processing the error as a security certificate failure and not a URL failure.

To begin any sort of troubleshooting, we would need to know the specific command that Nagios is executing.

Re: Url certificate error

Posted: Mon Sep 08, 2014 3:44 pm
by lmiltchev
@ashok
Can you show us the actual command that you are running?
To begin any sort of troubleshooting, we would need to know the specific command that Nagios is executing.

Re: Url certificate error

Posted: Tue Sep 09, 2014 2:52 am
by ashok
define command {
command_name check_URL1
command_line $USER1$/check_url.pl $HOSTADDRESS$ --no-check-certificate
}

Re: Url certificate error

Posted: Tue Sep 09, 2014 8:17 am
by eloyd
First, you are passing "--no-check-certificate" to the command, which is not required - it is included in the perl code.

Second, you are simply passing $HOSTADDRESS$ to the command, which is the name of the host (or it's IP address). This may be your intention, but if the host_name is foo.bar.com, then the URL that the script will test is simply http://foo.bar.com/. This may or may not be what you intend to test.

If that is what you intend to test, then the command is working as designed. Namely, when there is no valid output, it fails. This is not one of the most robust Nagios plugins I've ever seen, but the internal logic looks valid.

Is it possible that your web server or your DNS server was failing at the time?

Re: Url certificate error

Posted: Tue Sep 09, 2014 5:24 pm
by abrist
eloyd: thanks for teh help as always.
OP: Let us know the answers to eloyd's questions when you get a chance.

Re: Url certificate error

Posted: Wed Sep 10, 2014 2:03 am
by ashok
Thanks for the information. it was very helpfull..

Issue got resolved.. changed max check attempts to 3.. previously it was one..

after the next check it got correct output ( OK) and was displaying fine..
thanks a lot