I have questions regarding setting up Postgresql monitoring with Agent 2 Postgresql plugin and session names
I'm using Zabbix 5.4 and Postgresql 13.4. I know that PG13 is not yet supported, but in reality pgsql.wal.stat is the only item that has issues because of the version.
In plugin readme (https://git.zabbix.com/projects/ZBX/...gres/README.md) there is an example conf to connecting to two separate postgresql instances. Before that example it tells that supported parameters are Uri, User, Password, Service, TLSConnect, TLSCAFile, TLSCertFile and TLSKeyFile, but in example there are following rows:
Plugins.Postgres.Sessions.Prod.Database=proddb
Plugins.Postgres.Sessions.Test.Service=testdb
What is the difference between Database and Service?
Does these two parameters (.Database and .Service) only specify the database to connect to when connecting a Postgresql instance (with specific IP and port) and monitoring of all databases in this instance is possible or do these parameters allow monitoring only that specific database to which the connection was made (kinda breaks the LLD purpose)?
In the same README.md it specifies, that when using session names, just skip the rest of the connection parameters.
I am using a template from Zabbix (https://www.zabbix.com/integrations/...tgresql_agent2,
How should I configure database specific (not PostgreSQL engine, but actual database containing schemas and tables) items, which are created by LLD (e.g. pgsql.db.age, pgsql.db.size, pgsql.db.bloating_tables)?
For example with URI the item is
but with sessionname it does not work
Fails with error "Invalid parameters: second parameter "User" cannot be passed along with session."
Shifting the {#DBNAME} does not help
Invalid parameters: third parameter "Password" cannot be passed along with session.
Up until
Too many parameters.
Just to assure that this issue is not about Postgresql 13 i ran the SQL from https://git.zabbix.com/projects/ZBX/...atabase_age.go directly from psql without problems.
I'm using Zabbix 5.4 and Postgresql 13.4. I know that PG13 is not yet supported, but in reality pgsql.wal.stat is the only item that has issues because of the version.
In plugin readme (https://git.zabbix.com/projects/ZBX/...gres/README.md) there is an example conf to connecting to two separate postgresql instances. Before that example it tells that supported parameters are Uri, User, Password, Service, TLSConnect, TLSCAFile, TLSCertFile and TLSKeyFile, but in example there are following rows:
Plugins.Postgres.Sessions.Prod.Database=proddb
Plugins.Postgres.Sessions.Test.Service=testdb
What is the difference between Database and Service?
Does these two parameters (.Database and .Service) only specify the database to connect to when connecting a Postgresql instance (with specific IP and port) and monitoring of all databases in this instance is possible or do these parameters allow monitoring only that specific database to which the connection was made (kinda breaks the LLD purpose)?
In the same README.md it specifies, that when using session names, just skip the rest of the connection parameters.
I am using a template from Zabbix (https://www.zabbix.com/integrations/...tgresql_agent2,
How should I configure database specific (not PostgreSQL engine, but actual database containing schemas and tables) items, which are created by LLD (e.g. pgsql.db.age, pgsql.db.size, pgsql.db.bloating_tables)?
For example with URI the item is
Code:
pgsql.db.age["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}","{#D BNAM E}"]
Code:
pgsql.db.age["{$PG.SESSIONNAME}","{#DBNAME}"]
Shifting the {#DBNAME} does not help
Code:
pgsql.db.age["{$PG.SESSIONNAME}",,"{#DBNAME}"]
Up until
Code:
pgsql.db.age["{$PG.SESSIONNAME}",,,,,,,,"{#DBNAME}"]
Just to assure that this issue is not about Postgresql 13 i ran the SQL from https://git.zabbix.com/projects/ZBX/...atabase_age.go directly from psql without problems.
Comment