When icinga calls the script it does nothing (and I don’t know how to debug). But I’m guessing it’s because the env variables are not being set, because when on director I open the definition it’s just like this:
How do I enable icinga to use env variables? How to test if those are being set?
Thanks in advance
Version used (icinga2 --version)
version: r2.13.6-1
Operating System and version
Platform: Debian GNU/Linux
Platform version: 11 (bullseye)
Kernel: Linux
Kernel version: 5.10.0-19-amd64
Architecture: x86_64
Want to use Director (I’m so new to icinga that I guess DSL would just complicate things for me).
Thanks for the $ icinga2 object list command.
When running it, the check-command does contain the env variables:
Sure, have a look at Troubleshooting - Icinga 2 - be careful to restart icinga every time you enable and disable debug log or it will not work also don’t forget to disable it or your disk can fill up quickly!
Maybe temporarily replace telegram-service-notification.sh with:
/bin/bash
touch /tmp/debug_notification.log # create log
chmod 600 /tmp/debug_notification.log # secure it
env > /tmp/debug_notification.log # get the env vars
echo $@ >> /temp/debug_notification.log # get all attributes
If your topic is resolved, please also make sure to mark the response that helped you solve it as the “solution” by clicking the three dots on that message.
If the solution can’t be found in a single answer, it would be super helpful, if you could write a summary of what helped and marked this as the solution. This way users with a similar problem can solve their issues a lot easier. Thank you!