Skip to content

Commit b398814

Browse files
authored
docs: add prometheus scrape_config example (#8113)
* docs: add prometheus scrape_config example * make: fmt * add: label * fix: spelling * scheme: http
1 parent 7d43f4c commit b398814

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/admin/prometheus.md

+16
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@ coderd_api_active_users_duration_hour 0
2525
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`.
2626
The environment variable `CODER_PROMETHEUS_ENABLE` will be enabled automatically.
2727

28+
### Prometheus configuration
29+
30+
To allow Prometheus to scrape the Coder metrics, you will need to create a `scape_config`
31+
in your `prometheus.yml` file, or in the Prometheus Helm chart values. Below is an
32+
example `scrape_config`:
33+
34+
```yaml
35+
scrape_configs:
36+
- job_name: "coder"
37+
scheme: "http"
38+
static_configs:
39+
- targets: ["<ip>:2112"] # replace with the the IP address of the Coder pod or server
40+
labels:
41+
apps: "coder"
42+
```
43+
2844
## Available metrics
2945
3046
<!-- Code generated by 'make docs/admin/prometheus.md'. DO NOT EDIT -->

0 commit comments

Comments
 (0)