Not getting email alerts

Marc Powell marc at ena.com
Fri Aug 6 00:42:28 CEST 2004


----Original Message----
From: Quanah Gibson-Mount [mailto:quanah at stanford.edu]
Sent: Thursday, August 05, 2004 4:14 PM
To: Marc Powell; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Not getting email alerts

> --On Thursday, August 05, 2004 3:33 PM -0500 Marc Powell
> <marc at ena.com> 
> wrote:
> 
> > I do not believe this to be an accurate statement. Any host
> > notification problems are likely configuration issues, not something
> > wrong in the code. Such a problem would be widely encountered and
> > it just isn't. 
> 
> Excuse my french,
> 
> But that is BS.
> 
> I've noted several times that we get a *single* host down alert, and
> that continued alerts that *should* be coming from Nagios do not. 
> There was an entire thread on this about a month ago, of another user
> who had this same situation.  I've posted our configs, I've posted
> the log output, and everything *appears* to be working correctly. 
> However, it simply never sends out any alerts past the initial HOST
> DOWN.  There have been plenty of complaints about this behavior from
> others than myself, so I'd call that a widely encountered issue.     


Well, I guess all I can say in response is that it _does_ work. I just
tested it using the the following --

define host{
        name                            generic-host   
        notifications_enabled           1       ; Host notifications are
enabled
        event_handler_enabled           1       ; Host event handler is
enabled
        flap_detection_enabled          1       ; Flap detection is
enabled
        process_perf_data               1       ; Process performance
data
        retain_status_information       1       ; Retain status
information across program restarts
        retain_nonstatus_information    1       ; Retain non-status
information across program restarts
        max_check_attempts              10
        notification_interval           10080
        notification_period             24x7
        notification_options            d,r

        register                        0       ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        }

define host{
        use                     generic-host            ; Name of host
template to use

        host_name               marc-test
        alias                   marc-test
        address                 172.27.2.124
    	  check_command           check-host-alive
        max_check_attempts      2
        notification_interval   10
        notification_period     24x7
        notification_options    d,u,r
        }

# Service definition
define service{
        use                             generic-service         ; Name
of service template to use

        host_name                       marc-test
        service_description             PING
        max_check_attempts              2
        retry_check_interval            3
        contact_groups                  marc
        normal_check_interval           2
        check_command                   check_ping
        }

define hostgroup{
        hostgroup_name  nateng-CorpRoutersandSwitches-Nashville-tn
        alias           Ena Corporate Routers and Switches (Nashville)
        contact_groups  nateng
        members         lots-of-other-hosts-removed,marc-test
        }

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping $HOSTADDRESS$ 100 100 5000.0
5000.0 -p 1 -t 10
        }


define contact{
        contact_name                    marc
        alias                           NOC
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,r
        host_notification_options       d,u,r
        service_notification_commands   service-notify-by-email
        host_notification_commands      host-notify-by-email
        email                           marc at ena.com
        }

define contactgroup{
        contactgroup_name       nateng
        alias                   National Engineering
        members                 marc
        }

# 'host-notify-by-email' command definition
define command{
        command_name    host-notify-by-email
        command_line    /bin/echo -e "Subject: $NOTIFICATIONTYPE$ alert
- Host $HOSTNAME$ is $HOSTSTATE$\n\n***** Nagios *****\n\nNotification
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /bin/mail
$CONTACTEMAIL$
        }


[1091743764] HOST ALERT: marc-test;UP;HARD;1;(Host assumed to be up)
[1091743764] SERVICE ALERT: marc-test;PING;OK;HARD;1;FPING OK -
172.27.2.124 (loss=0.000000%, rta=1.170000 ms)
[1091744024] HOST ALERT: marc-test;DOWN;HARD;2;CRITICAL - Plugin timed
out after 10 seconds
[1091744024] HOST NOTIFICATION:
marc;marc-test;DOWN;host-notify-by-email;CRITICAL - Plugin timed out
after 10 seconds
[1091744024] SERVICE ALERT: marc-test;PING;CRITICAL;HARD;1;FPING
CRITICAL - 172.27.2.124 (loss=100.000000% )
[1091744725] HOST NOTIFICATION:
marc;marc-test;DOWN;host-notify-by-email;CRITICAL - Plugin timed out
after 10 seconds
[1091745329] HOST NOTIFICATION:
marc;marc-test;DOWN;host-notify-by-email;CRITICAL - Plugin timed out
after 10 seconds

I'd be glad to forward the 3 emails if you'd like to see them.

--
Marc



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
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