Gitea
Prometheus Metrics
Gitea is a lightweight, self-hosted Git service that exposes native Prometheus metrics.
Prometheus Metrics
Section titled “Prometheus Metrics”Service Configuration
Section titled “Service Configuration”Edit the Gitea configuration file (usually /etc/gitea/app.ini) and add or update the [metrics] section:
[metrics]ENABLED = true; Optional: protect the endpoint with a token; TOKEN = my-secret-tokenRestart Gitea for the changes to take effect. The metrics endpoint will be available at http://localhost:3000/metrics.
Glouton Configuration
Section titled “Glouton Configuration”sudo tee /etc/glouton/conf.d/99-gitea.conf > /dev/null << 'EOF'metric: prometheus: targets: - url: "http://localhost:3000/metrics" name: "gitea" allow_metrics: - "gitea_*" - "process_resident_memory_bytes" - "go_goroutines"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-gitea.conf:
metric: prometheus: targets: - url: "http://localhost:3000/metrics" name: "gitea" allow_metrics: - "gitea_*" - "process_resident_memory_bytes" - "go_goroutines"If you set a TOKEN in app.ini, add an Authorization header to the target:
metric: prometheus: targets: - url: "http://localhost:3000/metrics" name: "gitea" headers: Authorization: "Bearer my-secret-token" allow_metrics: - "gitea_*" - "process_resident_memory_bytes" - "go_goroutines"| Metric | Description |
|---|---|
gitea_accesses | Total number of HTTP accesses |
gitea_issues | Number of issues |
gitea_organizations | Number of organizations |
gitea_repositories | Number of repositories |
gitea_users | Number of users |
process_resident_memory_bytes | Resident memory size of the Gitea process |
go_goroutines | Number of active goroutines |