-
Notifications
You must be signed in to change notification settings - Fork 1
/
notify.cfg.example
executable file
·23 lines (21 loc) · 1.01 KB
/
notify.cfg.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
##########################################################################
#
# notify.cfg.example -- new command for mailing all lines of multiline messaeges
#
# intallation: if you use nagios 3 replace the original notify-service-by-email
# command (defined in commands.cfg) with this one here. The original one does
# not send out mulitple lines (extra result defined in $LONGSERVICEOUTPUT$).
#
# (C) 2010 Alexander Haderer
#
# cvs: $Id: notify.cfg.example,v 1.1 2010/06/18 18:17:47 afrika Exp $
#
##########################################################################
# 'notify-service-by-email' command definition
#
# Originalversion, + long service output
#
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "Type : $NOTIFICATIONTYPE$\nHost : $HOSTNAME$ ($HOSTALIAS$) / $HOSTADDRESS$\nDate : $LONGDATETIME$\nService: $SERVICEDESC$\n\nMessage: $SERVICEOUTPUT$\n\nLong: \n$LONGSERVICEOUTPUT$\n" | /usr/bin/mail -s '$HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTEMAIL$
}