Add collector for performance_schema.processlist - #1032
Conversation
Add performance_schema.processlist for Mysql >= 8.0 Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
Signed-off-by: rouize <73630347+rouize@users.noreply.github.com>
| @@ -0,0 +1,98 @@ | |||
| // Copyright 2021 The Prometheus Authors | |||
There was a problem hiding this comment.
| // Copyright 2021 The Prometheus Authors | |
| // Copyright The Prometheus Authors |
| @@ -0,0 +1,201 @@ | |||
| // Copyright 2018 The Prometheus Authors | |||
There was a problem hiding this comment.
| // Copyright 2018 The Prometheus Authors | |
| // Copyright The Prometheus Authors |
| ) | ||
|
|
||
| // ScrapeUser collects from `information_schema.processlist`. | ||
| // ScrapeUser collects from `information_schema.processlist` or `performance_schema.processlist`. |
There was a problem hiding this comment.
This is actually a typo.
| // ScrapeUser collects from `information_schema.processlist` or `performance_schema.processlist`. | |
| // ScrapeUser collects from `mysql.user`. |
ArthurSens
left a comment
There was a problem hiding this comment.
Hey @rouize , do you still plan to work on this feature? I have some additional comments, but if you don't plan to work on those then we can probably close the PR 🤔
There was a problem hiding this comment.
I'd recommend splitting this dashboard into a new PR. It's a lot to review, alongside the new collector 😓
|
|
||
| // Tunable flags. | ||
| var ( | ||
| processlistMinTime = kingpin.Flag( |
There was a problem hiding this comment.
the current code doesn't compile since this var already exists in other files, same as the ones below
| func (ScrapePerfProcesslist) Version() float64 { | ||
| return 8.0 | ||
| } |
There was a problem hiding this comment.
hmmm, following the docs it was introduced in 8.0.22, but unfortunately our design doesn't allow that 😅
This is not a problem this PR is introducing, so let's ignore the problem for now 😛
Since MySQL 8.0, the information_schema.processlist has been deprecated.
Request to add a scraper for the performance_schema.processlist
Refer to the following document:
https://dev.mysql.com/doc/refman/8.0/en/processlist-access.html
https://dev.mysql.com/doc/refman/8.0/en/information-schema-processlist-table.html
https://dev.mysql.com/doc/refman/8.0/en/performance-schema-processlist-table.html