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

PostgreSQL schema change

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.0
    • Following database configuration guide i created schema "zabbix". However running docker zabbix-server image defaults to "public".

      Steps to reproduce:

      1. Database is installed on separate host. Configure database as described here:
        https://www.zabbix.com/documentation/current/en/manual/installation/best_practices/access_control/postgresql
        Quote: "CREATE SCHEMA zabbix AUTHORIZATION usr_owner;"
      2. Pull  zabbix-server-pgsql:latest image from dockerhub.
      3. {}Run container as described in Example 2: https://www.zabbix.com/documentation/current/en/manual/installation/containers#examples
        Also please note that there is no variable for PG schema https://www.zabbix.com/documentation/current/en/manual/installation/containers#environment-variables
      4. When running container all tables are created to "public" schema.
      5. Looking inside runnging container:
      0523ba8c49c8:/var/lib/zabbix$ grep -i schema /etc/zabbix/zabbix_server.conf 
      ### Option: DBSchema
      #    Schema name. Used for PostgreSQL.
      # DBSchema=
      DBSchema=public
       

      Result:

      zabbixdb=# set search_path="zabbix";
      SET
      zabbixdb=# \dt
      Did not find any relations.
      zabbixdb=# set search_path="public";
      SET
      zabbixdb=# \dt
                        List of relations
       Schema |            Name            | Type  | Owner  
      --------+----------------------------+-------+--------
       public | acknowledges               | table | zabbix
       public | actions                    | table | zabbix
       public | alerts                     | table | zabbix
       public | auditlog                   | table | zabbix
      ... 

      Expected:
      Tables are created to predefined postgresql schema.

      Either way this is a documentation error or there is missing a proper way to configure postgresql schema other than "public"

            zabbix.dev Zabbix Development Team
            pisikesipelgas Pisike Sipelgas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: