| | 1 | = Icinga2 Notification to Telegram through Director = |
| | 2 | |
| | 3 | === Prerequisite === |
| | 4 | |
| | 5 | * Telegram BOT Token code and Chat ID created. |
| | 6 | If you haven't created these, please consult [wiki:NSM2021/Agenda/AlertsLibrenms#CreateTelegramBOT here] |
| | 7 | * Notification Users are created in Icinga Director |
| | 8 | |
| | 9 | == Create new command on Icinga2 == |
| | 10 | |
| | 11 | We have created a custom bash code to translate Icinga notifications to Telegram. Download it into the scripts directory. |
| | 12 | |
| | 13 | {{{ |
| | 14 | #!sh |
| | 15 | cd /etc/icinga2/scripts |
| | 16 | |
| | 17 | wget https://raw.githubusercontent.com/LEARN-LK/Tutorials/master/Scripts/ICINGA2/icinga2-telegram-host.sh |
| | 18 | |
| | 19 | wget https://raw.githubusercontent.com/LEARN-LK/Tutorials/master/Scripts/ICINGA2/icinga2-telegram-service.sh |
| | 20 | |
| | 21 | chmod +x icinga2-telegram-host.sh |
| | 22 | |
| | 23 | chmod +x icinga2-telegram-service.sh |
| | 24 | }}} |