mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Define Prometheus port in the pod spec (#5213)
* WIP * portSpec * Done * Docs * Fix: env
This commit is contained in:
@@ -10,8 +10,6 @@ Coder server exports metrics via the HTTP endpoint, which can be enabled using e
|
||||
|
||||
The Prometheus endpoint address is `http://localhost:2112/` by default. You can use either the environment variable `CODER_PROMETHEUS_ADDRESS` or the flag ` --prometheus-address <network-interface>:<port>` to select a different listen address.
|
||||
|
||||
__Notice__: Prometheus endpoint is not supported by the official Coder Helm chart yet.
|
||||
|
||||
If `coder server --prometheus-enable` is started locally, you can preview the metrics endpoint in your browser or by using curl: <!-- markdown-link-check-disable -->http://localhost:2112/<!-- markdown-link-check-enable -->.
|
||||
|
||||
```shell
|
||||
@@ -22,6 +20,11 @@ coderd_api_active_users_duration_hour 0
|
||||
...
|
||||
```
|
||||
|
||||
### Kubernetes deployment
|
||||
|
||||
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.
|
||||
|
||||
## Available metrics
|
||||
|
||||
<!-- Code generated by 'make docs/admin/prometheus.md'. DO NOT EDIT -->
|
||||
|
||||
Reference in New Issue
Block a user