KlStz
(Klaus Steinmetz)
September 15, 2026, 2:37pm
1
We have configured some NotificationCommand at an other Icinga instance:
object NotificationCommand "mattermost-host-notification" {
...
env = {
...
HOSTSTATE = "$host.state$"
}
... script....
}
I want configure it at Icinga Director and I can use the script in the same way.
It’s possible - I don’t know ?
Perhaps with Arguments => Condition format => Icinga DSL - that could work. But I don’t have any experiences.
Otherwise I have to extend the script with parameter parsing.
Icinga Director can’t use env vars.
You can use the command natively in icinga and import it using director kickstarter.
The imported command can be used in icingadirector as external command but is not editable.
here is a post about env vars, I think this is natively used and imported:
I’m trying to use a telegram notification script I found here (GitHub - TeraIT-at/icinga-telegram-bot: Telegram Bot for Icinga2 )
For the notification definition it uses env variables and it’s defined as follows:
object NotificationCommand "telegram-host-notification" {
import "plugin-notification-command"
command = [ SysconfDir + "/icinga2/scripts/telegram-host-notification.sh" ]
env = {
NOTIFICATIONTYPE = "$notification.type$"
HOSTNAME = "$host.name$"
HOSTALIAS = "$host.di…
and here is a hacky workaround:
try to run the go command manually (from shell) first, so we can exclude any configuration issues on the rocketchat side
KlStz
(Klaus Steinmetz)
September 16, 2026, 8:23am
3
Thanks.
It’s a little bit confusing. The icinga2 daemon reads the NotificationCommand from filesystem (see above). The Director kickstarter read it also and it’s listet at “External Commands” - that’s right. But the definition shown ist:
object NotificationCommand "mattermost-host-notification" {
import "plugin-notification-command"
command = [
"/etc/icinga2/scripts/mattermost-host-notification.sh"
]
timeout = 1m
}
The director’s notification configuration is running.
SUCCESS