LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2012, 02:57 AM   #1
NewtoUbuntu8.1
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Rep: Reputation: 0
Nagios email notification failure


Hi, I've setup nagios on a Ubuntu 10.04 machine to monitor our site network, works a treat except for the fact that the email notifications do not work.
I installed nagios as per the Ubuntu quickstart guide.

when I run the 'notify-service-by-email' command definition from the commands.cfg file in a terminal session I get an error message.
this is a copy of the command

/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

the error message that I get is below:
bash: /usr/bin/mail: No such file or directory

I hope that somebody can help me with this issue
 
Old 03-04-2012, 08:25 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Funnily enough, the error msg means what it says ....
Code:
bash: /usr/bin/mail: No such file or directory
ie the mail prog is not in /usr/bin.
Try
Code:
which mail
On RHEL it's in /bin/mail
 
Old 03-05-2012, 11:45 AM   #3
NewtoUbuntu8.1
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Yes I know that it was missing what I was after was to find out how to fix it!!

I have now found the fix, it requires the mail utilities installing as below:

sudo apt-get install mailutils
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Email Notification Assistance deibertine Linux - Newbie 7 10-05-2012 01:19 PM
Nagios - email notification - How to receive alert email? kumaran1983 Linux - Newbie 4 10-20-2011 07:12 AM
Nagios Email Notification zoomzatag Linux - Newbie 4 07-20-2011 05:23 AM
HELP! Nagios email notification using Postfix tagzfernando Linux - Newbie 14 02-16-2011 09:08 PM
HELP! Nagios email notification using Postfix tagzfernando Linux - Networking 2 02-15-2011 04:49 AM


All times are GMT -5. The time now is 06:26 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration