Sporadic 'Connection refused' errors in 4.2.4
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Sporadic 'Connection refused' errors in 4.2.4
@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!
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!
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
I'll turn the problematic checks on tomorrow and enable debugging, then update you here.
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Sporadic 'Connection refused' errors in 4.2.4
Sounds great, thanks!
UPDATE: Logs received and shared with techs
UPDATE: Logs received and shared with techs
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
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)
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)
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
Running for an hour or so so far. Not a single connection refused error and everything reporting normally.
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
Put debug to -1 as I have plenty of space and 1 was only really showing function calls.
Ah that's better.
Ah that's better.
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
Same old connection refused errors again on the checks I re-enabled.
I'll pm you some logs.
I'll pm you some logs.
Re: Sporadic 'Connection refused' errors in 4.2.4
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
to
Save it out and restart nagios
Make sure the notify-service-by-email command is correct as well.
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$
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$
Make sure the notify-service-by-email command is correct as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
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$
-
- Posts: 58
- Joined: Mon Jan 09, 2017 9:06 am
Re: Sporadic 'Connection refused' errors in 4.2.4
(They are the standard notification commands that come in commands.cfg with Nagios... basically)
Unlikely they are wrong, as they haven't been altered.
Unlikely they are wrong, as they haven't been altered.