-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.2
-
Debian GNU/Linux 11
-
0.1
If set system locale like this
$ cat /etc/default/locale LANG="en_US.UTF-8" LANGUAGE="en_US:UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NAME="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_TELEPHONE="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8"
That results in the following error:
481432:20220323:173908.786 error reason for "Zabbix server:pgsql.ping.time["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.PASSWORD}","{$PG.DB}"]" changed: Preprocessing failed for: 1.Time: 0,424 ms 1. Failed: cannot perform regular expression "Time:\s+(\d+\.\d+)\s+ms" match for value of type "string": pattern does not match
It looks like there was an attempt to fix this problem by adding the variable LANG=LANG=C.UTF-8 in the template_db_postgresql.conf file: ZBX-17169
However, it doesn't work in the current case:
$ LANG=C.UTF-8 psql -qtAX -f "/var/lib/zabbix/postgresql/pgsql.ping.time.sql"
1
Time: 0,340 ms
But:
$ LC_ALL=C.UTF-8 psql -qtAX -f "/var/lib/zabbix/postgresql/pgsql.ping.time.sql"
1
Time: 0.335 ms
Or even better:
$ LC_NUMERIC=C.UTF-8 psql -qtAX -f "/var/lib/zabbix/postgresql/pgsql.ping.time.sql"
1
Time: 0.335 ms
Should have changed LANG=C.UTF-8 to LC_NUMERIC=C.UTF-8.