mirror of https://github.com/Icinga/icinga2.git
parent
82a5c5a624
commit
91ab8551c7
|
@ -12,9 +12,11 @@ apply Notification "mail-icingaadmin" to Host {
|
|||
import "mail-host-notification"
|
||||
user_groups = host.vars.notification.mail.groups
|
||||
users = host.vars.notification.mail.users
|
||||
interval = 2h
|
||||
|
||||
//interval = 2h
|
||||
|
||||
vars.notification_logtosyslog = true
|
||||
|
||||
assign where host.vars.notification.mail
|
||||
}
|
||||
|
||||
|
@ -22,8 +24,10 @@ apply Notification "mail-icingaadmin" to Service {
|
|||
import "mail-service-notification"
|
||||
user_groups = host.vars.notification.mail.groups
|
||||
users = host.vars.notification.mail.users
|
||||
interval = 2h
|
||||
|
||||
//interval = 2h
|
||||
|
||||
vars.notification_logtosyslog = true
|
||||
|
||||
assign where host.vars.notification.mail
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ template Notification "mail-host-notification" {
|
|||
template Notification "mail-service-notification" {
|
||||
command = "mail-service-notification"
|
||||
|
||||
states = [ Critical, OK, Unknown, Warning ]
|
||||
states = [ OK, Warning, Critical, Unknown ]
|
||||
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||||
FlappingStart, FlappingEnd,
|
||||
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||||
|
|
|
@ -12,7 +12,7 @@ fi
|
|||
Usage() {
|
||||
cat << EOF
|
||||
|
||||
The following are mandatory:
|
||||
Required parameters:
|
||||
-4 HOSTADDRESS (\$address$)
|
||||
-6 HOSTADDRESS6 (\$address6$)
|
||||
-d LONGDATETIME (\$icinga.long_date_time$)
|
||||
|
@ -23,7 +23,7 @@ The following are mandatory:
|
|||
-s HOSTSTATE (\$host.state$)
|
||||
-t NOTIFICATIONTYPE (\$notification.type$)
|
||||
|
||||
And these are optional:
|
||||
Optional parameters:
|
||||
-b NOTIFICATIONAUTHORNAME (\$notification.author$)
|
||||
-c NOTIFICATIONCOMMENT (\$notification.comment$)
|
||||
-i ICINGAWEB2URL (\$notification_icingaweb2url$, Default: unset)
|
||||
|
@ -71,20 +71,20 @@ SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
|
|||
NOTIFICATION_MESSAGE=`cat << EOF
|
||||
***** Icinga 2 Host Monitoring on $HOSTNAME *****
|
||||
|
||||
==> $HOSTDISPLAYNAME ($HOSTALIAS) is $HOSTSTATE! <==
|
||||
==> $HOSTDISPLAYNAME ($HOSTNAME) is $HOSTSTATE! <==
|
||||
|
||||
Info? $HOSTOUTPUT
|
||||
Info: $HOSTOUTPUT
|
||||
|
||||
When? $LONGDATETIME
|
||||
Host? $HOSTALIAS (aka "$HOSTDISPLAYNAME")
|
||||
IPv4? $HOSTADDRESS
|
||||
When: $LONGDATETIME
|
||||
Host: $HOSTNAME (Display Name: "$HOSTDISPLAYNAME")
|
||||
IPv4: $HOSTADDRESS
|
||||
EOF
|
||||
`
|
||||
|
||||
## Is this host IPv6 capable? Put its address into the message.
|
||||
if [ -n "$HOSTADDRESS6" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv6? $HOSTADDRESS6"
|
||||
IPv6: $HOSTADDRESS6"
|
||||
fi
|
||||
|
||||
## Are there any comments? Put them into the message.
|
||||
|
@ -99,7 +99,7 @@ fi
|
|||
if [ -n "$ICINGAWEB2URL" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
|
||||
Get live status:
|
||||
URL:
|
||||
$ICINGAWEB2URL/monitoring/host/show?host=$HOSTALIAS"
|
||||
fi
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fi
|
|||
Usage() {
|
||||
cat << EOF
|
||||
|
||||
The following are mandatory:
|
||||
Required parameters:
|
||||
-4 HOSTADDRESS (\$address$)
|
||||
-6 HOSTADDRESS (\$address6$)
|
||||
-d LONGDATETIME (\$icinga.long_date_time$)
|
||||
|
@ -25,7 +25,7 @@ The following are mandatory:
|
|||
-t NOTIFICATIONTYPE (\$notification.type$)
|
||||
-u SERVICEDISPLAYNAME (\$service.display_name$)
|
||||
|
||||
And these are optional:
|
||||
Optional parameters:
|
||||
-b NOTIFICATIONAUTHORNAME (\$notification.author$)
|
||||
-c NOTIFICATIONCOMMENT (\$notification.comment$)
|
||||
-i ICINGAWEB2URL (\$notification_icingaweb2url$, Default: unset)
|
||||
|
@ -76,19 +76,19 @@ NOTIFICATION_MESSAGE=`cat << EOF
|
|||
|
||||
==> $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE! <==
|
||||
|
||||
Info? $SERVICEOUTPUT
|
||||
Info: $SERVICEOUTPUT
|
||||
|
||||
When? $LONGDATETIME
|
||||
Service? $SERVICENAME (aka "$SERVICEDISPLAYNAME")
|
||||
Host? $HOSTALIAS (aka "$HOSTDISPLAYNAME")
|
||||
IPv4? $HOSTADDRESS
|
||||
When: $LONGDATETIME
|
||||
Service: $SERVICENAME (Display Name: "$SERVICEDISPLAYNAME")
|
||||
Host: $HOSTNAME (Display Name: "$HOSTDISPLAYNAME")
|
||||
IPv4: $HOSTADDRESS
|
||||
EOF
|
||||
`
|
||||
|
||||
## Is this host IPv6 capable? Put its address into the message.
|
||||
if [ -n "$HOSTADDRESS6" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv6? $HOSTADDRESS6"
|
||||
IPv6: $HOSTADDRESS6"
|
||||
fi
|
||||
|
||||
## Are there any comments? Put them into the message.
|
||||
|
|
Loading…
Reference in New Issue