Page 1 of 1

Not getting any email alerts

Posted: Thu Jul 10, 2014 7:25 am
by sciencedicas
Hello all.
I'm new into nagios,
I've install the core version 4 following the quick start.
I'm able to monitor few host and it's showing me the status, that seems fine.

the issue, is I'm NOT getting any email alerts. I taken the host down , and it shows down on the GUI but no email alerts

I did set up the contacts in the config.

also when I try to send a down notification from one of the host I got the error

Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.

i set the permission to 777 on /usr/local/nagios/var/rw/nagios.cmd but still not working.

hope someone can hepl

thank you

Re: Not getting any email alerts

Posted: Thu Jul 10, 2014 4:50 pm
by lmiltchev
Run the following commands and show us the output:

Code: Select all

service nagios status
ls -l /usr/local/nagios/var/rw
grep nag /etc/group

Re: Not getting any email alerts

Posted: Thu Aug 07, 2014 1:15 pm
by sciencedicas
Sorry for the time reply, here is the command.

[root@ClearMon libexec]# service nagios start
nagios (pid 16960 16958 16957 16956 16955 16954) is running...
[root@ClearMon libexec]# ls -l /usr/local/nagios/var/rw
total 0
prwxrwxrwx. 1 nagios nagcmd 0 Jun 30 18:40 nagios.cmd
srw-rw----. 1 nagios nagcmd 0 Aug 7 16:30 nagios.qh
[root@ClearMon libexec]# grep nag /etc/group
nagios:x:501:snmptt
nagcmd:x:502:nagios,apache,snmptt
[root@ClearMon libexec]#

Re: Not getting any email alerts

Posted: Fri Aug 08, 2014 12:40 pm
by lmiltchev
Change:
nagios:x:501:snmptt
to:

Code: Select all

nagios:x:501:nagios,apache,snmptt
Also, show us the host configuration, along with the associated template, contact, and commands.

Are you using sendmail for alerts? Can you send a test email from the CLI successfully to your contact's email?

Re: Not getting any email alerts

Posted: Fri Sep 05, 2014 9:01 am
by sciencedicas
Nothing happens when i send email from the CLI

I'm using this command
sendmail [email protected] subject body

Re: Not getting any email alerts

Posted: Fri Sep 05, 2014 10:58 am
by slansing
When you try to send the mail manually from the CLI, try a tail of the maillog to see if it is getting sent out, please post the output of the following after you have manually tried to send mail a couple times:

Code: Select all

tail -50 /var/log/maillog
Note: please filter out your email address/domain.

Re: Not getting any email alerts

Posted: Fri Sep 05, 2014 11:54 am
by sciencedicas
thank you, its fixed now.

noticed with tail -50 /var/log/maillog that the email was being blocked by my exchange server.

I fixed that on the exchange my allow unauthenticated users to send email .

Re: Not getting any email alerts

Posted: Fri Sep 05, 2014 2:11 pm
by slansing
Excellent, that's what I was hoping we'd find!