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:
Eric Paulsen
2023-06-20 21:09:35 +00:00
committed by GitHub
parent 7d43f4ceee
commit b398814ab0
+16
View File
@@ -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 -->