Mail settings nagios
Mail settings nagios
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!
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
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,
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,
d.Run the following command to update the /etc/mail/submit.cf file
e.Restart the “sendmail” service for the configuration changes to be effective:
By
_Ram
Try to send a test e-mail from Nagios server to your inbox first, If it working then you should check your command configuration.
Code: Select all
/bin/mail -s "subject" [email protected]
<Body>
.a.Install the following packages,
Code: Select all
# yum install sendmail sendmail-cfso, Edit the file /etc/sysconfig/sendmail and modify the line:
Code: Select all
DAEMON=no 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.cfCode: Select all
# /etc/init.d/sendmail restart_Ram
Re: Mail settings nagios
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
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
Rob Hassing


Re: Mail settings nagios
Hi Rob,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
I'm using Centos 6.4.
I cant give anymore information because i dont know what is running.
Re: Mail settings nagios
Type this as root:
If it says that the command is not found, then do this first and then type the lsof command again:
Code: Select all
lsof -i:25
Code: Select all
yum -y install lsof
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Mail settings nagios
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/rootRe: Mail settings nagios
That's part of postfix.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Mail settings nagios
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/
http://www.telnetport25.com/2012/02/con ... gios-core/
Re: Mail settings nagios
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
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
Rob Hassing


Re: Mail settings nagios
OP: Have any of the proceeding suggestions worked for you?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.