How to config alert send out when service down?

CC Yuen ccyuen at hkcert.org
Thu Dec 8 10:09:41 CET 2005


Hi there,

Thank you so much for your fast reply. My contacts.cfg also enable the following lines,
what else can I do? I was play around it near 1 month but still can't receive service alert.

Thanks again,
Chung


Nagios 提到:
> Tou have to define it under the contact you wish to use this for.
> 
> define contact{
> contact_name deskjet-wrk
> alias Alias name
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-by-email
> host_notification_commands host-notify-by-email
> email username at domain.com
> }
> 
> 
> CC Yuen wrote:
> 
> 
>>Hi list,
>>
>>As title, I tried to enable the commands as following:
>>
>># 'notify-by-email' command definition
>>define command{
>>       command_name    notify-by-email
>>       command_line    /usr/bin/printf "%b" "***** Nagios 1.0 *****\n\nNotifica
>>tion Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddr
>>ess: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
>>Info:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIA
>>S$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
>>       }
>>
>>but it has error when restart. What is the correct step that I do?
>>I can receive alert email when host down.
>>
>>
>>Thanks
>>Chung
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>>for problems?  Stop!  Download the new AJAX search engine that makes
>>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>_______________________________________________
>>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
>>
>> 
>>
> 
> 
> 
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
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