PostgreSQL — Prerequisites
Prerequisites for monitoring PostgreSQL with HEAL.
Prerequisites to complete before adding this component in the HEAL Control Center.
This section provides the essential setup steps required for the HEAL component agent. These prerequisites ensure the agent can successfully collect data from a Postgres database.
-
Grant PermissionsExecute the following grant commands. These permissions are needed for the component agent to collect the necessary data from the Postgres database:
-
Grant temporary access to the Postgres database to your Postgres user:
GRANT TEMP ON DATABASE postgres TO <postgres-User>; -
Grant select permissions on all tables in the public schema to your Postgres user:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO <postgres-User>; -
Grant execute permissions on all functions in the public schema to your Postgres user:
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO <postgres-User>; -
Grant usage permissions on all sequences in the public schema to your Postgres user:
GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO <postgres-User>;
Note: Replace
<postgres-User>with your actual Postgres username. -
-
Configure
postgresql.confFileSet the value of theshared_preload_librariesproperty topg_stat_statements:shared_preload_libraries = 'pg_stat_statements' -
Execute ExtensionsExecute the following command in the database that is configured with the component agent:
CREATE EXTENSION pg_stat_statements; -
Configure Additional ParametersFor the collection of data related to the
blk_read_timeandblk_write_timeKPIs, the following configuration must be set. Set the value of thetrack_io_timingproperty toon:track_io_timing = on
Once these prerequisites have been fulfilled, the HEAL component agent should be able to collect data from the Postgres database successfully.
See also: PostgreSQL (what HEAL monitors) · Setup & configuration guide