Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4705

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

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Cannot Reproduce
    • 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

      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 )

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sn00p Artem Silenkov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: