feat: Define Prometheus port in the pod spec (#5213)

* WIP

* portSpec

* Done

* Docs

* Fix: env
This commit is contained in:
Marcin Tojek
2022-12-01 15:43:32 +00:00
committed by GitHub
parent 9557d456e8
commit 916ed284ce
4 changed files with 22 additions and 2 deletions
+5 -2
View File
@@ -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 -->