No Notification email
Marc Powell
marc at ena.com
Tue Sep 20 16:38:56 CEST 2005
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Elizar M. Palad
> Sent: Tuesday, September 20, 2005 1:30 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] No Notification email
>
> Hello all!
> Guys help me.
> It seems that nagios is not sending notifications on most of my
> host/services.
> i have (i think) set up hosts, contacts and contactgroups.cfg
> correctly.
> here are the files:
> contacts.cfg
> define contact{
> contact_name elizar
> alias Nagios Admin
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-by-email
> host_notification_commands host-notify-by-email
> email eli_palad at ... elizar.palad at ...
> }
The mailx man page doesn't specifically detail this and I don't have
access to it to test but does mailx properly parse multiple space
separated e-mail addresses when passed on the command line? mail does so
I would imagine mailx does as well since they are very similar but just
in case... You might try comma separated instead.
> hosts.cfg
> define host{
> use generic-host
> host_name 1 NFS05
> address 10.160.2.5
> check_command check-host-alive
> max_check_attempts 10
> notification_interval 120
> notification_period 24x7
> notification_options d,r
> contact_groups admins
> }
You don't have notifications_enabled specified. Is it part of the
generic-host template? Nagios won't send notifications without it.
> services.cfg
> define service{
> use generic-service ;
> host_name 2 P4FTPPROD
> service_description Disk Usage
> is_volatile 0
> check_period 24x7
> max_check_attempts 4
> normal_check_interval 5
> retry_check_interval 1
> contact_groups admins
> notification_interval 960
> notification_period 24x7
> check_command
check_remote_disk!rsh!ftp09!95!97
Same here. notifications_enabled must be specified in the definition or
the template.
> When the it triggers the warning or even the critical, no notification
> is sent.
Do you see a notification attempt in nagios.log? That'll help determine
if the problem is with the host/service definitions, the notification
command or your MTA. If you see a notification attempt in nagios.log,
what can you find in your MTA logs?
> sending mail manually work, by the way..
Since it's commonly overlooked, did you perform this test as the nagios
user? That will eliminate any user specific permissions issues.
> commands.cfg
>
> define command{
> command_name notify-by-email
> command_line /usr/bin/printf "%b" "***** AMKOR MONITORING
> SERVER *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
> $SERVICEDESC$\nH
> ost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
> Info:\n\n$OUTPUT$" | /usr/bin/mailx -s "** $
> NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
> **" $CONTACTEMAIL$
> }
Did you perform your test using this exact command, substituting in the
appropriate $...$ values? That will eliminate any possible parsing
problems.
Finally, if you use state retention for these hosts and services Nagios
may be remembering a previous configuration when notification might have
been disabled. If you did have notifications disabled at one point and
have re-enabled them you may be caught by this. If that might be
pertinent, see the Retention Notes at
http://nagios.sourceforge.net/docs/1_0/xodtemplate.html.
--
Marc
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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