-
Problem report
-
Resolution: Unresolved
-
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:
- 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;" - Pull zabbix-server-pgsql:latest image from dockerhub.
- {}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 - When running container all tables are created to "public" schema.
- 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"