Help on Nagios Installation

Schmitz, Carsten Carsten.Schmitz at aegon.com
Fri Jan 14 10:48:52 CET 2005


Hi,

check <nagiosdir>/etc/misccommands.cfg for 'notify-by-email' and 'host-notify-by-email'.

Works like this:

contacts.cfg defines command name being used --->  found with that name in misccommands.cfg ---> points to the mailing binary

You either need to change contacts.cfg so it uses a valid command as found in misccommands.cfg, or add 'notify-by-email' (and the host one, too) to misccommands.cfg.

For your convinience, you can add this to misccommands.cfg:


# 'notify-by-email' command definition
define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }

# '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$
        }


(Above is from Nagios 1.2 example files, should work for 2.x I guess)

Cheers

Carsten
-- My password is my cat's name. Its called x6>B8e at 7w_4. I rename it every 30 days.


-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Jack A.
Kanimea
Sent: Friday, January 14, 2005 5:47 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Help on Nagios Installation


Help,
     Am new to this install of nmis. After download and install the configuration files. When I type 

/usr/local/nagios/bin/nagios -v nagios.cfg

Total Warnings: 2
Total Errors:   8

Error: Service notification command 'notify-by-email' specified for contact 'customer' is not defined anywhere!
Error: Host notification command 'host-notify-by-email' specified for contact 'customer' is not defined anywhere!

Question? Have check the notify-by-email commands but I can't find it in /bin all I have done copied the default definition sample example. Do I have created this notify-by-email script files

Any help is greatly appreciated 

thanks
Jack K



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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