Nagios Email Alerts are not working correctly


#1

With Nagiosql I have a host template set up in the following.

Max Check Attempts at 5
Check interval at 1
Retry interval at 2.

I have a huge issue which I have logged from nagios.log and the mail log of SENDMAIL.
Basically see the below, after the max 5 attempts is tried it does not email out I see it goes from soft down to hard down, But the email log repeats for each try the fact that the user is unknown.
I Cannot understand why it says it will notify host by email each time, as I only want it done after the 5th attempt.

I have the 5 attempts shown from nagios.
Why is it not emailing out.

NAGIOS.log
[1247670659] HOST ALERT: EX_Camb_TESTHOST;DOWN;SOFT;1;CRITICAL - Host Unreachable (10.1.1.71)
[1247670659] HOST EVENT HANDLER: EX_Camb_TESTHOST;DOWN;SOFT;1;notify-host-by-email

[1247670729] HOST ALERT: EX_Camb_TESTHOST;DOWN;SOFT;2;CRITICAL - Host Unreachable (10.1.1.71)
[1247670729] HOST EVENT HANDLER: EX_Camb_TESTHOST;DOWN;SOFT;2;notify-host-by-email

[1247670799] HOST ALERT: EX_Camb_TESTHOST;DOWN;SOFT;3;CRITICAL - Host Unreachable (10.1.1.71)
[1247670799] HOST EVENT HANDLER: EX_Camb_TESTHOST;DOWN;SOFT;3;notify-host-by-email

[1247670869] HOST ALERT: EX_Camb_TESTHOST;DOWN;SOFT;4;CRITICAL - Host Unreachable (10.1.1.71)
[1247670869] HOST EVENT HANDLER: EX_Camb_TESTHOST;DOWN;SOFT;4;notify-host-by-email

[1247670939] HOST ALERT: EX_Camb_TESTHOST;DOWN;HARD;5;CRITICAL - Host Unreachable (10.1.1.71)
[1247670939] HOST EVENT HANDLER: EX_Camb_TESTHOST;DOWN;HARD;5;notify-host-by-email

Maillog

Jul 15 16:10:59 Nagios4Cambridge sendmail[19425]: n6FFAxGQ019425: from=nagios, size=412, class=0, nrcpts=1, msgid=200907151510.n6FFAxGQ019425@Nagios4Cambridge.local, relay=nagios@localhost
Jul 15 16:10:59 Nagios4Cambridge sendmail[19426]: n6FFAxhV019426: $@Nagios4Cambridge.local… User unknown
Jul 15 16:10:59 Nagios4Cambridge sendmail[19425]: n6FFAxGQ019425: to=$, ctladdr=nagios (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30412, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Jul 15 16:10:59 Nagios4Cambridge sendmail[19426]: n6FFAxhV019426: from=nagios@Nagios4Cambridge.local, size=412, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]


#2

i don’t think $@Nagios4Cambridge.local is a valid email address…


#3

Hi,

I’d need help…I’ve installed Nagios 3.1.2 on Ubuntu and i have configured some Hosts. I’d like receiving notifications via email from this Hosts, but i can’t confugure Nagios to do this. In Internet i haven’t found any guide. Someone can help me?

Thanks.


#4

try the nagios installation guide on the nagios website.

And creating a new thread would be better.