Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-08-2005, 03:01 PM   #1
Registered: Mar 2004
Posts: 40

Rep: Reputation: 15
Nagios not sending alerts through email

Hello all, I've recently installed nagios 2.0 on Redhat 9, and I believe I have all configs setup correctly. Pre-flight check comes up ok and I check the nagios logs and the alerts show up, but for some reason I am not receiving any emails. I left the defaults for the "notify-by-email" command as described below:

# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /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$" | /bin/mail -s "** $NOTIFICATION

Here is the context of my contacts.cfg:

define contact{
contact_name jeff
alias Jeff
contactgroups engsvcs
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,n
host_notification_options d,u,r,f,n
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email

I have cronjobs that send mail to me, and my sendmail is definitely turned on...what else could I be missing???
Old 04-09-2005, 08:13 AM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
In the service or host definitions have you got a line like:
contact_groups engsvcs
Old 04-11-2005, 10:28 AM   #3
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
Hi David, here is my services and hosts configuration:

# Service definition
define service{
use generic-service ; Name of service template to use
host_name engsvcs
service_description ping
is_volatile 0
check_period 24x7
max_check_attempts 10
normal_check_interval 5
retry_check_interval 10
contact_groups engsvcs
notification_interval 10
notification_period 24x7
notification_options c,r,w,u,f
check_command check_ping!100.0,20%!500.0,60%

define host{
host_name engsvcs
alias engsvcs
check_command check-host-alive
max_check_attempts 10
process_perf_data 0
contact_groups engsvcs
hostgroups lab
check_period 24x7
obsess_over_host 1
retain_nonstatus_information 0
notifications_enabled 1
notification_interval 30
notification_period 24x7
notification_options u,r,d

I believe I have the configs set correctly, but let me know if you have any other recommendations/suggestions...thank you!


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
No email alert from Nagios packets Linux - Software 0 10-18-2005 11:56 AM
How do i setup email alerts? mjpowersjr Linux - Networking 4 11-23-2004 01:10 AM
logdrake email alerts joshx Mandriva 3 02-20-2004 02:38 AM
Why is my email (Smailer-Daemon) failing to be delivered (specifically Nagios Alerts) mdwillia Linux - Software 1 11-17-2003 08:16 AM
sending an email to a email address after a perl operation meluser Programming 9 04-07-2003 01:26 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:00 PM.

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