notification not sending

Viraxay Chinyavong sy at echolabs.net
Sat Aug 21 05:45:24 CEST 2004


Harper,

Thank you very much for the suggestions. My problem was due to the write
permission under /var/CommuniGate/Submitted directory. Since Nagios didn't
have writes to create tmp file under that directory it was failing. I added
nagios to the group that had rw access to that directory and it worked
great. Now off to other problems with Nagios. Gotta try to get it to work
with MySQL without the daemon dying on me.

Thanks a lot for your help!

-sy

-----Original Message-----
From: Harper Mann [mailto:hmann at itgroundwork.com] On Behalf Of Harper Mann
Sent: Friday, August 20, 2004 10:19 PM
To: sy at echolabs.net; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] notification not sending

Hi,

I notice you listed the host email command.  Are you simulating a host down
or a service down?  If it's a service, you generally need "notify-by-email".

Did you try running the /bin/mail line from the user "nagios"?  It's often a
permissions problem.

Another suggestion is to change the pipe "|" to /bin/mail in misccommand.cfg
to append an output ">> /tmp/testfile" to a test file and see if it writes
and the values look good.

Last idea is: we use a perl script from Freshmeat called sendEmail
http://freshmeat.net/projects/sendemail/ that formats nicely.

Here is our misccommands.cfg:

# 'host-notify-by-email' command definition
define command {
    command_name    host-notify-by-email
    command_line    /usr/local/bin/sendEmail -f demo at itgroundwork.com -t
$CONTACTEMAIL$ -u   "Notification Type: $NOTIFICATIONTYPE$ Host: $HOSTNAME$
State: $HOSTSTATE$" -m "Address: $HOSTADDRESS$ Info: $OUTPUT$ Date/Time:
$DATETIME$"
}

# 'notify-by-email' command definition
define command {
    command_name    notify-by-email
    command_line    /usr/local/bin/sendEmail -f demo at itgroundwork.com -t
$CONTACTEMAIL$ -u "Problem: $SERVICEDESC$ State: $SERVICESTATE$" -m
"$OUTPUT$ Date: $DATETIME$"
}

Regards,

- Harper

Harper Mann
Groundwork Open Source Solutions
510-599-2075 (cell)


Hi,

I hope someone can help me with this problem. I'm running Nagio 1.2 on
Fedora core1 and Stalker CGPro Mail. It seems to work fine if I just run
this command "/bin/mail -s "Host DOWN alert for Bogus" admin at echolabs.net"
manually but it won't work from Nagios even though the log says it sent the
email. Can someone tell me what I'm doing wrong or if my miscommand.cfg is
wrong? Below is my config.

Many thanks!

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







-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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





-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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