notification by mail not working

Pablo Escobar pescobar at cipf.es
Tue Nov 27 20:12:20 CET 2007


hi all

I´m really desesperate because I dont know which other config file I should 
look.

My mail server (postfix) is working because if I run 

$> ps aux | mail pescobar at cifp.es 

I get a mail.


I have this two files:

[root at centos64 nagios]# cat contacts.cfg
define contact{
 contact_name                   		pablo
 alias                          			pablo
 service_notification_period    		24x7
 host_notification_period       		24x7
#service_notification_options  		c
#host_notification_options      		d
 service_notification_options    	w,u,c,r
 host_notification_options        	d,u,r
 service_notification_commands  	notify-by-email
 host_notification_commands     	host-notify-by-email
 email                          			pescobar at cipf.es
}

*****************************
*****************************

[root at centos64 nagios]# cat contactgroups.cfg
define contactgroup{
        contactgroup_name       	sysadmins
        alias                   		sysadmins
        members                 		pablo
        }

both included on nagios.cfg

[root at centos64 nagios]# cat /etc/nagios/nagios.cfg | grep contact
# groups, contacts, contact groups, services, etc.  I guess it would
# separate from host and contact definitions...
cfg_file=/etc/nagios/contactgroups.cfg
cfg_file=/etc/nagios/contacts.cfg
# host/contact/service configuration files.  Setting this to 60 means

I have also verified that the "host-notify-by-email" and "notify-by-email" 
commands that are defined on commands.cfg work if I run them on a terminal.

and I am using this service and host templates:

define host{
        name                           	 	generic-host-gen       				       
	notifications_enabled        	1 
        event_handler_enabled     	1       
        flap_detection_enabled     	1       
        process_perf_data             	1       
        retain_status_information       	1     
        retain_nonstatus_information  1  
        register                        		0      
        contact_groups                  	sysadmins
        check_command                   	check-host-alive
        normal_check_interval           	3
        max_check_attempts              	3
        notification_interval           	0 
        notification_period             	24x7
        notification_options            	d,u
        }

define service{
        name                            		servicio-generico-gen
        normal_check_interval           	3
        retry_check_interval            	5
        max_check_attempts              	3
        notification_interval           	0 
        notification_period             	24x7
        check_period                    	24x7
        notification_options            	c
        active_checks_enabled           	1
        passive_checks_enabled         0
        parallelize_check               	1
        obsess_over_service             	0
        check_freshness                 	0
        notifications_enabled           	1
        event_handler_enabled           1
        flap_detection_enabled          	1
        process_perf_data               	1
        retain_status_information       	1
        retain_nonstatus_information  1
        register                        		0
        contact_groups                  	sysadmins
}

everything on the web interface seems to work and I havent found any error 
related to mail on logs but I can´t get mail notifications when a service or 
host fails.

¿¿any clue about what I´m doing wrong??

many thanks in advance for any help and sorry for a so long mail :)
Pablo

-- 
Pablo Escobar Lopez
Head of Infrastructure & IT Support
Bioinformatics Department
Centro de Investigación Príncipe Felipe (CIPF)
Tfn: (34) 96 328 96 80 ext: 1004
http://bioinfo.cipf.es

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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