Drone publishes and exposes metrics that can be consumed by Prometheus at the standard
/metrics endpoint. Access to the metrics endpoint is restricted and requires an authorization token.
Create a 32-byte random token:
$ openssl rand -hex 16 fe8c402a51e6629aa1f43a4234afee81
Create a machine user:
$ drone user add prometheus --machine \ --token=fe8c402a51e6629aa1f43a4234afee81
Configure the prometheus scraper:
global: scrape_interval: 60s scrape_configs: - job_name: 'drone' bearer_token: fe8c402a51e6629aa1f43a4234afee81 static_configs: - targets: ['domain.com']
Drone collects performance metrics exposed by the Go runtime, including memory, compute, garbage collection and more. These default metrics are augmented with the following Drone metrics:
- total number of builds executed by the system.
- total number of user accounts.
- total number of activated repositories.
- total number of pending builds.
- total number of pending jobs. A single build can have one or many jobs, where a job represents a single pipeline in a multi-pipeline yaml.
- total number of running builds.
- total number of running jobs. A single build can have one or many jobs, where a job represents a single pipeline in a multi-pipeline yaml.
Drone collects a limited set of metrics by design. We are not currently accepting proposals to collect additional metrics in Drone core, however, we do provide a starter project that you can use to create your own custom metrics provider to gather additional metrics.