Add additional Prometheus metrics #8109

Closed
opened 2025-11-02 07:54:10 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @laurivosandi on GitHub (Nov 15, 2021).

Feature Description

It's great that people are aware of Prometheus, but what is the usefulness of metrics added in #678 ?
Realistically these can't be used for alerting.

How about we add some actually useful metrics:

  • Successful/failed SSH login attempts
  • Successful/failed login attempts via web
  • Currently open TCP connections (recently our Gitea gets hammered by DDoS attacks)
  • HTTP response latency histogram
  • Errors encountered while interacting with Git repos
  • Failed/successful webhook calls

These were just few to mention. Some of these can be handled by haproxy that sits in front of Gitea which is the case for us of course...

Screenshots

No response

Originally created by @laurivosandi on GitHub (Nov 15, 2021). ### Feature Description It's great that people are aware of Prometheus, but what is the usefulness of metrics added in #678 ? Realistically these can't be used for alerting. How about we add some actually useful metrics: - Successful/failed SSH login attempts - Successful/failed login attempts via web - Currently open TCP connections (recently our Gitea gets hammered by DDoS attacks) - HTTP response latency histogram - Errors encountered while interacting with Git repos - Failed/successful webhook calls These were just few to mention. Some of these can be handled by haproxy that sits in front of Gitea which is the case for us of course... ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 07:54:10 -06:00
Author
Owner

@laurivosandi commented on GitHub (Aug 25, 2023):

If I am reading right Gitea uses Chi framework so enabling some of those metrics is trivial simply by adding, just make sure no high entropy labels are included: https://pkg.go.dev/github.com/m8as/go-chi-metrics

@laurivosandi commented on GitHub (Aug 25, 2023): If I am reading right Gitea uses Chi framework so enabling some of those metrics is trivial simply by adding, just make sure no high entropy labels are included: https://pkg.go.dev/github.com/m8as/go-chi-metrics
Author
Owner

@lunny commented on GitHub (Nov 1, 2024):

Merged into #14724

@lunny commented on GitHub (Nov 1, 2024): Merged into #14724
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8109