Ad Widget

Collapse

Zabbix 1.8 install Postgres backend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PeteH
    Junior Member
    • Apr 2011
    • 8

    #1

    Zabbix 1.8 install Postgres backend

    Guys,
    When doing the install step
    cat images_pgsql.sql | psql -U zabbix zabbix
    Password for user zabbix:

    I get loads of these

    WARNING: nonstandard use of \\ in a string literal
    LINE 1: INSERT INTO images VALUES (1,1,'Hub','\\211PNG\\015\\012\\03...
    ^
    HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
    ERROR: duplicate key value violates unique constraint "images_pkey"
    WARNING: nonstandard use of \\ in a string literal
    LINE 1: INSERT INTO images VALUES (2,1,'Hub (small)','\\211PNG\\015\...
    ^
    What am I missing here? Is there a more recent images_pgsql.sql I should be using? (I can see from google I'm not the first with this error but I can't find anyone with a good answer yet. Am I looking at doing a global replace with sed?)

    Thanks,
    Pete
  • Rudd
    Member
    • Mar 2011
    • 69

    #2
    Hi Pete,

    I believe the warnings are informational only and the images will actually be loaded in the database.

    The default behaviour depends on your version of Postgres but you could try the following to make the warnings disappear:

    Edit postgresql.conf, set
    standard_conforming_strings = on
    escape_string_warning = off
    and restart the server.

    More information here: http://www.postgresql.org/docs/8.2/s...ompatible.html

    (Applications that wish to use backslash as escape should be modified to use escape string syntax (E'...'), because the default behavior of ordinary strings will change in a future release for SQL compatibility. This variable can be enabled to help detect applications that will break.)

    Originally posted by PeteH
    ERROR: duplicate key value violates unique constraint "images_pkey"
    This error on the other hand would concern me, unless you are doing that install step multiple times in a row.

    Comment

    • PeteH
      Junior Member
      • Apr 2011
      • 8

      #3
      Rudd,
      Thanks for that. Yes, I have done this a couple of times and having done a SELECT * FROM images everything seems to be there now, so I'm not going to worry further about it. The error messages were just a little disconcerting particularly when you're following a set of instructions blind.

      Pete

      Comment

      Working...