Active workspace metrics via prometheus
We are unfortunately not using k8s for our current coder deployment, and I already looked at the observability repo here: https://github.com/coder/observability/tree/main?tab=readme-ov-file and found that many of the dashboards there are strongly tied to k8s metrics on top of the prometheus metrics from coder.
I would like to display on a dashboard the current active workspaces, however, this does not seem possible with the current prometheus metrics, maybe I'm wrong..
Has anyone figured out a way to reliably display the current "running" workspace count, purely with the coder prometheus metrics?
GitHub
GitHub - coder/observability
Contribute to coder/observability development by creating an account on GitHub.
6 Replies
<#1288834316448825344>
Category
Other
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Filtering this metric to labels where
status
is succeeded
and workspace_transition
is start
should get you what you're looking for?
looks consistent with what /deployment/stats
returns
This metric was undocumented, just pr'd to fix that, so thank you!Fantastic, I'll give it a quick test drive
Seems to work nicely, I also managed to get a nice view of workspaces over time period per user with the following
Awesome!
great!
@Phorcys closed the thread.