Hi there!
could you please help me resolve my issue with setting up notifications with this plugin:
and enabled director? so I make all the configs in director!
I’ve put config files as told, then created user and this is resolved user:
object User “telegram_bot” {
enable_notifications = true
zone = “director-global”
vars.telegram_auth_token = “xyz”
vars.telegram_chat_id = “-xy”
}
then created data fields for notification.telegram and notify_users
then I’ve a host and resolved config is like this:
vars[“notification.telegram”] = true
vars.notify_users = “telegram_bot”
but the first line should look like this:
vars.notification.telegram = true
But it doesn’t… and daemon -C returns
warning/ApplyRule: Apply rule ‘telegram-notifications-notification-hosts’ (in /etc/icinga2/conf.d/telegram-notifications-configuration.conf: 48:1-48:70) for type ‘Notification’ does not match anywhere!
in the config file is this:
assign where host.vars.notification.telegram == true
but I am not able tu put vars[“notification.telegram”] = true into right format. I’ve tried to put notification_telegram with underscore to data field, then it looks OK, but when I change this:
assign where host.vars.notification.telegram == true
to this:
assign where host.vars.notification_telegram == true
it still says the same…
I am sorry for noobie question but I am really stucked and don’t know how to set it up the right way… Thanks for any hints that would help me!
Radim