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.)
renovate-metrics requires a prometheus-pushgateway.
-
Installed dependency
renovate_dependencylabels: "repository", "manager", "packageFile", "depName", "currentVersion", "warning", "baseBranch" -
Available update of an installed dependency
renovate_dependency_updatelabels: "repository", "manager", "packageFile", "depName", "currentVersion", "updateType", "newVersion", "vulnerabilityFix", "releaseTimestamp", "baseBranch" -
Timestamp of the last successful execution
renovate_last_successful_timestamplabels: "repository"
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):
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:9091This repository comes with a predefined grafana dashboard which gives an overview around all sorts of things. See grafana/dashboard.json