LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-01-2010, 09:38 AM   #1
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Rep: Reputation: 17
Nagios e-mailer


I have downloaded and configured nagios to moniter some services. I want nagios to notify me by my e-mail (blabla@yahoo.com) or what ever. There is a plugin that says it can do that but i do not know what to make of it. http://exchange.nagios.org/directory...mailer/details

I put the .pl file in the libexec dir and copied and pasted the command.cfg stuff in to the command.cfg file and did the same for contacts. At the bottom of his page it says ".... rest of contact details .... "

What does that mean

All i really want is an e-mail setting in my personal e-mail account notifing me of stuff.

Last edited by edwardcode; 06-01-2010 at 09:58 AM.
 
Old 06-01-2010, 11:21 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

As indicated on the page you're referring to, this script is a replacement for the basic Nagios emailer. Nagios without any extra script already sends emails on alerts, warnings etc. Have you tried the basic Nagios emailer? I'm assuming you're just missing a MTA (Mail Transfer Agent) like Postfix or Sendmail. The simplest is Postfix in my opinion. You can easily configure it to relay all mails to your mail account.

But you'll have to be aware that if you're planning on sending to Yahoo or GMail, that you'll have to do some extra tweaking since they don't accept relaying from dynamic IP.

Kind regards,

Eric
 
Old 06-01-2010, 01:20 PM   #3
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
do you happen to know how to install and/or configure a MTA or know of a howto so i can get this nagios server up and running the way it needs to be.
 
Old 06-01-2010, 01:29 PM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I can try Can you tell me what distro you're using so can I provide the correct commands? I imagine if you installed Nagios that you have root console access or sudo and that you're acquainted with working at console level. I usually install Postfix, so if you know how to install that for your distro then go ahead and do so.

Kind regards,

Eric
 
Old 06-01-2010, 01:36 PM   #5
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
Yes I am running Red Hat Enterprize Linux (RHEL) 5.5. Yes I am very well acquainted with the root console level.

Thank for getting back to me so quickly.

Last edited by edwardcode; 06-01-2010 at 01:37 PM.
 
Old 06-01-2010, 01:38 PM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

OK, do you have a RHN subscription or do you have external repositories set up? Do you think you can install Postfix? (I'm not so familiar with RedHat itself, mostly Debian, some CentOS).

Kind regards,

Eric
 
Old 06-01-2010, 01:45 PM   #7
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
Yes I can install Postfix my self. I am more concerned about the configuration part of things
 
Old 06-01-2010, 01:48 PM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

If you're just going to relay mails to another mail server then it's not that difficult. Can I ask to what sort of server you want to relay too? Yahoo, GMail, your own mail.domain.com, other? If you're going to relay to the Yahoo,Gmail kind, is your server behind a fixed IP or a dynamic one? Does your ISP block ports to your knowledge?

Kind regards,

Eric
 
Old 06-01-2010, 01:50 PM   #9
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
I would like to get it to send to a yahoo server and i do nto knwo if my ISP blcoks ports or not. How would I find that out
 
Old 06-01-2010, 02:02 PM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

No experience with Yahoo, but let's try. Do you know to what port you send you're outgoing mail? In other words what's the port of the smtp server of Yahoo? If you can find that out, then you can try telnetting to it and see if you get a response.
Code:
telnet server 25
if the SMTP port is 25.

Kind regards,

Eric
 
Old 06-02-2010, 06:08 AM   #11
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
You know, if you think it will be easier you can just coppy and past you configuration files and there locations and I can make some ajustments so it can fit my needs.

Last edited by edwardcode; 06-02-2010 at 06:14 AM.
 
Old 06-02-2010, 08:26 AM   #12
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

The only file you normally have to edit is /etc/postfix/main.cf (that's in Debian, your main.cf might be located in another place). What I had to put in was this:
Code:
myhostname = hostname.mydomain.es
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.gmail.com, localhost, hostname.mydomain.es
relayhost =
mynetworks = 172.25.0.0/16,127.0.0.0/8,192.168.0.0/16,10.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = localhost,172.25.192.35
canonical_maps = hash:/etc/postfix/canonical
relay_domains = hostname.mydomain.es
and all mail from this server gets redirected to our GMail for enterprises. I have similar setup on all our other servers (LAN and/or VPN) that need mail enabled but in those configs the mydestination parameter only holds the name hostname.mydomain.es. Worth mentioning is that we have fixed IP. I didn't even have to put in SASL authentication which might be necessary in other cases. Hope this helps you out.

Kind regards,

Eric

PS: Sorry for the delay but I had to teach class, followed by meeting and lunch.
 
Old 06-02-2010, 08:59 AM   #13
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
Do you have the Nagios confiuration files? If so could i see the Commands.cfg and the contacts.cfg files?
 
Old 06-02-2010, 11:30 AM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

I'll post those tomorrow from work.

Kind regards,

Eric
 
Old 06-02-2010, 01:08 PM   #15
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Original Poster
Rep: Reputation: 17
Thank you
 
  


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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
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
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:22 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