Re: [Nagios-users] notification by mail not working

2007-11-28 Thread Giles Coochey


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:nagios-users-
 [EMAIL PROTECTED] On Behalf Of Pablo Escobar
 Sent: 27 November 2007 20:12
 To: nagios-users@lists.sourceforge.net
 Subject: [Nagios-users] notification by mail not working
 
 hi all
 
 I´m really desesperate because I dont know which other config file I
 should
 look.
 

Logfile excerpts will help, though you can probably check yourself.

Does the Nagios logfile say that a notification has been sent?
Does your MTA logfile say that it has received the message? And what does it 
say that it has done with the message?

What happens if you run the notification command that is actually defined for 
your notifications? For me this is in commands.cfg

Thanks

Giles

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] notification by mail not working

2007-11-28 Thread Pablo Escobar
 Thanks for the config snippets.
great that my configs are usefull to you :)


 While you included host and service 
 templates, you didn't include any definitions that actually use those
 templates. Make sure that those definitions don't overwrite any of the
 template definitions related to notifications. Also note that your service
 template only specifies notifications for CRITICAL status.

 Do you have notifications enabled in nagios.cfg (enable_notifications=1)?
 Do you see notification attempts in nagios.log and in your postfix logs?
 When you tested your notification commands from the terminal as the nagios
 user, did you test them exactly as nagios would call them, including
 substituting appropriate values for the macros?

Finally I have found the problem wasn´t nagios config. Everything there was 
ok. On definitions I dont overwrite anything about notification and I know I 
am just notificating critical events, I want it in that way.  Also I have 
notifications enabled on nagios.cfg


The problem was that smtp server I am using for relay has a special config. 
I had to add a line in the file /etc/postfix/sendercanonical for the user 
nagios and everything is working fine now.

many thanks for your help.

-- 
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

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] notification by mail not working

2007-11-27 Thread Pablo Escobar
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 [EMAIL PROTECTED] 

I get a mail.


I have this two files:

[EMAIL PROTECTED] nagios]# cat contacts.cfg
define contact{
 contact_name   pablo
 alias  pablo
 service_notification_period24x7
 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  [EMAIL PROTECTED]
}

*
*

[EMAIL PROTECTED] nagios]# cat contactgroups.cfg
define contactgroup{
contactgroup_name   sysadmins
alias   sysadmins
members pablo
}

both included on nagios.cfg

[EMAIL PROTECTED] 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{
namegeneric-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  
register0  
contact_groups  sysadmins
check_command   check-host-alive
normal_check_interval   3
max_check_attempts  3
notification_interval   0 
notification_period 24x7
notification_optionsd,u
}

define service{
nameservicio-generico-gen
normal_check_interval   3
retry_check_interval5
max_check_attempts  3
notification_interval   0 
notification_period 24x7
check_period24x7
notification_optionsc
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
register0
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/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] notification by mail not working

2007-11-27 Thread Marc Powell


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:nagios-users-
 [EMAIL PROTECTED] On Behalf Of Pablo Escobar
 Sent: Tuesday, November 27, 2007 1:12 PM
 To: nagios-users@lists.sourceforge.net
 Subject: [Nagios-users] notification by mail not working
 
 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

Thanks for the config snippets. While you included host and service templates, 
you didn't include any definitions that actually use those templates. Make sure 
that those definitions don't overwrite any of the template definitions related 
to notifications. Also note that your service template only specifies 
notifications for CRITICAL status.

 ¿¿any clue about what I´m doing wrong??
 
 many thanks in advance for any help and sorry for a so long mail :)
 Pablo

Do you have notifications enabled in nagios.cfg (enable_notifications=1)? Do 
you see notification attempts in nagios.log and in your postfix logs? When you 
tested your notification commands from the terminal as the nagios user, did you 
test them exactly as nagios would call them, including substituting appropriate 
values for the macros?

--
Marc


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