Toggle navigation
主页
English
K8S
Golang
Guitar
About Me
归档
标签
Welcome to Sanger's Blog!
Droneci Monitoring
无
2023-02-22 15:10:16
9
0
0
sanger
[TOC] # Metrics 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. ## Configuration ### Create a 32-byte random token: ``` openssl rand -hex 16 ``` ### Create a machine user: ``` drone user add prometheus --admin --machine --token=95d709248c9aeb71600529ae841583a5 ``` ### Configure the prometheus scraper: ``` global: scrape_interval: 60s scrape_configs: - job_name: 'drone' bearer_token: fe8c402a51e6629aa1f43a4234afee81 static_configs: - targets: ['domain.com'] ``` ## Drone Metrics 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: - **drone_build_count** total number of builds executed by the system. - **drone_user_count** total number of user accounts. - **drone_repo_count** total number of activated repositories. - **drone_pending_builds** total number of pending builds. - **drone_pending_jobs** 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. - **drone_running_builds** total number of running builds. - **drone_running_jobs** 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. ### **Custom Metrics** 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. # Reference https://docs.drone.io/server/metrics/
上一篇:
droneci数据库各表含义及应用
下一篇:
Droneci Server and agent install
0
赞
9 人读过
新浪微博
微信
更多分享
腾讯微博
QQ空间
人人网
文档导航