Am 30.10.2014 um 10:36 schrieb Robert Verkerk:
Hi,

We have a setup with a icinga2 server which sends notifications if the state of 
a service or a host changes.

How do we force it to send a notification each 5 or 10 minutes even if the 
state has not changed? So even if the state is OK each 5 minutes a notification 
is generated.

Why would anyone want to get notified after a service recovers to OK (not the 
recovery itself)? Notifications are only sent in Not-OK states.


The config is:

notifications.conf
==================
apply Notification "ncsa-eudatcmon" to Service {
 import "ncsa-service-notification"

 user_groups = [ "icingaadmins" ]

 assign where "eudat-cmon" in host.groups && (service.vars.eudat_cmon == "true")
}


templates.conf
==============
template Notification "ncsa-service-notification" {
 command = "ncsa-service-notification"

 states = [ OK, Warning, Critical, Unknown ]
 types = [ Problem, Acknowledgement, Recovery, Custom,
           FlappingStart, FlappingEnd,
           DowntimeStart, DowntimeEnd, DowntimeRemoved ]

 period = "24x7"
}

commands.conf
=============
object NotificationCommand "ncsa-service-notification" {
 import "plugin-notification-command"

 command = [ SysconfDir + "/icinga2/scripts/ncsa-service-handler.sh" ]

 env = {
   NOTIFICATIONTYPE = "$notification.type$"
   SERVICEDESC = "$service.name$"
   HOSTALIAS = "$host.vars.fullname$"
   HOSTADDRESS = "$address$"
   SERVICESTATE = "$service.state$"
   LONGDATETIME = "$icinga.long_date_time$"
   SERVICEOUTPUT = "$service.output$"
   NOTIFICATIONAUTHORNAME = "$notification.author$"
   NOTIFICATIONCOMMENT = "$notification.comment$"
   HOSTDISPLAYNAME = "$host.display_name$"
   SERVICEDISPLAYNAME = "$service.display_name$"
   USEREMAIL = "$user.email$"
 }
}

Greetings,

Robert Verkerk



_______________________________________________
icinga-users mailing list
[email protected]<mailto:[email protected]>
https://lists.icinga.org/mailman/listinfo/icinga-users



-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
** OSDC 2015 - April - osdc.de **
** Puppet Camp Berlin 2015 - April - netways.de/puppetcamp **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to