nagios 3.0.5 email notifications fail

alex alex fdm.alex at gmail.com
Fri Jan 9 11:52:55 CET 2009


Hi all,
I have nagios 3.0.5 installed and it seems that it is working ok but no
notifications are sent. Instead, in /home/nagios/dead.letter the messages
keep arriving. The problem seems to be due to mail headers :

"From nagios Fri Jan  9 09:38:31 2009
Return-Path: <nagios>
Received: (from nagios at localhost)
        by localhost.localdomain (8.14.1/8.14.1/Submit) id n097cVWc011912
        for $; Fri, 9 Jan 2009 09:38:31 +0200
Date: Fri, 9 Jan 2009 09:38:31 +0200
From: nagios
Message-Id: <200901090738.n097cVWc011912 at localhost.localdomain>
To: $
Subject: **  Service Alert: ITM_M._Ciuc/is_alive is OK **"

Somehow it seems that no user address is found (or the address $ is used ).
Also, the mail log says the same thing:

Jan  9 12:33:14 localhost sendmail[11185]: n09AXEi5011185: from=nagios,
size=276, class=0, nrcpts=1,
msgid=<200901091033.n09AXEi5011185 at localhost.localdomain>,
relay=nagios at localhost
Jan  9 12:33:14 localhost sendmail[11186]: n09AXE29011186:
<$@localhost.localdomain>... User unknown
Jan  9 12:33:14 localhost sendmail[11185]: n09AXEi5011185: to=$,
ctladdr=nagios (514/514), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30276, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Jan  9 12:33:14 localhost sendmail[11186]: n09AXE29011186:
from=<nagios at localhost.localdomain>, size=276, class=0, nrcpts=0,
proto=ESMTP, daemon=Daemon0, relay=localhost.localdomain [127.0.0.1]

Do you encounter such behaviour?

Some relevant config files are as below:


define host {
        host_name                       host1
        alias                           host1
        address                         172.30.129.67
        use                             generic_business_hour
}

#generic_business_hour
define host {
        name                            generic_business_hour
        process_perf_data               1
        retain_status_information       1
        flap_detection_enabled          1
        retain_nonstatus_information    1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    9la18
        obsess_over_host                0
        check_freshness                 1
        freshness_threshold             0
        check_command                   is_icmp_alive
        max_check_attempts              3
        event_handler_enabled           1
        event_handler                   notify-host-by-email
        notifications_enabled           1
        notification_interval           15
        notification_period             9to18
        notification_options            d,u,r,f
        stalking_options                d,o,u
        contact_groups                  admins
        register                        0
        action_url            /nagios/pnp/index.php?host=$HOSTNAME$
}

# contactgroups admins
define contactgroup {
        contactgroup_name               admins
        alias                           admins
        members                         nagios,user
}


define contact {
        contact_name                    nagios
        use                             generic-contact
        alias                           nagios
        email                           nagios at localhost
}

define contact {
        name                            generic
        host_notification_period        24din2_7din7
        service_notification_period     24din2_7din7
        host_notification_options       d,u,r,n,f
        service_notification_options    u,c,w,r,n,f
        host_notification_commands      notify-host-by-email
        service_notification_commands   notify-service-by-email
        register                        0
}

define command {
        command_name                    notify-host-by-email
        command_line                    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n" | /bin/mail -s "** $NOTIFFICATIONTYPE$ Host Alert:
$HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}

Thank you,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090109/7ccb6091/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
-------------- 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