mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-22 00:16:29 +00:00
Change prometheus namespace to woodpecker (#439)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
e6183e3378
commit
12db87f8e6
3 changed files with 40 additions and 38 deletions
|
@ -202,37 +202,37 @@ func before(c *cli.Context) error { return nil }
|
||||||
|
|
||||||
func setupMetrics(g *errgroup.Group, store_ store.Store) {
|
func setupMetrics(g *errgroup.Group, store_ store.Store) {
|
||||||
pendingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
pendingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "pending_jobs",
|
Name: "pending_jobs",
|
||||||
Help: "Total number of pending build processes.",
|
Help: "Total number of pending build processes.",
|
||||||
})
|
})
|
||||||
waitingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
waitingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "waiting_jobs",
|
Name: "waiting_jobs",
|
||||||
Help: "Total number of builds waiting on deps.",
|
Help: "Total number of builds waiting on deps.",
|
||||||
})
|
})
|
||||||
runningJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
runningJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "running_jobs",
|
Name: "running_jobs",
|
||||||
Help: "Total number of running build processes.",
|
Help: "Total number of running build processes.",
|
||||||
})
|
})
|
||||||
workers := promauto.NewGauge(prometheus.GaugeOpts{
|
workers := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "worker_count",
|
Name: "worker_count",
|
||||||
Help: "Total number of workers.",
|
Help: "Total number of workers.",
|
||||||
})
|
})
|
||||||
builds := promauto.NewGauge(prometheus.GaugeOpts{
|
builds := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "build_total_count",
|
Name: "build_total_count",
|
||||||
Help: "Total number of builds.",
|
Help: "Total number of builds.",
|
||||||
})
|
})
|
||||||
users := promauto.NewGauge(prometheus.GaugeOpts{
|
users := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "user_count",
|
Name: "user_count",
|
||||||
Help: "Total number of users.",
|
Help: "Total number of users.",
|
||||||
})
|
})
|
||||||
repos := promauto.NewGauge(prometheus.GaugeOpts{
|
repos := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "woodpecker",
|
||||||
Name: "repo_count",
|
Name: "repo_count",
|
||||||
Help: "Total number of repos.",
|
Help: "Total number of repos.",
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@ global:
|
||||||
scrape_interval: 60s
|
scrape_interval: 60s
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'drone'
|
- job_name: 'woodpecker'
|
||||||
bearer_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
bearer_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||||
|
|
||||||
static_configs:
|
static_configs:
|
||||||
|
@ -23,7 +23,7 @@ global:
|
||||||
scrape_interval: 60s
|
scrape_interval: 60s
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'drone'
|
- job_name: 'woodpecker'
|
||||||
+ bearer_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
+ bearer_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||||
|
|
||||||
static_configs:
|
static_configs:
|
||||||
|
@ -35,33 +35,33 @@ scrape_configs:
|
||||||
List of prometheus metrics specific to Woodpecker:
|
List of prometheus metrics specific to Woodpecker:
|
||||||
|
|
||||||
```
|
```
|
||||||
# HELP drone_build_count Build count.
|
# HELP woodpecker_build_count Build count.
|
||||||
# TYPE drone_build_count counter
|
# TYPE woodpecker_build_count counter
|
||||||
drone_build_count{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
|
woodpecker_build_count{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
|
||||||
drone_build_count{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
|
woodpecker_build_count{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
|
||||||
# HELP drone_build_time Build time.
|
# HELP woodpecker_build_time Build time.
|
||||||
# TYPE drone_build_time gauge
|
# TYPE woodpecker_build_time gauge
|
||||||
drone_build_time{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 116
|
woodpecker_build_time{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 116
|
||||||
drone_build_time{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 155
|
woodpecker_build_time{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 155
|
||||||
# HELP drone_build_total_count Total number of builds.
|
# HELP woodpecker_build_total_count Total number of builds.
|
||||||
# TYPE drone_build_total_count gauge
|
# TYPE woodpecker_build_total_count gauge
|
||||||
drone_build_total_count 1025
|
woodpecker_build_total_count 1025
|
||||||
# HELP drone_pending_jobs Total number of pending build processes.
|
# HELP woodpecker_pending_jobs Total number of pending build processes.
|
||||||
# TYPE drone_pending_jobs gauge
|
# TYPE woodpecker_pending_jobs gauge
|
||||||
drone_pending_jobs 0
|
woodpecker_pending_jobs 0
|
||||||
# HELP drone_repo_count Total number of repos.
|
# HELP woodpecker_repo_count Total number of repos.
|
||||||
# TYPE drone_repo_count gauge
|
# TYPE woodpecker_repo_count gauge
|
||||||
drone_repo_count 9
|
woodpecker_repo_count 9
|
||||||
# HELP drone_running_jobs Total number of running build processes.
|
# HELP woodpecker_running_jobs Total number of running build processes.
|
||||||
# TYPE drone_running_jobs gauge
|
# TYPE woodpecker_running_jobs gauge
|
||||||
drone_running_jobs 0
|
woodpecker_running_jobs 0
|
||||||
# HELP drone_user_count Total number of users.
|
# HELP woodpecker_user_count Total number of users.
|
||||||
# TYPE drone_user_count gauge
|
# TYPE woodpecker_user_count gauge
|
||||||
drone_user_count 1
|
woodpecker_user_count 1
|
||||||
# HELP drone_waiting_jobs Total number of builds waiting on deps.
|
# HELP woodpecker_waiting_jobs Total number of builds waiting on deps.
|
||||||
# TYPE drone_waiting_jobs gauge
|
# TYPE woodpecker_waiting_jobs gauge
|
||||||
drone_waiting_jobs 0
|
woodpecker_waiting_jobs 0
|
||||||
# HELP drone_worker_count Total number of workers.
|
# HELP woodpecker_worker_count Total number of workers.
|
||||||
# TYPE drone_worker_count gauge
|
# TYPE woodpecker_worker_count gauge
|
||||||
drone_worker_count 4
|
woodpecker_worker_count 4
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,6 +22,8 @@ Some versions need some changes to the server configuration or the pipeline conf
|
||||||
- From version `0.15.0` ongoing there will be three types of docker images: `latest`, `next` and `x.x.x` with an alpine variant for each type like `latest-alpine`.
|
- From version `0.15.0` ongoing there will be three types of docker images: `latest`, `next` and `x.x.x` with an alpine variant for each type like `latest-alpine`.
|
||||||
If you used `latest` before to try pre-release features you should switch to `next` after this release.
|
If you used `latest` before to try pre-release features you should switch to `next` after this release.
|
||||||
|
|
||||||
|
- Prometheus metrics have been changed from `drone_*` to `woodpecker_*`
|
||||||
|
|
||||||
- ...
|
- ...
|
||||||
|
|
||||||
## 0.14.0
|
## 0.14.0
|
||||||
|
|
Loading…
Reference in a new issue