Metrics endpoint for prometheus #1173

Closed
opened 2025-11-02 03:51:24 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @jpds on GitHub (Oct 20, 2017).

  • Gitea version (or commit ref): 1.2.0+1-g670562a
  • Git version: 1.2.0+1-g670562a
  • Operating system: Docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

I would like gitea to expose a /metrics endpoint (can be on a different port from main Gitea) which could be used in conjunction with Prometheus to get information about:

  • Page load latencies
  • Number of git repos in gitea
  • Time taken to pull a mirror repository down
  • Number of users in Gitea
  • Number of users logged into Gitea
  • Number of failed log in attempts
  • Any other metric you folks can think of :)

Once this information is in Prometheus, I can then use Grafana to create a dashboard for Gitea metrics.

Originally created by @jpds on GitHub (Oct 20, 2017). - Gitea version (or commit ref): 1.2.0+1-g670562a - Git version: 1.2.0+1-g670562a - Operating system: Docker image - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant ## Description I would like gitea to expose a `/metrics` endpoint (can be on a different port from main Gitea) which could be used in conjunction with Prometheus to get information about: * Page load latencies * Number of git repos in gitea * Time taken to pull a mirror repository down * Number of users in Gitea * Number of users logged into Gitea * Number of failed log in attempts * Any other metric you folks can think of :) Once this information is in Prometheus, I can then use Grafana to create a dashboard for Gitea metrics.
GiteaMirror added the type/feature label 2025-11-02 03:51:24 -06:00
Author
Owner

@cez81 commented on GitHub (Oct 20, 2017):

Some work has been done previously in https://github.com/go-gitea/gitea/pull/678.

@cez81 commented on GitHub (Oct 20, 2017): Some work has been done previously in https://github.com/go-gitea/gitea/pull/678.
Author
Owner

@techknowlogick commented on GitHub (Jan 24, 2019):

Closed as linked PR has been merged.

@techknowlogick commented on GitHub (Jan 24, 2019): Closed as linked PR has been merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1173