what is wrong with my syntax

nemir nemiria nemir at mindless.com
Sat Jul 12 19:44:13 CEST 2003


Hiya!

I am wondering what is wrong with my syntax....

I am trying to get NAgios to send me an SMS and an email in events. In contacts.cfg I have an entry that looks like this:


# 'nemir' contact definition
define contact{
        contact_name                    nemir
        alias                           nemir nemiria
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email,service-notify-by-sms
        host_notification_commands      host-notify-by-email
        email                           nemir at mindless.com
        }

I have an entry in misccommands.cfg:

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


# 'service-notify-by-sms' command definition
define command{
        command_name    service-notify-by-sms
        command_line    /bin/echo -e "*Nagios*\n$NOTIFICATIONTYPE$\n$SERVICEDESC$\n$HOSTALIAS$\n$SERVICESTATE$\n$DATETIME$\nInfo: $
OUTPUT$" | /usr/local/bin/gnokii --sendsms $CONTACTPAGER$ 2>/dev/null
        }



Something screwy goes on though.  When I remove the ,service-notify-by-sms entry,  I get emails as expected.  When I add it,  I don't get either emails or sms messgaes.

Is there something dumb I have overlooked?    I see in other config files that entries separated by a comma like thsi are fine.  The docs don't give a specific example of this sort of thing, though.

TIA  

Nemir
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
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