Query information is missing

Several PostgreSQL servers are connected to the monitoring. The agent configuration is the same everywhere. On some servers, the monitoring shows that there is no QAN information.

How can I understand why QAN is not returning queries? All host metrics are present, but there are no queries.

Agent settings:
pg_stat_monitor.pgsm_bucket_time: 60
pg_stat_monitor.pgsm_enable_overflow: true
pg_stat_monitor.pgsm_enable_pgsm_query_id: false
pg_stat_monitor.pgsm_enable_query_plan: true
pg_stat_monitor.pgsm_histogram_max: 30000
pg_stat_monitor.pgsm_histogram_min: 50
pg_stat_monitor.pgsm_max: 512
pg_stat_monitor.pgsm_max_buckets: 20
pg_stat_monitor.pgsm_normalized_query: true
pg_stat_monitor.pgsm_query_shared_buffer: 384
pg_stat_monitor.pgsm_track_application_names: false
pg_stat_monitor.pgsm_track_planning: false

hi @ANDiv1976 ,

I would start by checking the PMM client-side status and logs from the affected nodes:

pmm-admin list
journalctl -u pmm-agent

or to get them in a zip file:

pmm-admin summary

Also check you are indeed generating query data, and that it’s current:

postgres#= SELECT count(*) from pg_stat_monitor;
postgres#= SELECT * from pg_stat_monitor LIMIT 5;

etc

1 Like

hi, Augustin_G!

The issue was with pg_stat_monitor.pgsm_enable_pgsm_query_id: false.
After I changed it to true, queries appeared in QAN.

2 Likes