Monitoring Che Server
You can configure Che to expose JVM metrics such as JVM memory and class loading for Che Server.
Enabling and exposing Che Server metrics
Che exposes the JVM metrics on port 8087 of the che-host Service.
You can configure this behavior.
When enabled and the Prometheus Operator is available on the cluster, Che Operator automatically creates and manages the ServiceMonitor, Role, and RoleBinding resources required to collect the metrics.
-
Configure the
CheClusterCustom Resource. See Using the CLI to configure the CheCluster Custom Resource.spec: components: metrics: enable: <boolean> (1)1 trueto enable,falseto disable. The default istrue.
Collecting Che Server metrics with Prometheus
When the Prometheus Operator is available on the cluster and Che Server metrics are enabled, Che Operator automatically creates and manages the Prometheus resources required to collect Che Server JVM metrics. This includes the ServiceMonitor, Role, and RoleBinding resources, and the openshift.io/cluster-monitoring label on the Che namespace.
-
Your organization’s instance of Che is installed and running in Red Hat OpenShift.
-
An active
kubectlsession with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl. -
Che Server metrics are enabled. See Enabling and exposing Che Server metrics.
-
In the Administrator view of the OpenShift web console, go to Observe → Metrics.
-
Run a PromQL query to confirm that the metrics are available. For example, enter
process_uptime_seconds{job="che-host"}and click Run queries.
|
To troubleshoot missing metrics, view the Prometheus container logs for possible RBAC-related errors:
|
Viewing Che Server from an OpenShift web console dashboard
After configuring the in-cluster Prometheus instance to collect Che Server JVM metrics, you can view the metrics on a custom dashboard in the Administrator perspective of the OpenShift web console.
-
Your organization’s instance of Che is installed and running in Red Hat OpenShift.
-
An active
ocsession with administrative permissions to the destination OpenShift cluster. See Getting started with the CLI. -
The in-cluster Prometheus instance is collecting metrics. See Collecting Che Server metrics with Prometheus.
-
Create a ConfigMap for the dashboard definition in the
openshift-config-managednamespace and apply the necessary label.-
$ oc create configmap grafana-dashboard-devspaces-server \ --from-literal=devspaces-server-dashboard.json="$(curl https://raw.githubusercontent.com/eclipse-che/che-server/main/docs/grafana/openshift-console-dashboard.json)" \ -n openshift-config-managed -
$ oc label configmap grafana-dashboard-devspaces-server console.openshift.io/dashboard=true -n openshift-config-managedThe dashboard definition is based on Grafana 6.x dashboards. Not all Grafana 6.x dashboard features are supported in the OpenShift web console.
-
-
In the Administrator view of the OpenShift web console, go to Observe → Dashboards.
-
Go to Dashboard → Che Server JVM and verify that the dashboard panels contain data.







