No statements populated on the PostgreSQL statements dashboard data for PostgreSQL.
Error messages like "ERROR: relation "pg_stat_statements" does not exist" may appear in the PostgreSQL agent log file.
Installation of the pg_stat_statements module and creation of the extension in a database is required for statement tracking. Basic steps follow below. For more information on how to install this, refer to the relevant PostgreSQL documentation for your version
1. Confirm that statement tracking is turned on in the agent properties
2. In the configuration file, set the below sample properties. The pg_stat_statements module allows more advanced configuration, but these are the minimum required.
shared_preload_libraries = 'pg_stat_statements' pg_stat_statements.max = 1000 pg_stat_statements.track = all
More info on properties: https://www.postgresql.org/docs/current/static/pgstatstatements.html
3. Restart the server
pg_stat_statements view should appear in DB's public schema. If the public schema does not exist, create this first.
5. When configuring the Foglight for PostgreSQL agent properties, make sure to enable statement tracking and provide the database name where the extension was created.
6. Confirm that the pg_stat_statements view is present on the PostgreSQL server in the configured database.
If the view is present and the statements do not display, try recreating the view in the database and ensure that the Foglight user has access to the view.
Run the following command in each database where pg_stat_statements has been installed.
ALTER EXTENSION pg_stat_statements UPDATE
© ALL RIGHTS RESERVED. Feedback 使用条款 隐私 Cookie Preference Center