Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when sending notifications from Zabbix Server 7.0.3 #220

Open
SD3vEng opened this issue Sep 7, 2024 · 0 comments
Open

Error when sending notifications from Zabbix Server 7.0.3 #220

SD3vEng opened this issue Sep 7, 2024 · 0 comments

Comments

@SD3vEng
Copy link

SD3vEng commented Sep 7, 2024

OS: Oracle Linux 9.4 Python 3.9 Zabbix Server 7.0.3
Good afternoon! I use your script to send messages in telegrams. When inserting messages with the following parameters into the template, if you remove the graph, what is sent without an error :
zbxtg;graphs zbxtg;graphs_period=3600 Начало проблемы: {EVENT.TIME} on {EVENT.DATE} Problem name: {EVENT.NAME} Host: {HOST.NAME} Severity: {EVENT.SEVERITY} Operational data: {EVENT.OPDATA} Original problem ID: {EVENT.ID}
image

An error message appears, but the text part of the alert notification is sent in telegrams, without graphs:
Traceback (most recent call last): File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 940, in <module> main() File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 893, in main zbxtg_file_img = zbx.graph_get(settings["zbxtg_itemid"], settings["zbxtg_image_period"], File "/usr/lib/zabbix/alertscripts/zbxtg.py", line 310, in graph_get title = requests.utils.quote(title) File "/usr/lib64/python3.9/urllib/parse.py", line 883, in quote return quote_from_bytes(string, safe) File "/usr/lib64/python3.9/urllib/parse.py", line 908, in quote_from_bytes raise TypeError("quote_from_bytes() expected bytes") TypeError: quote_from_bytes() expected bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant