Skip to content

Error when sending notifications from Zabbix Server 7.0.3 #220

@SD3vEng

Description

@SD3vEng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions