https://github.com/raffis/renovate-metrics
Renovate prometheus metrics exporter
https://github.com/raffis/renovate-metrics
metrics prometheus prometheus-exporter renovate renovate-metrics
Last synced: 6 months ago
JSON representation
Renovate prometheus metrics exporter
- Host: GitHub
- URL: https://github.com/raffis/renovate-metrics
- Owner: raffis
- License: apache-2.0
- Created: 2023-03-28T12:55:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T10:00:49.000Z (6 months ago)
- Last Synced: 2025-04-11T11:55:11.762Z (6 months ago)
- Topics: metrics, prometheus, prometheus-exporter, renovate, renovate-metrics
- Language: Go
- Homepage:
- Size: 496 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
## Renovate prometheus metrics

[](https://github.com/raffis/renovate-metrics/actions/workflows/release.yaml)
[](https://goreportcard.com/report/github.com/raffis/renovate-metrics)Ever wanted to get metrics from renovate?
This is now possible with this tool. It extracts the necessary data from the structured renovate logs and transforms the
information into prometheus metrics.
This is possible if renovate runs in self-hosted environments.
(If you are able to get the structured logs from other deployments it will also work.)## Requirements
`renovate-metrics` requires a [prometheus-pushgateway](https://github.com/prometheus/pushgateway).
### Metrics
* Installed dependency \
`renovate_dependency` labels: "repository", "manager", "packageFile", "depName", "currentVersion"
* Available update of an installed dependency \
`renovate_dependency_update` labels: "repository", "manager", "packageFile", "depName", "currentVersion", "updateType", "newVersion", "vulnerabilityFix", "releaseTimestamp"
* Timestamp of the last successful execution \
`renovate_last_successful_timestamp` labels: "repository"### Usage
If renovate is executed via the official image (which it usually is in self-hosted environments) the structured output can be piped to `renovate-metrics` which transforms the output into
prometheus compatible metrics and pushes them to a prometheus push gateway.Important renovate needs to be started with `LOG_LEVEL=debug` as well as `LOG_FORMAT=json` otherwise `renovate-metrics` is unable to get all information required.
Example execution (It also goes through a tee pipe to get the renovate output to stderr as well):
```sh
docker run -e RENOVATE_TOKEN=$GITHUB_TOKEN -e LOG_FORMAT=json -e LOG_LEVEL=debug renovate/renovate:slim org/my-repository | tee /dev/stderr | docker run -i ghcr.io/raffis/renovate-metrics:latest push --prometheus=http:/prometheus-push-gateway:9091
```### Grafana dashboard
This repository comes with a predefined grafana dashboard which gives an overview around all sorts of things.
See grafana/dashboard.json