Page 1 of 1

Nagios sends emails to "$"

Posted: Fri Aug 09, 2013 5:51 am
by chrislewis28
Hi,

I have an odd problem my Nagios install fills up /var/spool/mqueue-client with emails about services that ok as it triesto send the email t "$". Normal email notifications for warning, critical, recovery etc work as expected and go to the correct email address:

Checking the /var/log/syslog it seems to be the following an event handler is executed for the OK alert when it shouldn't b:

Code: Select all

Aug  9 12:28:13 nagios-01v nagios: SERVICE ALERT: tksrvrlog-02;Swap space;OK;SOFT;3;SWAP OK - 100% free (204796 MB out of 204796 MB)
Aug  9 12:28:13 nagios-01v nagios: SERVICE EVENT HANDLER: tksrvrlog-02;Swap space;OK;SOFT;3;notify-service-by-email
Aug  9 12:28:13 nagios-01v sendmail[25673]: r79ASD78025673: from=nagios, size=367, class=0, nrcpts=1, msgid=<[email protected]   >, relay=nagios@localhost
An example email alert:

Code: Select all

V8
T1376044670
K1376044674
N1
P30470
MDeferred: Connection timed out with [10.1.17.243]
Fbs
$_nagios@localhost
${daemon_flags}c u
Snagios
[email protected]
MDeferred: Connection timed out with [10.1.17.243]
C:$
rRFC822; [email protected]
RPFD:$
H?P?Return-Path: <g>
H??Received: (from nagios@localhost)
        by nbsrvnagi-01v.diasemi.com (8.14.4/8.14.3/Submit/Dlg) id r79AbogS011114
        for $; Fri, 9 Aug 2013 12:37:50 +0200
H?D?Date: Fri, 9 Aug 2013 12:37:50 +0200
H?x?Full-Name: SVC_nagios
H?M?Message-Id: <[email protected]>
H??To: $
H??Subject: **  Service Alert: tklin51/Check eth0 Network traffic is UNKNOWN **
H??From: [email protected]
.
Any ideas?

Chris

Re: Nagios sends emails to "$"

Posted: Fri Aug 09, 2013 8:08 am
by scottwilkerson
It looks like you set notify-service-by-email as an event handler. This is not proper as it needs to grab the contact email address.

You should remove the event handler from this service, and add contacts.