-
Incident report
-
Resolution: Cannot Reproduce
-
Trivial
-
None
-
1.8.10
-
Ubuntu 10.04, Zabbix 1.8.10, PostgreSQL 9.1 with default settings
Hello!
Recently we've changed our database backend from mysql to postgres with data porting and have no problem except one.
We use different macros in web monitoring like
[CODE]
In mysql it is stored like
[CODE]{firmID}
=1\r\n
{filialID}=1\r\n{city}=Barnaul\r\n{version}=1\r\n{key}=1[/CODE]But not in postgres with default settings:
[CODE]{firmID}=1\015\012{filialID}
=1\015\012
{city}=Barnaul\015\012{version}=1\015\012
{key}=1[/CODE]It seems that postgres stores CRLF like \015\012 and all the web monitoring is broken right now with "Page did not match". We've tried different settings in database config with no success.
[CODE]backslash_quote = safe_encoding
standard_conforming_strings = on
[/CODE]
We made dirty hack to restore functionality.
zabbix/src/zabbix_server/httppoller/httpmacro.c (84)
Was:
[CODE]replacement++;
if(NULL != (c2 = strchr(replacement,'[B]\r[/B]')))
{
[/CODE]
Now:
[CODE]replacement++;
if(NULL != (c2 = strchr(replacement,'[B]:[/B]')))
{ [/CODE]
And made ":" separator between {key}
as:
{key}=value:
{key1}=value:
{key2}=value
It works now.
It seems that with default DB settings the way httpmacro.c do this work is incorrect. We have no '\r' in postgres. Or we do something wrong )