ableev / Zabbix-in-Telegram

Zabbix Notifications with graphs in Telegram
MIT License
771 stars 235 forks source link

Configure to use different bots #200

Closed Vladimir-Sl closed 4 years ago

Vladimir-Sl commented 4 years ago

Hi. This is not a problem rather a hint. Setting up the script on different bots. In /usr/lib/zabbix/alertscripts create the folder bot2 and copy the main scripts as described in README.md. In the settings zabbix -> Configuration > Media types > Create media type, in the new Media types > Script name, write bot2/zbxtg_group.py and make further settings. Parameters in bot2/zbxtg_settings.py are changed to a new bot. The configuration has been verified and is currently working on my server and sends an alarm to two different bots.

ableev commented 4 years ago

You can set token in the parameters, no need to copy scripts, it's harder to update it

Vladimir-Sl commented 4 years ago

I mean, there is already 1 working script left over from the previous system administrator, and this script is already sending messages through a bot that I can’t control. I created my group and my bot and made a separate folder for it and a new configuration for scripts. Or is it meant to add a second tg_key to one zbxtg_settings.py script?

ableev commented 4 years ago

https://github.com/ableev/Zabbix-in-Telegram/issues/98

Vladimir-Sl commented 4 years ago

Thanks! I take off my issue.