Page 1 of 2
Mail settings nagios
Posted: Wed Nov 05, 2014 2:39 am
by ericosman
Hi,
I finaly have my Nagios up and running as i want ( thanks to you guys! )
But now at this moment Nagios will not sent real mails....
Could anyone tell me where i can change the mail settings ?
We use a Exchange 2010 for the mail.
Thanks in advance!
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 6:10 am
by Ramdas
Hi,
Try to send a test e-mail from Nagios server to your inbox first, If it working then you should check your command configuration.
If still you not receiving an e-mail to your inbox then try followings on the Nagios server. (I am assuming that you may using CentOS/RHEL)
a.Install the following packages,
Code: Select all
# yum install sendmail sendmail-cf
b.There is no need to start the Sendmail in Listening mode, because Nagios server simply sent the e-mail notification and it will not receive any e-mail.
so, Edit the file /etc/sysconfig/sendmail and modify the line:
c.Configure the Mail submission. edit the /etc/mail/submit.mc file & find and edit the following line as follows,
Code: Select all
FEATURE(`msp',`<SMTP-Mail Relay server>')
d.Run the following command to update the /etc/mail/submit.cf file
Code: Select all
# m4 /etc/mail/submit.mc > /etc/mail/submit.cf
e.Restart the “sendmail” service for the configuration changes to be effective:
By
_Ram
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 8:55 am
by rhassing
Hello Eric,
Are you running Nagios on Linux?
If you are, which distribution are you using? (CentOS, Red Hat, Fedora, Ubuntu, etc.)
Do you know which MTA is running, Postfix or Sendmail?
Actually this has not much to do with Nagios, but more with Linux in general
Best regards,
Rob
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 8:59 am
by ericosman
rhassing wrote:Hello Eric,
Are you running Nagios on Linux?
If you are, which distribution are you using? (CentOS, Red Hat, Fedora, Ubuntu, etc.)
Do you know which MTA is running, Postfix or Sendmail?
Actually this has not much to do with Nagios, but more with Linux in general
Best regards,
Rob
Hi Rob,
I'm using Centos 6.4.
I cant give anymore information because i dont know what is running.
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 9:04 am
by eloyd
Type this as root:
If it says that the command is not found, then do this first and then type the lsof command again:
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 10:17 am
by ericosman
I got this :
Code: Select all
[root@Nagios ~]# lsof -i:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 2264 root 12u IPv4 14141 0t0 TCP localhost:smtp (LISTEN)
master 2264 root 13u IPv6 14143 0t0 TCP localhost:smtp (LISTEN)
You have new mail in /var/spool/mail/root
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 10:44 am
by eloyd
That's part of postfix.
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 10:46 am
by slansing
I highly recommend you follow this guide, it should get you on the right track and cover most if not all of the requirements you have:
http://www.telnetport25.com/2012/02/con ... gios-core/
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 12:42 pm
by rhassing
For postfix you could do the following:
Routing all mails to a smarthost (which could be you exchange server):
As it is CentOS, I assume the postfix config files live in /etc/postfix/main.cf
In/etc/postfix/main.cf add the line:
relayhost = <your exchange ip address>:25
Re: Mail settings nagios
Posted: Wed Nov 05, 2014 4:53 pm
by abrist
OP: Have any of the proceeding suggestions worked for you?