Not sending alerts

Matt Nelson matt at frozenatom.com
Tue Jan 13 23:11:11 CET 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090113/8ac12226/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
-------------- next part --------------
_______________________________________________
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