N
N
NeSecurnenko2020-10-21 08:06:59
Monitoring
NeSecurnenko, 2020-10-21 08:06:59

How to fix encoding of rendered html page in zabbix web script?

Good day.

I set up a web script, set a string to search on the page, created a trigger that is called when the string is missing.

On pages with utf-8 encoding there is no problem, but with windows-1251 zabbix can't detect the string!

curl produces hooks in Cyrillic with windows-1251 pages, everything is fine with utf8.

The element with web.page.get[host,,] returns html, where Cyrillic is displayed with question marks (only on pages where the encoding is windows-1251).

Where and what should be specified in zabbix so that it normally displays pages with cp1251 as well? Could it be something else?

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kisaa, 2020-10-21
@kisaa

Try digging into Headers:
https://www.zabbix.com/documentation/3.4/manual/we...

For example:
Accept-Charset=utf-8
Accept-Language=en-US
Content-Type=application/xml; charset=utf-8

I did not check, but in terms of meaning, if you specify CP1251, can it take off?
If it does not help, then you can ask on the Zabbix forum.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question