Query Analytics configuration for PostgreSQL

Hi.
I am trying to put in place PostgreSQL monitoring (PMM 2.24). Everything works fine but when I check on the Query Analytics dashboard I can only display system queries and not my application queries.
Is there any specific configuration to put in place for QAN except what we read at this page please? Percona Monitoring and Management
Thanks and Regards

Hi Elisa,

It’s a little weird that you can find system queries and not application queries data in Query Analytics (QAN).

Can you provide us a little more insight about the setup? Following details would be great to understand the issue:

  • PMM server setup and version (Docker, AMI, etc)
  • PostgreSQL setup and version (Amazon RDS, standalone PostgreSQL instance, etc)
  • PMM client setup and version (via dashboard, tarball on client instance, etc)
  • pg_stat_statements or pg_stat_monitor

I would try to run some queries on the database server and see if the same reflect in QAN. PMM docker image also uses PostgreSQL for internal use, so you should ensure data you see in QAN is from your database.

1 Like

I have learned there’s some nuance with enabling postgres plugins. The one that comes to mind is with pg_stat_monitor I found that if I want to get queries and explains for all existing databases and any new ones I create automatically I have to initially enable the plugin as the postgres user against the postgres database. If I enable it against another database I’ll only see data for that database…so any new databases created after plugin enablement will need it enabled explicitly to see results.

1 Like

Hi Shashank.
Thanks for your answer.
Here some details:
• PMM server setup and version (Docker, AMI, etc): Docker, PMM version 2.24
• PostgreSQL setup and version (Amazon RDS, standalone PostgreSQL instance, etc): standalone Postgres 10, 12 and 13
• PMM client setup and version (via dashboard, tarball on client instance, etc): yum, PMM version 2.24, services added via command line
• pg_stat_statements or pg_stat_monitor: pg_stat_statements
Thanks and Regards.

Hi Steve!
We are using pg_stat_statements.
Any tips?
Thanks and Regards