Url certificate error

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
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

Url certificate error

Post 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..
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Url certificate error

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Url certificate error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

Re: Url certificate error

Post by ashok »

define command {
command_name check_URL1
command_line $USER1$/check_url.pl $HOSTADDRESS$ --no-check-certificate
}
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Url certificate error

Post 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?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Url certificate error

Post by abrist »

eloyd: thanks for teh help as always.
OP: Let us know the answers to eloyd's questions when you get a chance.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

Re: Url certificate error

Post 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
Locked