Nagios not sending host or service notifications
Marc Powell
marc at ena.com
Thu Jun 4 16:36:45 CEST 2009
On Jun 4, 2009, at 1:48 AM, Tim Philips wrote:
> When a host (or service) experiences a problem the normal process
> seems to be happening (from what I see in the UI and the logs):
>
> [1244096420] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00-
> LogVol00;CRITICAL;SOFT;1;DISK CRITICAL - free space: / 17736 MB (4%
> inode=99%):
> [1244096480] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00-
> LogVol00;CRITICAL;SOFT;2;DISK CRITICAL - free space: / 17739 MB (4%
> inode=99%):
> [1244096540] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00-
> LogVol00;CRITICAL;SOFT;3;DISK CRITICAL - free space: / 17739 MB (4%
> inode=99%):
> [1244096600] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00-
> LogVol00;CRITICAL;HARD;4;DISK CRITICAL - free space: / 17739 MB (4%
> inode=99%):
> [1244096600] SERVICE NOTIFICATION: nagiosadmin;localhost;root /dev/
> mapper/VolGroup00-LogVol00;CRITICAL;notify-service-by-email;DISK
> CRITICAL - free space: / 17739 MB (4% inode=99%):
This is good. Nagios is trying to execute the notify-service-by-email
command.
> [1244096600.198454] [032.0] [pid=7951] 1 contacts were notified.
> Next possible notification time: Thu Jun 4 19:23:20 2009
> [1244096600.198514] [032.0] [pid=7951] 1 contacts were notified.
... and nagios believes it was successful
> I'm able to manually use the mail command to send external e-mail
> (have attempted this several times) and can confirm that I can
> manually execute the command_line for the notification option:
as the nagios user? (just covering the base)...
> I have addjusted the command_line and changed it to something like
> (for example):
>
> command_line echo "testing" | /usr/bin/mail -s "** TEST
> SUBJECT **" my at email.address
How about eliminating /usr/bin/mail entirely and dumping text to a
file in /tmp?
command_line echo `date` ' - I notified!' >> /tmp/notif.log
> All this said I'm not seeing anything in the mail server logs
> indicating that Nagios is even attempting to use notify-service-by-
> email and send e-mail.
That's interesting and my money is on it being some problem related
to /usr/bin/mail. You might try capturing the output of /usr/bin/mail
by redirecting to a log file --
command_line echo "testing" | /usr/bin/mail -s "** TEST SUBJECT **" my at email.address
>>/tmp/mail.err 2>&1
--
Marc
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list