feat(openmetrics): introduce OpenMetrics exporter#57165
Conversation
19d9463 to
2e73e76
Compare
9e91442 to
30dd586
Compare
f043ff3 to
56d654b
Compare
56d654b to
1c8ebec
Compare
1c8ebec to
ceb578d
Compare
d8a68fd to
4aaee6f
Compare
|
Some of these (counting files) are going to have a non-trivial cost, might be worth having a way to toggle individual metrics. |
You are right :) That's why I added a way to disable a metric with |
Ok, missed that when skimming over the changes 🙈 |
f494623 to
292a77a
Compare
Expose a `/metrics` endpoint with some basic metrics Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
292a77a to
71fa593
Compare
| namespace OCA\Comments\OpenMetrics; | ||
|
|
||
| use Generator; | ||
| use OC\DB\Connection; |
There was a problem hiding this comment.
This should be OCP\IDBConnection
|
|
||
| public function __construct( | ||
| private IAppManager $appManager, | ||
| private PsrLoggerAdapter $logger, |
There was a problem hiding this comment.
You are right for both, thank you. I'll do a follow-up PR :)
|
Hi, |
|
@rizlas You are right, there isn't any for now but the exporter can be extended. |
|
@Altahrim Thanks! I was basically thinking about the number of groups and users per group. |
|
@rizlas Number of groups and number of users per group can be added in Nextcloud, but I am afraid we don't have any straightforward way to get the metrics. All metrics related to quota must be added in |
Summary
Introduce OpenMetrics endpoint featuring Nextcloud metrics.
It allows to get statistics about the Nextcloud instance but not about hardware (some exporters are already doing that very well). For example: number of files, shares or active users.
It's extensible so every app will be able to expose it's own metrics.
Test
Access it on
/metrics(orindex.php/metricsdepending of configuration)TODO
Checklist
3. to review, feature component)stable32)