What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

error when sending HTTP Action

Votes:

0

Hello everyone, I have the PRTG version 22.4.81.1532 installed. an error appears during HTTP Action.

EIdHTTPProtocolException: HTTP/1.1 400 Bad Request.

I also have an older version of PRTG 19.4.54.1506 installed Everything works on this version, there are no errors.

HTTP Action. I use it to send notifications to telegram chat.

https://api.telegram.org/<bottoken>/sendMessage
Do not send SNI (default)

chat_id=-<chatid>&text=
There's a *%status* sensor in your PRTG!
[%device](%linksensor)

HTTP 1.1 (default)

http prtg telegram

Created on Jan 13, 2023 9:01:10 AM

Last change on Jan 16, 2023 7:40:58 AM by  Felix Wiesneth [Paessler Support]



Best Answer

Accepted Answer

Votes:

1

Hello Roman,

in this case the Bad Request is coming from Telegram trying to decode the placeholder values in the "Test Notification" function as UTF-8 Characters and failing. The Full error Telegram is reporting back is: {"ok":false,"error_code":400,"description":"Bad Request: text must be encoded in UTF-8"}

To verify the function please simulate an error on a sensor (right-click > "Simulate Error Status", afterwards don't forget to resume the sensor) that is set up for this notification template to properly test the notification.
Usually it works despite the "Test notification" function failing.


Kind regards,
Johannes Beyerlein, Technical Support Team

Created on Jan 16, 2023 8:47:24 PM by  Johannes Beyerlein [Paessler Support]



6 Replies

Votes:

0

Hello,

can you check out this article? Check your SNI configuration. I suspect SNI+FQDN issues. https://kb.paessler.com/en/topic/67398-my-http-sensors-fail-to-monitor-websites-which-use-sni-what-can-i-do

Good luck!

Created on Jan 16, 2023 9:18:20 AM



Accepted Answer

Votes:

1

Hello Roman,

in this case the Bad Request is coming from Telegram trying to decode the placeholder values in the "Test Notification" function as UTF-8 Characters and failing. The Full error Telegram is reporting back is: {"ok":false,"error_code":400,"description":"Bad Request: text must be encoded in UTF-8"}

To verify the function please simulate an error on a sensor (right-click > "Simulate Error Status", afterwards don't forget to resume the sensor) that is set up for this notification template to properly test the notification.
Usually it works despite the "Test notification" function failing.


Kind regards,
Johannes Beyerlein, Technical Support Team

Created on Jan 16, 2023 8:47:24 PM by  Johannes Beyerlein [Paessler Support]



Votes:

0

Hi, Johannes

thank you very much, I tried it as you said, so everything works. error only when I try to send test notification.

Created on Jan 19, 2023 6:06:51 AM



Votes:

0

Hello Roman,

Thank you for the feedback. Glad it worked out.


Kind regards,
Johannes Beyerlein, Technical Support Team

Created on Jan 23, 2023 8:51:49 PM by  Johannes Beyerlein [Paessler Support]



Votes:

0

I had the exact same problem with the exact same PRTG version and Telegram. Seems like it is the %device parameter that Telegram chokes on. If I remove that, the test works.

However - the real notifications gets send, so its ok after all.

Created on Mar 14, 2023 11:54:18 AM



Votes:

0

Hello Rolf,

Yes this is an issue inside the Telegram API misinterpreting the %placeholder messages as control message and therefore failing, in the real notification those get replace by their respective values and therefore work without a problem.


Kind regards,
Johannes Beyerlein, Technical Support Team

Created on Mar 23, 2023 12:31:06 PM by  Johannes Beyerlein [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.