Page tree

This page provides the user permissions that you need to assign to the users that you would use while configuring monitoring of your PostgreSQL database in TrueSight.

Database users

Ensure that the user that you would use to configure monitoring of your PostgreSQL database has the pg_monitor default role in PostgreSQL database. For more information, see PostgreSQL documentation Open link .

Use the following commands to assign these permissions:

  • GRANT pg_monitor TO <monitoring user>;
  • GRANT CONNECT ON DATABASE <database name> TO <monitoring user>;

If you are using PostgreSQL database 9.x version, the monitoring user needs read permission to the following tables:

  • pg_database
  • pg_tablespace
  • pg_locks
  • pg_stat_user_tables
  • pg_stat_activity
  • pg_stat_database

Operating system users

To monitor tablespaces locally, ensure that the PATROL Agent user has read access to the filesystem path and to execute the df -k command on the tablespaces filesystems.

If you are monitoring tablespaces remotely, ensure that the user that you enter while configuring monitoring of your database in TrueSight (in the Remote OS Connection details field) has read access to the filesystem path and to execute the df -k command on the tablespaces filesystems.

Tablespace paths are determine by using the following query:

SELECT CASE WHEN pg_tablespace_location(oid)='' AND spcname='pg_default' THEN current_setting('data_directory')||'/base/' WHEN pg_tablespace_location(oid)='' AND spcname='pg_global' THEN current_setting('data_directory')||'/global/' ELSE pg_tablespace_location(oid) END AS spclocation, spcname FROM pg_tablespace

  • No labels