ZABBIX BUGS AND ISSUES

Zabbix 1.8.10+Postgresql 9.1 default settings - web scenarious with macros inside possibly broken

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: 1.8.10
  • Fix Version/s: None
  • Component/s: Server (S)
  • Environment:
    Ubuntu 10.04, Zabbix 1.8.10, PostgreSQL 9.1 with default settings
  • Zabbix ID:
    RTD

Description

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]{firmID}=1
{filialID}=1
{city}=Barnaul
{version}=1
{key}=1[/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 )

Activity

Hide
Artem Silenkov added a comment -

screenshot from 1.9.10 but 1.8.10 do the same.
CRLF is substituted with \015\012 after save and reopen.

Show
Artem Silenkov added a comment - screenshot from 1.9.10 but 1.8.10 do the same. CRLF is substituted with \015\012 after save and reopen.
Hide
Oleksiy Zagorskyi added a comment - - edited

forum thread http://www.zabbix.com/forum/showthread.php?t=25149
an issue ZBX-3940 could be related.

Show
Oleksiy Zagorskyi added a comment - - edited forum thread http://www.zabbix.com/forum/showthread.php?t=25149 an issue ZBX-3940 could be related.
Hide
Artem Silenkov added a comment -
Show
Artem Silenkov added a comment - Also http://www.zabbix.com/forum/showthread.php?t=25161 in english
Hide
Alexander Vladishev added a comment -

Cannot reproduce on 1.8.10, latest 1.8, 2.0 and trunk r32423.

Probably, a problem in different versions of the PostgreSQL client (library) and the server.

The issue still reproducible on your environment?

Thanks.

Show
Alexander Vladishev added a comment - Cannot reproduce on 1.8.10, latest 1.8, 2.0 and trunk r32423. Probably, a problem in different versions of the PostgreSQL client (library) and the server. The issue still reproducible on your environment? Thanks.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated: