Sporadic 'Connection refused' errors in 4.2.4

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby dwhitfield » Tue Jan 31, 2017 12:25 pm

@kernow5000, what would you like to do? As I see it, we have three options:

1. Leave this open in case you want to dig into it in the future.
2. Lock the thread
3. Turn debugging back on and send us the logs.

Seems like 3 is probably out, so 1 or 2?

Thanks!
Want some dope tunes? Hit that web link to the right.
dwhitfield
Former Nagios Staff
 
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Tue Jan 31, 2017 12:27 pm

I'll turn the problematic checks on tomorrow and enable debugging, then update you here. :)
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby dwhitfield » Tue Jan 31, 2017 1:21 pm

Sounds great, thanks!

UPDATE: Logs received and shared with techs
Want some dope tunes? Hit that web link to the right.
dwhitfield
Former Nagios Staff
 
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Wed Feb 01, 2017 5:00 am

Problematic checks re-enabled for the day and logging enabled (debug=1)

All set to email notifications only so shouldn't get too annoying. I'll PM logs to one of you tomorrow probably.

(Please treat with sensitivity) :)
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Wed Feb 01, 2017 5:58 am

Running for an hour or so so far. Not a single connection refused error and everything reporting normally.
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Wed Feb 01, 2017 6:32 am

Put debug to -1 as I have plenty of space and 1 was only really showing function calls.

Ah that's better.
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Wed Feb 01, 2017 9:30 am

Same old connection refused errors again on the checks I re-enabled.

I'll pm you some logs.
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby tgriep » Wed Feb 01, 2017 1:26 pm

It looks like there is a missing " in the notify-host-by-email command. There should be one between the -s and the $NOTIFICATIONTYPE$.
Edit that command and change it from
Code: Select all
command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s  $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$

to
Code: Select all
command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s  "$NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$


Save it out and restart nagios

Make sure the notify-service-by-email command is correct as well.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8984
Joined: Thu Oct 30, 2014 9:02 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Thu Feb 02, 2017 6:48 am

That is actually there, I just use nano and you know.. Column width clipping and all that.


Code: Select all
command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$


Code: Select all
command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Postby kernow5000 » Thu Feb 02, 2017 11:06 am

(They are the standard notification commands that come in commands.cfg with Nagios... basically)

Unlikely they are wrong, as they haven't been altered.
kernow5000
 
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

PreviousNext

Return to Community Support

Who is online

Users browsing this forum: No registered users and 29 guests