Not sending alerts

jmoseley at corp.xanadoo.com jmoseley at corp.xanadoo.com
Wed Jan 14 00:15:45 CET 2009


That certainly seems to be a valid configuration.  Have you included all
your configs in the main nagios.cfg file so that they are all being read?
Barring that, do you have any service/host depencies setup?  What about
escalations?

If you have any dependency or escalation configs, I would disable them
first before doing any more troubleshooting.


James Moseley




                                                                           
             "Matt Nelson"                                                 
             <matt at frozenatom.                                             
             com>                                                       To 
                                       nagios-users at lists.sourceforge.net  
             01/13/2009 04:11                                           cc 
             PM                                                            
                                                                   Subject 
                                       [Nagios-users] Not sending alerts   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hello,

We seem to be having an issue with our alert notifications.  From what I've
determined the command 'notify-by-email' isn't even being called from
commands.cfg. I verified this by:
1)replacing the current command with a simple echo "test" > /tmp/test.
2)leaving the mail command in and checking my postfix log - which shows no
attempts being made at all.

I also don't see anything about sending alerts in my nagios.log/syslog
Jan 13 13:13:26 nocnag02 nagios: SERVICE ALERT: mt-ubuntu;SMTP
Availability;CRITICAL;HARD;2;Connection refused

I have the following configuration for this service:

# templates_services.cfg
define service{
        name                            critical-service
        active_checks_enabled           1
        passive_checks_enabled          1
        parallelize_check               1
        obsess_over_service             0
        check_freshness                 0
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        failure_prediction_enabled      1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              2
        normal_check_interval           2
        retry_check_interval            1
        notification_options            w,u,c,r
        notification_interval           2
        notification_period             24x7
        register                        0
}

# services_social.cfg
define service {
        use                             critical-service
        host_name                       mt-ubuntu
        service_description             SMTP Availability
        contact_groups                  individuals_group
        check_command                   check_smtp
      flap_detection_enabled          0
}

# t_host.cfg
define host {
                 use                     no_icmp
                 host_name               mt-ubuntu
                 alias                   mt-ubuntu
                 address                 10.2.23.23
                 contact_groups          individuals_group
                }

# individual_contacts.cfg
define contact{
        contact_name                      mt
        alias                           MT
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           <removed>
        }

define contactgroup{
        contactgroup_name               individuals_group
        alias                           Individuals
        members                         mt
}

# commands.cfg
# 'notify-by-email' command definition
define command{
      command_name      notify-by-email
      command_line      /usr/bin/printf "%b" "***** NOCNAG
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
      }


Any assistance would be appreciated.

Matt
------------------------------------------------------------------------------

This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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