ableev / Zabbix-in-Telegram

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

Bad Request: IMAGE_PROCESS_FAILED #190

Open jonathanpcruz opened 4 years ago

jonathanpcruz commented 4 years ago

Message ported on telegram without graphs. Bellow error on logs.

zbxtg.py: Trying to /sendPhoto: zbxtg.py: https://api.telegram.org/BOTOIDDDDDD/sendPhoto zbxtg.py: {'caption': '', 'disable_notification': True, 'reply_to_message_id': 284, 'chat_id': '-1001485682768\n', 'reply_markup': '{}'} zbxtg.py: files: {'photo': <open file '/var/tmp/zbxtg/38396.png', mode 'rb' at 0x7fe889e290c0>} zbxtg.py: Bad Request: IMAGE_PROCESS_FAILED

ableev commented 4 years ago

@jonathanpcruz these are not errors. Could be anything, test the script: https://github.com/ableev/Zabbix-in-Telegram/wiki/How-to-test-script-in-command-line

jonathanpcruz commented 4 years ago

Hi @ableev, same messagem on test.

root@zabbix-master2:/usr/lib/zabbix/alertscripts# sudo -u zabbix ./zbxtg.py "@JonathanPCruz" test "$(echo -e 'zbxtg;graphs: \nzbxtg;graphs_period=3600\nzbxtg;itemid:38396\nzbxtg;title:ololo')" zbxtg.py: Bad Request: IMAGE_PROCESS_FAILED root@zabbix-master2:/usr/lib/zabbix/alertscripts# ./zbxtg.py "@JonathanPCruz" test "$(echo -e 'zbxtg;graphs: \nzbxtg;graphs_period=3600\nzbxtg;itemid:38396\nzbxtg;title:ololo')" zbxtg.py: Bad Request: IMAGE_PROCESS_FAILED

I get this messagem on Zabbix log. zbxtg.py: Trying to /sendPhoto: zbxtg.py: https://api.telegram.org/botTESTE:AAGi-_G0BE1234567890TESTE/sendPhoto zbxtg.py: {'caption': '', 'disable_notification': True, 'reply_to_message_id': 673, 'chat_id': '-test\n', 'reply_markup': '{}'} zbxtg.py: files: {'photo': <open file '/var/tmp/zbxtg/38396.png', mode 'rb' at 0x7fbc398b80c0>} zbxtg.py: Bad Request: IMAGE_PROCESS_FAILED

okand commented 4 years ago

Make sure the user you have configured in your zbxtg_settings.py is allowed frontend access and have read permission on a group that the host/item you're trying to send a graph of is part of.

chudinanton commented 3 years ago

Message ported on telegram without graphs. Bellow error on logs.

zbxtg.py: Trying to /sendPhoto: zbxtg.py: https://api.telegram.org/BOTOIDDDDDD/sendPhoto zbxtg.py: {'caption': '', 'disable_notification': True, 'reply_to_message_id': 284, 'chat_id': '-1001485682768\n', 'reply_markup': '{}'} zbxtg.py: files: {'photo': <open file '/var/tmp/zbxtg/38396.png', mode 'rb' at 0x7fe889e290c0>} zbxtg.py: Bad Request: IMAGE_PROCESS_FAILED

Check if there is a slash at the end in the URL settings. If there is, try to remove it I had the same problem. Removing the slash solved this problem.

paulmateo2021 commented 3 years ago

I have the same fail, but I change my admin account y run it!!