You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-07-30 21:17:54 +00:00 (in Redmine)
In many objects one can have more sophisticated logic that is influencing its behaviour.
The following is an example of if statements that change the outcome of a notification depending on other values.
apply Notification "host-mail-noc" to Host {
import "mail-host-notification"
// replace interval inherited from `mail-host-notification` template with new notfication interval set by a host custom attribute
if (host.vars.notification_interval) {
interval = host.vars.notification_interval
}
// same with notification period
if (host.vars.notification_period) {
period = host.vars.notification_period
}
// Send SMS instead of email if the host's custom attribute `notification_type` is set to `sms`
if (host.vars.notification_type == "sms") {
command = "sms-host-notification"
} else {
command = "mail-host-notification"
}
user_groups = [ "noc" ]
assign where host.address
}
It would be nice and fairly easy to add an option that is "printed unchanged" by the template.
The text was updated successfully, but these errors were encountered:
I was just to open another ticket, then I saw this, I really would like to have a generic way to add functionality like this.
I.e. where I need it is in the checkcommands, for example to use functions as values for the parameters, for example to create stuff like this:
...
"--ssl" = {
set_if = "$have_ssl$"
}
...
In the "current" state of art, it creates things like:
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11366
Created by dagobert on 2016-03-13 11:27:31 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-07-30 21:17:54 +00:00 (in Redmine)
In many objects one can have more sophisticated logic that is influencing its behaviour.
The following is an example of
if statements
that change the outcome of a notification depending on other values.It would be nice and fairly easy to add an option that is "printed unchanged" by the template.
The text was updated successfully, but these errors were encountered: