mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
docs: add prometheus scrape_config example (#8113)
* docs: add prometheus scrape_config example * make: fmt * add: label * fix: spelling * scheme: http
This commit is contained in:
@@ -25,6 +25,22 @@ coderd_api_active_users_duration_hour 0
|
||||
The Prometheus endpoint can be enabled in the [Helm chart's](https://github.com/coder/coder/tree/main/helm) `values.yml` by setting the environment variable `CODER_PROMETHEUS_ADDRESS` to `0.0.0.0:2112`.
|
||||
The environment variable `CODER_PROMETHEUS_ENABLE` will be enabled automatically.
|
||||
|
||||
### Prometheus configuration
|
||||
|
||||
To allow Prometheus to scrape the Coder metrics, you will need to create a `scape_config`
|
||||
in your `prometheus.yml` file, or in the Prometheus Helm chart values. Below is an
|
||||
example `scrape_config`:
|
||||
|
||||
```yaml
|
||||
scrape_configs:
|
||||
- job_name: "coder"
|
||||
scheme: "http"
|
||||
static_configs:
|
||||
- targets: ["<ip>:2112"] # replace with the the IP address of the Coder pod or server
|
||||
labels:
|
||||
apps: "coder"
|
||||
```
|
||||
|
||||
## Available metrics
|
||||
|
||||
<!-- Code generated by 'make docs/admin/prometheus.md'. DO NOT EDIT -->
|
||||
|
||||
Reference in New Issue
Block a user