Page 3 of 9

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Wed Jan 11, 2017 12:34 pm
by kernow5000
Will do.

That past alert was actually real too, still tackling that one!

I love nagios :)

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Wed Jan 11, 2017 12:43 pm
by dwhitfield
It's probably best to start a new thread if the alert did not work properly. However, I think the alert did work, you only got connection refused, which didn't seem appropriate to you. Is that correct?

If the server/application did go down, connection refused doesn't sound odd at all to me, but maybe I am misunderstanding the situation. Maybe you could explain a bit more about the actual alert in the other thread, if you feel it is warranted.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Thu Jan 12, 2017 3:55 am
by kernow5000
That's correct.

I got an absolute ton of email only alerts and a few sms's last night, nothing was down.

Going to do a bit of investigation today but I can hardly increase timeouts any more from 60 seconds.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Thu Jan 12, 2017 3:08 pm
by tgriep
A couple of other things to check on for the intermittent issue for your checks is is network outages, if you have any firewalls that are blocking the Nagios system temporarily.
Do you see any errors in the logs of the web site you are checking?

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 4:03 am
by kernow5000
I'll have a look, but no firewall configuration changes - or activity I can correlate to the alerts.

Checking logs to see if anything untoward is happening, is a good idea though.

I'll have a look.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 5:03 am
by kernow5000
Nagios box:

Same error 11 in /var/log/messages at 12:02 AM

***** Nagios *****
Notification Type: PROBLEM
Service: HTTPS check
Host: REDACTED
Address: REDACTED
State: CRITICAL
Date/Time: Thu Jan 12 12:02:00 GMT 2017
Additional Info:
connect to address REDACTED and port 443: Connection refused



The box being checked:

[12/Jan/2017:00:02:03 +0000] <NAGIOS-IP> TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET / HTTP/1.1" 1



So it registers the hit on the apache log on the box being checked, but nagios says 'connection refused' and fires an alert.
I have no idea why as this is checked every ten minutes, all day every day.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 5:34 am
by kernow5000
nagios:
***** Nagios *****
Notification Type: PROBLEM
Host: REDACTED
State: DOWN
Address: REDACTED
Info: CRITICAL - Socket timeout
Date/Time: Thu Jan 12 14:39:10 GMT 2017

box being checked
<NAGIOS IP> - - [08/Jan/2017:14:39:11 +0000] "GET /REDACTED HTTP/1.1" 200 3

Doesn't make sense.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 11:54 am
by tgriep
It could be that the check is on the edge of the timeout setting that the check_http plugin has and it is causing the connection / timeout intermittent issues.
Try increasing the timeout to 59 seconds for your check_http command by adding the following option to it.
Code: Select all
-t 59

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 11:58 am
by kernow5000
I did notice that 60 second limit actually on external commands.

I'll play about on Monday!

Have a great weekend guys.

Re: Sporadic 'Connection refused' errors in 4.2.4

PostPosted: Fri Jan 13, 2017 12:01 pm
by dwhitfield
Is it possible to send a passive check? I know it's not an ideal solution, but it seems like if other people were getting false positive notifications we'd know about it.

Of course, waiting to hear back about the -t 59 too!