Check the supported versions
Create a monitoring user with the correct permissions
Before adding a target PostgreSQL instance in the UI you should first create a
dbmarlin user in the target database instance.
Collecting SQL statement executions
In order to collect executions counts at the SQL statement level, the
pg_stat_statements library must be loaded and the extension created within PostgreSQL. There may be some increased overhead on PostgreSQL, which is why it is normally disabled. Having execution counts is very useful for performance tuning and it allows the calculation of average response time. Here are the steps to enable pg_stat_statements.
pg_stat_statementsto the list of
shared_preload_libraries = 'pg_stat_statements, ...'
- There are options that can also be set in
pg_stat_statements.save(default off). These can be left at there default values.
- Restart PostgreSQL to pick up the change.
- Log in as administrator using:
create extension pg_stat_statements
- This installs the
pg_stat_statementsview in the
publicschema in the
postgresdatabase. We assume that the
dbmarlinpostgres user has been created in the
- As the dbmarlin user in psql run:
select * from public.pg_stat_statementsto verify that the view exists and contains data.
Adding the Database Target
This is done through the User Interface using the Add Database screen