-
Notifications
You must be signed in to change notification settings - Fork 234
How to test script in command line
Ilya Ableev edited this page Jan 16, 2016
·
5 revisions
Note: Zabbix runs script with three parameters, so if you are going to run it without any, with one or with two, please, don't. In case of success you will see no errors and you will get your message.
If something won't be ok, additional info will appear in stdout.
linux-20fr:~/Zabbix-in-Telegram # ./zbxtg.py "$username" test test
linux-20fr:~/Zabbix-in-Telegram #
- username is case sensitive
- check that you sent message to the bot directly (one-to-one message)
- check your connection to telegram api:
curl https://api.telegram.org/bot${API_KEY}/getUpdates
- if you see "
User 'username' needs to send some text bot in private
" that means that you hasn't sent message to your bot
Make sure that you are using zbxtg_group.py
for that
linux-20fr:~/Zabbix-in-Telegram # ./zbxtg_group.py "Zabbix in Telegram" test test
linux-20fr:~/Zabbix-in-Telegram #
- if you have white spaces in your chat's name – use quotes
- group chats don't have nicknames, use group's title to track you chat id automatically
- if you see "
You need to mention your bot in 'Group Name' group chat (i.e. type @YourBot)
" that means that you hasn't mentioned you bot in your group chat