-
Notifications
You must be signed in to change notification settings - Fork 63
[-] fix pgbouncer dashboard #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[-] fix pgbouncer dashboard #1002
Conversation
Harmonise the layout of legends: in a list and at the bottom for all signs
since the metrics database model has changed, the actual database name is inside the JSON field data
also clean some old and unused sql queries
Pull Request Test Coverage Report for Build 19141559345Details
💛 - Coveralls |
|
Database model isn't change. :) That's something to be done with maintenance routines. Thanks! I'll check! |
| "metricColumn": "none", | ||
| "orderByTime": "ASC", | ||
| "policy": "default", | ||
| "query": "SELECT non_negative_derivative(mean(\"total_query_time\"), 1h) / non_negative_derivative(mean(\"total_query_count\"), 1h) FROM \"pgbouncer_stats\" WHERE \"dbname\" =~ /^$dbname$/ AND $timeFilter GROUP BY time($__interval) fill(none)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a promQL to me. Should it be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a remaining query from InfluxDB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, what an artifact! :)
|
ok, I see it. So the mess is due to terminology. In old days under "dbname" we mean the source from where we fetch metrics. But you want to have exact database on you graph. So my suggestion would be to have 2 drop-downs:
Does it sound right to you? Thanks a lot for your PR! |
|
Ok, I see, I'll provide that asap |
the monitoredsource variable corresponds to the pgbouncer
entries in the configuration.
|
Hi, Do you agree with these changes? Or do you need anything else? best regards, |
We are trying to think of a way to optimize the query so we don't do a full table scan on |
Indeed, thanks, I just fix the monitoredsource one, but no clue for the database one. |
Thanks!, for the dbname variable, we thought of adding Currently, I am trying to make the |
03ba19a to
20845fe
Compare
|
Thanks @0xgouda.
|
Well, I cannot confirm that: Index is used for panels but not for variable refresh. As you can see we need to check all partitions. |
- all lines appear within the same panel. - add `all` field to the `DB Name` multi-value.
- to avoid confustion the queries already have `dbname` column
|
Ok for selecting multiples values, but you need to change the SQL query with the database field in the window definition. For the stat panels, perhaps use the sum of the values for the selected databases, instead of the repetitive panel, which I do not find very aesthetically pleasing. I can fix it if you agree. |
prevent scanning all partitions
|
Indeed, adding time filter in the database selector use index : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update dynamically on time range change.
update dynamically on time range change Co-authored-by: Ahmed Gouda <gouda0x@gmail.com>
|
@slardiere would you please check the stats panels if they work for you? I'm fine with whatever option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @0xgouda! Thanks!
@pashagolub yes, stats panels works for me, it's ok |

Fix the database name lookup in the pgbouncer dashboard