Skip to content

feat(openmetrics): expose app information per-app#59720

Merged
CarlSchwan merged 3 commits intomasterfrom
feature/59718/appinfo-metrics
Apr 20, 2026
Merged

feat(openmetrics): expose app information per-app#59720
CarlSchwan merged 3 commits intomasterfrom
feature/59718/appinfo-metrics

Conversation

@nilsding
Copy link
Copy Markdown
Member

@nilsding nilsding commented Apr 20, 2026

Summary

With this change the app info metrics are exposed for each app, its value is the enabled state:

# TYPE nextcloud_app_enabled gauge
# HELP nextcloud_app_enabled Information about the installed Nextcloud applications
nextcloud_app_enabled{app_id="app_api",version="34.0.0-dev.0"} 1
nextcloud_app_enabled{app_id="cloud_federation_api",version="1.18.0"} 1
nextcloud_app_enabled{app_id="comments",version="1.24.0"} 1
[...]
nextcloud_app_enabled{app_id="user_status",version="1.14.0"} 0
nextcloud_app_enabled{app_id="weather_status",version="1.14.0"} 1
[...]

As this change makes the additional nextcloud_installed_applications metric obsolete as it can now be queried through Prometheus directly as followed, this metric has been dropped. (during testing of that I also noticed that the number of disabled apps is reported as -1 when all apps are enabled...)

label_replace(count by (instance)(nextcloud_app_enabled==1), "enabled", "true", "", "") or label_replace(count by (instance)(nextcloud_app_enabled==0), "enabled", "false", "", "")

TODO

  • maybe come up with a different name for the metric?

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@nilsding nilsding requested a review from Altahrim April 20, 2026 09:21
@nilsding nilsding self-assigned this Apr 20, 2026
@nilsding nilsding requested a review from a team as a code owner April 20, 2026 09:21
@nilsding nilsding added the feature: monitoring Features related to observability label Apr 20, 2026
@nilsding nilsding requested review from ArtificialOwl, icewind1991 and salmart-dev and removed request for a team April 20, 2026 09:21
Since exporting the app information that way makes the apps count metric
obsolete I removed it as well.

Resolves #59718

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@nilsding nilsding force-pushed the feature/59718/appinfo-metrics branch from 5423d4a to 3e5daac Compare April 20, 2026 09:28
@Altahrim Altahrim added this to the Nextcloud 34 milestone Apr 20, 2026
@Altahrim Altahrim added 2. developing Work in progress php Pull requests that update Php code labels Apr 20, 2026
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@Altahrim Altahrim added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 20, 2026
@CarlSchwan CarlSchwan enabled auto-merge April 20, 2026 11:31
@Altahrim Altahrim added the pending documentation This pull request needs an associated documentation update label Apr 20, 2026
@CarlSchwan CarlSchwan merged commit 5a728a4 into master Apr 20, 2026
243 of 255 checks passed
@CarlSchwan CarlSchwan deleted the feature/59718/appinfo-metrics branch April 20, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: monitoring Features related to observability pending documentation This pull request needs an associated documentation update php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose installed app info metrics for each app

4 participants