canonical / pgbouncer-operator

A charmed operator for running PgBouncer on virtual machines.
https://charmhub.io/pgbouncer?channel=1/stable
Apache License 2.0
4 stars 4 forks source link

COS Dashboard "Total Query Time" is empty #230

Open taurus-forever opened 6 months ago

taurus-forever commented 6 months ago

Steps to reproduce

Deploy standart tutorial with COS and start continious writes on test-app.

Expected behavior

All dashboards have data.

Actual behavior

image Missing data on dashboard for "Total Query Time" and "Database reserved pool size".

Hovewer the exporter provides them:

> juju ssh pgbouncer/0
ubuntu@juju-801057-2:~$ curl 127.0.0.1:9127/metrics | grep pgbouncer_stats_received_bytes_total
  pgbouncer_stats_received_bytes_total{database="pgbouncer"} 0
0 pgbouncer_stats_received_bytes_total{database="postgresql_test_app_first_database"} 1.789629e+06

Versions

App                  Version  Status  Scale  Charm                Channel        Rev  Exposed  Message
pgbouncer            1.21.0   active      1  pgbouncer            1/stable        88  no       
pgbouncer-cos-agent           active      1  grafana-agent        latest/stable   65  no       
postgresql           14.10    active      1  postgresql           14/stable      363  no       Primary
postgresql-test-app           active      1  postgresql-test-app  latest/stable  119  no       received database credentials of the first database

Unit                      Workload  Agent  Machine  Public address  Ports     Message
postgresql-test-app/0*    active    idle   2        10.184.219.161            received database credentials of the first database
  pgbouncer-cos-agent/1*  active    idle            10.184.219.161            
  pgbouncer/1*            active    idle            10.184.219.161            
postgresql/0*             active    idle   0        10.184.219.86   5432/tcp  Primary

Log output

No related information in logs.

github-actions[bot] commented 6 months ago

https://warthogs.atlassian.net/browse/DPE-4390

taurus-forever commented 3 weeks ago

The investigation shows, it works, but users have to select the database name explicitly: Screenshot from 2024-11-07 00-44-40

We will investigate how to fix/improve it for all databases (if possible / make sense). @lucasgameiroborges we also need there rate => irate fixes like you completed on PostgreSQL dashboards.

Pre-planned for the next pulse 2024#24.