# NotificationCommand definition with env{} migrate to Icinga Director

**URL:** <https://community.icinga.com/t/notificationcommand-definition-with-env-migrate-to-icinga-director/15580>\
**Category:** Automation & Infrastructure\
**Tags:** director\
**Created:** [September 15, 2026, 2:37pm UTC](https://community.icinga.com/t/notificationcommand-definition-with-env-migrate-to-icinga-director/15580 "2026-09-15T14:37:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [September 15, 2026, 2:46pm UTC](https://community.icinga.com/t/notificationcommand-definition-with-env-migrate-to-icinga-director/15580/2 "2026-09-15T14:46:24Z")

</div>

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:

> [@Env variables are being taken in count?](https://community.icinga.com/t/env-variables-are-being-taken-in-count/11063):
>
> I’m trying to use a telegram notification script I found here ([GitHub - TeraIT-at/icinga-telegram-bot: Telegram Bot for Icinga2](https://github.com/TeraIT-at/icinga-telegram-bot)) 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:

> [@Rocket.Chat notification help](https://community.icinga.com/t/rocket-chat-notification-help/10243/8):
>
> try to run the go command manually (from shell) first, so we can exclude any configuration issues on the rocketchat side

---

_[View the full topic](https://community.icinga.com/t/notificationcommand-definition-with-env-migrate-to-icinga-director/15580)._
