mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #14920] Prometheus metrics #14174
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/14920
Author: @ysf3rdm
Created: 10/1/2025
Status: 🔄 Open
Base:
master← Head:prometheus-metrics-10.11📝 Commits (10+)
fb2699bUser Metrics Addedfc9041fcircular dependency issue resolved04229a7Merge branch 'jellyfin:master' into prometheus-metrics-10.1181092b2Update Jellyfin Server version in issue template (#15398)75b757aUpdate appleboy/ssh-action action to v1.2.372c4a6fUpdate dependency z440.atl.core to 7.7.0ceb8305Update dependency FsCheck.Xunit to 3.3.2cd4c609Translated using Weblate (English (Pirate))20054d3Translated using Weblate (Vietnamese)c1f079cUpdate CI dependencies📊 Changes
8 files changed (+500 additions, -2 deletions)
View changed files
📝
CONTRIBUTORS.md(+1 -0)📝
Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj(+1 -0)➕
Jellyfin.Server.Implementations/Metrics/SessionMetrics.cs(+184 -0)➕
Jellyfin.Server.Implementations/Metrics/UserMetrics.cs(+281 -0)📝
Jellyfin.Server.Implementations/Users/UserManager.cs(+23 -2)📝
Jellyfin.Server/CoreAppHost.cs(+1 -0)📝
Jellyfin.Server/Startup.cs(+4 -0)📝
MediaBrowser.Controller/Library/IUserManager.cs(+5 -0)📄 Description
Changes
This only implements user account metrics for now as outlined in #3016. This PR adds a new
UserMetricsclass that tracks user accounts, permissions, authentication providers, activity, and security metrics.Implemented Metrics:
jellyfin_user_accounts_total- Total number of user accountsjellyfin_user_accounts_active- Number of active (non-disabled) accountsjellyfin_user_accounts_admin- Number of administrator accountsjellyfin_users_by_permission- Users with specific permissions (labeled by permission type)jellyfin_users_by_auth_provider- Users by authentication provider (labeled by provider)jellyfin_users_external_auth_total- Total users using external authenticationjellyfin_users_recently_active- Users active within last 30 daysjellyfin_users_failed_logins- Users with failed login attempts (labeled by attempt range)Planned Metrics (from #3016):
Questions for Reviewers
Label Cardinality: Currently using
AuthenticationProviderIdas a dynamic label for the auth provider metric. In typical Jellyfin installations, how many distinct auth providers exist? Should this be categorized into "Default" vs "External" instead to prevent unbounded cardinality growth?Architecture: Should the remaining metrics (sessions, streams, libraries) be in separate classes following the same pattern, or would you prefer a different organization?
Additional Metrics: Are there any other user-related or Jellyfin-specific metrics you'd like to see added? Please suggest in the comments.
Issues
#3016
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.