-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
5.0.37rc1, 6.0.20rc1, 6.4.5rc1, 7.0.0alpha3
OS: Windows
Agent: Agent 1 (Zabbix Agentd)
Steps to reproduce:
1) Create .txt file in UTF8 encoding.
2) Add - Helloworld! to file.
3) Open file with Notepad++.
4) In Notepad++ there is buildin Encoding functionality.
5) Convert file from UTF8 to UTF-16LE BOM
6) Navigate to Zabbix UI (server and agent running) and create item with key
vfs.file.regexp[link_to_your_file\test_error.txt,H,UTF-16LE]
1st parameter - link to file.
2nd parameter - H (our regex)"
3rd parameter - UTF-16LE (file encoding).
7) We can wait until Zabbix collects values from file or just press Test in item.
Result:
Result displayed as - ??H.
Why there is question marks?
Expected:
Helloworld! displayed (as expected).
Additional info (w - windows, L - linux):
1w - changing 3rd parameter to UTF-16 - correct data displayed.
2w - same ??H displayed when you change 3rd parameter to UTF-16BE.
3L - repeating this scenario on Linux - everything works as expected (Helloworld! displayed as result).
4w - using 2nd parameter UTF-16LE for key vfs.file.contents - ??H displayed as result.
5w - using 3rd parameter UTF-16LE for key vfs.file.regmatch - 1 displayed as result.
6w - with Agent2, using same file/item/key - correct data returned (Helloworld! not ??H).