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 - 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 02-07-2014, 12:17 PM   #1
danburt
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Rep: Reputation: 0
Nagios not sending email notifications


Greetings,

I'm using Nagios to monitor a localhost running CentOS. I have enabled the following features in my config files in an attempt to allow email notifications:

1. Notifications enabled in main nagios.cfg file, as evidenced:

# NOTIFICATIONS OPTION
# This determines whether or not Nagios will sent out any host or
# service notifications when it is initially (re)started.
# Values: 1 = enable notifications, 0 = disable notifications

enable_notifications=1


2. flap-detection-enabled set to 0 in generic_host template and generic_service template (no further overrides of this setting in objects inheriting from these templates)

3. Notification_period on template 'linux_server' (default template for localhost object) set to 24x7

4. notifications_enabled set to 1 in all previously mentioned templates and within the specific service "MyDocs Age Check 7", as evidenced:

define service{
use local-service
host_name localhost
service_description MyDocs Age Check7
check_command check_file_ages_in_directory!"/home/nagios/Documents /home/nagios/Downloads"
notifications_enabled 1
contacts dburt
}

5. Further, I have received confirmation from the Nagios CGI that notifications were triggered for my alert:

Service Notifications
Last Updated: Fri Feb 7 12:10:34 CST 2014
Nagios® Core™ 4.0.2 - www.nagios.org
Logged in as nagiosadmin
View History For This Service
View Trends For This Service

Service 'MyDocs Age Check7' On Host 'localhost'

Latest Archive
Latest Archive
Log File Navigation
Fri Feb 7 00:00:00 CST 2014
to
Present..

File: /usr/local/nagios/var/nagios.log

Notification detail level for this service:
Older Entries First:



Host Service Type Time Contact Notification Command Information
localhost MyDocs Age Check7 CRITICAL 02-07-2014 11:48:05 dburt notify-service-by-email CRITICAL: 2dir(s) -- /home/nagios/Documents/Test2: 18hrs /home/nagios/Documents/Test: 22hrs /home/nagios/Documents: 2 files /home/nagios/Downloads/Test2: 22hrs /home/nagios/Downloads: 1 files
localhost MyDocs Age Check7 CRITICAL 02-07-2014 11:48:05 nagiosadmin notify-service-by-email CRITICAL: 2dir(s) -- /home/nagios/Documents/Test2: 18hrs /home/nagios/Documents/Test: 22hrs /home/nagios/Documents: 2 files /home/nagios/Downloads/Test2: 22hrs /home/nagios/Downloads: 1 files



as well as in the nagios.log file:


[1391795285] SERVICE NOTIFICATION: nagiosadmin;localhost;MyDocs Age Check7;CRITICAL;notify-service-by-email;CRITICAL: 2dir(s) -- /home/nagios/Documents/Test2: 18hrs /home/nagios/Documents/Test: 22hrs /home/nagios/Documents: 2 files /home/nagios/Downloads/Test2: 22hrs /home/nagios/Downloads: 1 files
[1391795285] SERVICE NOTIFICATION: dburt;localhost;MyDocs Age Check7;CRITICAL;notify-service-by-email;CRITICAL: 2dir(s) -- /home/nagios/Documents/Test2: 18hrs /home/nagios/Documents/Test: 22hrs /home/nagios/Documents: 2 files /home/nagios/Downloads/Test2: 22hrs /home/nagios/Downloads: 1 files



so my question....


Is this a problem with Nagios?? (which appears to believe it sent an email)

or can I safely assume Nagios has done its job, and this is a problem somewhere else? (firewalls, mail servers, etc.)

btw - it's not a spam filter on my email account, I'm using Gmail's "All Mail" folder.

Thanks!

Dan
 
Old 02-07-2014, 12:27 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://www.linuxquestions.org/quest...ns-4175494174/

Please, please please use [code][/code] tags.

See Option A in my signature.

And Welcome to LQ!
 
Old 02-07-2014, 01:45 PM   #3
danburt
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Original Poster
Rep: Reputation: 0
Yep, not related to Nagios

I would need to install postfix to relay email messages off my local server. So yes, problem was external, not related to Nagios.

Thank you, and I will be sure to include tags in my next posting.

Cheers
 
Old 02-07-2014, 02:53 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by danburt View Post
I would need to install postfix to relay email messages off my local server.
Well, there is that!

Glad to be of some help.
 
  


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
[SOLVED] help required with nagios email notifications NewtoUbuntu8.1 Linux - Newbie 13 10-13-2011 03:10 PM
send email notifications in nagios LayTech Linux - Newbie 10 07-24-2010 06:34 AM
sending of email notifications LayTech Linux - Newbie 7 07-23-2010 08:24 AM
[SOLVED] Nagios and Postfix Email Notifications cazter2 Linux - Networking 18 11-19-2009 02:31 PM
Nagios Email notifications jackie001 Linux - Newbie 3 11-14-2008 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:29 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
Open Source Consulting | Domain Registration