-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MVP] Collecting Che Workspace metrics in single cluster mode with Prometheus #14888
Comments
I'm testing this on minishift and I was able to discover services in whole cluster with this setup: prometheus config
ClusterRole
application Service
So with this, we would need to deploy prometheus to any |
cc: @skabashnyuk @l0rd |
Is this some kind of standard or best practice or you just invent a new one? |
We can discover services by parameters listed here https://prometheus.io/docs/prometheus/latest/configuration/configuration/#service |
I was able to reduce needed permissions. Now we only need
|
I've successfully scraped metrics from che workspaces with no changes except building my own theia image with metrics plugin. Theia expose metrics endpoint at Then I've configured prometheus so it discovers services with following rules:
With these rules, prometheus is able to find every running workspace service and scrape metrics. I'll write full example to test with exact prometheus deployment and devfile later today. |
Here's what's needed to monitor all workspaces in the cluster. I've tested on minishift.
All resources I've prepared are in this gist: https://gist.github.com/sparkoo/89fcb8e8c46720900cd89777f76d5347 Basically we only need to configure prometheus service discovery and ensure that che-theia has metrics plugin. I'm also not 100% sure that service discovery conditions (see my previous comment #14888 (comment)) will be always satisfied. thoughts? questions? cc: @skabashnyuk @l0rd |
cc: @skabashnyuk |
@sparkoo could you please test this setup on OpenShift4 and k8s? |
@skabashnyuk for k8s (minikube), I've prepared this List for Prometheus https://gist.github.com/sparkoo/89fcb8e8c46720900cd89777f76d5347#file-prometheus_list-yaml. There are no logic or configurations changes. Works fine, Prometheus discovered workspace services and is scraping the metrics without any issues. OpenShift4 (crc) works with OpenShift template mentioned in my previous comment #14888 (comment). |
Today we talked about this task with @l0rd @sparkoo and @ibuziuk
Also, we want to practice in the Prometheus federation in a slightly simpler form then required here #14889 . Instead of having multiple clusters we can set up multiple Prometheus in individual namespaces and a separate Prometheus that will act as a master role. This formation can simulate multi-cluster federation capabilities and give us some knowledge and feedback. |
work of the scope of this task is done. closing. |
Is your task related to a problem? Please describe.
As part of #13270 we have a requirement to collect metrics from Che Workspace.
In this issue #14245 and this pr eclipse-theia/theia#6303 that metrics would be added to Che Theia.
Describe the solution you'd like
To have an ability to reuse the result of this work on Openshift 3 we are not going to rely on Prometheus operator && CRD based discovery.
There are two modes that we should consider:
As part of this issue, we need to figure out the permissions that Prometheus requires in different modes to be able to effectively discover new services and collect metrics without using public routes.
This is an investigation task that doesn't include:
Result of this work would be:
Describe alternatives you've considered
Prometheus operator && CRD based discovery
Additional context
#13270
The text was updated successfully, but these errors were encountered: