LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-24-2011, 10:57 AM   #1
AST
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Rep: Reputation: Disabled
How to send notificatiosn from Nagios through Exchnange server on same network


Hello all,

Please bear with me, i am sooooo new to Linux (as of 5 hours ago)
Newer to Nagios (as of 3 hours ago)

The company systems admin had started last week to install nagios on an Ubuntu box (desktop version i believe)

However he decided that over the weekend he wasnt coming back to work!

So now i have been tasked with continuing the nagios install.

It appears nagios is installed and a wireless router is being monitored.

My question is this - i dont know a fat lot about Microsoft Exchange Server but my boss tells me i ultimately need to get our switches monitored and email alerts sent from nagios through the exchange server to my email address.

I have installed postfix and mailx and set up a satellite option.

Now i need to edit the main.cf but im not sure what i put in it.

A bit of info for you:

My network is a 192.168.1.x network and uses a 255.255.255.0 subnet

My domain name is MYTOWN.MYCOMPANY.CO.UK

My linux box is called BFCNAGIOS

My Exchange Server is called BFCMAIL and has an IP of 192.168.1.60

My Exchnage Server Full Computer Name is BFCMAIL.MYTOWN.MYCOMPANY.CO.UK

My email address doesnt have the MYTOWN in though and is just MYEMAIL@MYCOMPANY.CO.UK

I have created a recieve connector for the Nagios machines IP address on my Exchange Server to allow mail from it to relay thorugh.

So should my main.cf file look like this?

myhostname = BFCNAGIOS
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = MYCOMPANY.CO.UK, MYTOWN.MYCOMPANY.CO.UK
relayhost = 192.168.1.60
mynetworks = 192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

All i want is for Nagios to send the alerts to the local Exchange server and then the Exchnage server to send them to me!

Will this do the job or have i configured incorrectly?

Thankyou so much in advance for any help given.

Last edited by AST; 10-24-2011 at 11:02 AM.
 
Old 10-26-2011, 03:56 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
You have 3 options:
1. Make the exchange server relay mail for the nagios server and configure postfix to use the exchange server for sending mail.

2. Create a mail account on the exchange server that will redirect all mail to your external email. Configure nagios to send the emails to the email account from the exchange server

3. Set up a mail account on the exchange server and make nagios send using smtp authentication with the mailx command against that mail account. Check this link for how to make mailx do that: http://heirloom.sourceforge.net/mailx/mailx.1.html

Let me know which option you want to choose and we'll go into the details
 
Old 10-26-2011, 03:58 AM   #3
AST
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vasile002 View Post
You have 3 options:
1. Make the exchange server relay mail for the nagios server and configure postfix to use the exchange server for sending mail.

2. Create a mail account on the exchange server that will redirect all mail to your external email. Configure nagios to send the emails to the email account from the exchange server

3. Set up a mail account on the exchange server and make nagios send using smtp authentication with the mailx command against that mail account. Check this link for how to make mailx do that: http://heirloom.sourceforge.net/mailx/mailx.1.html

Let me know which option you want to choose and we'll go into the details
Id like number 1 vasile002.
I want the nagios machine to send the mail to the local exchange server and for the local exchnage server to do all the sending to me.

Thankyou
 
Old 10-27-2011, 04:12 AM   #4
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
Here's how you can add a relay into your exchange server:
http://technet.microsoft.com/en-us/l.../dd277329.aspx

For postfix you need to set this option in main.cf:
relayhost = EXCHANGESERVER

Let me know if you still have problems
 
Old 10-28-2011, 04:35 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Just to throw something out there.... have a think about looking at FAN - Fully Automated Nagios, it's well worth a look at if you want to integrate a few nice tools.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
Send email to mail server/account on local network? dbrazeau Linux - Networking 2 03-07-2011 11:52 AM
[SOLVED] [nagios] send emails to gmail when services are down. Xanios Linux - Newbie 8 08-07-2010 06:38 AM
send email notifications in nagios LayTech Linux - Newbie 10 07-24-2010 06:34 AM
why does FTP server send local network address in passive mode? edesmarais Linux - Newbie 11 03-16-2005 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration