Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

2 changes: 1 addition & 1 deletion modules/administration-guide/pages/monitoring-che.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ You can configure {prod-short} to expose JVM metrics such as JVM memory and clas

include::partial$proc_enabling-and-exposing-che-metrics.adoc[leveloffset=+1]

include::partial$proc_collecting-che-metrics-with-prometheus.adoc[leveloffset=+1]
include::partial$con_collecting-che-metrics-with-prometheus.adoc[leveloffset=+1]

include::partial$proc_viewing-che-metrics-on-grafana-dashboards.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

You can configure the OpenShift in-cluster monitoring stack to scrape metrics exposed by the {devworkspace} Operator.

include::partial$proc_collecting-dev-workspace-operator-metrics-with-prometheus.adoc[leveloffset=+1]
include::partial$con_collecting-dev-workspace-operator-metrics-with-prometheus.adoc[leveloffset=+1]

include::partial$ref_devworkspace-specific-metrics.adoc[leveloffset=+1]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// monitoring-{prod-id-short}
:page-aliases: .:proc_collecting-che-metrics-with-prometheus.adoc

[id="collecting-{prod-id-short}-metrics-with-prometheus"]
= Verifying {prod-short} Server metrics collection with Prometheus

[role="_abstract"]
The {prod-operator} automatically creates and reconciles the required Prometheus resources (ServiceMonitor, Role, and RoleBinding) and configures {orch-namespace} labeling for monitoring {prod-short} Server JVM metrics.
No manual configuration is required.

.Verification

. 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*.

[TIP]
====

To troubleshoot missing metrics, view the Prometheus container logs for possible RBAC-related errors:

. Get the name of the Prometheus pod:
+
[source,terminal,subs="+quotes"]
----
$ oc get pods -l app.kubernetes.io/name=prometheus -n openshift-monitoring -o=jsonpath='{.items[*].metadata.name}'
----

. Print the last 20 lines of the Prometheus container logs from the Prometheus pod from the previous step:
+
[source,terminal,subs="+quotes"]
----
$ oc logs --tail=20 __<prometheus_pod_name>__ -c prometheus -n openshift-monitoring
----

====

[role="_additional-resources"]
.Additional resources


* link:https://prometheus.io/docs/prometheus/latest/querying/basics/[Querying Prometheus]

* link:https://prometheus.io/docs/concepts/metric_types/[Prometheus metric types]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
:page-aliases: .:proc_collecting-dev-workspace-operator-metrics-with-prometheus.adoc

[id="collecting-dev-workspace-operator-metrics-with-prometheus"]
= Verifying {devworkspace} Operator metrics collection with Prometheus

[role="_abstract"]
The {prod-operator} automatically creates and reconciles the required Prometheus resources (ServiceMonitor, Role, and RoleBinding) and configures {orch-namespace} labeling for monitoring the {devworkspace} Operator.
No manual configuration is required.

.Verification

. For a fresh installation of {prod-short}, generate metrics by creating a {prod-short} workspace from the Dashboard.

. 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 `devworkspace_started_total` and click *Run queries*.
+
For more metrics, see xref:ref_devworkspace-specific-metrics[].

[TIP]
====

To troubleshoot missing metrics, view the Prometheus container logs for possible RBAC-related errors:

. Get the name of the Prometheus pod:
+
[source,terminal,subs="+quotes"]
----
$ oc get pods -l app.kubernetes.io/name=prometheus -n openshift-monitoring -o=jsonpath='{.items[*].metadata.name}'
----

. Print the last 20 lines of the Prometheus container logs from the Prometheus pod from the previous step:
+
[source,terminal,subs="+quotes"]
----
$ oc logs --tail=20 __<prometheus_pod_name>__ -c prometheus -n openshift-monitoring
----

====

.Additional resources
* link:https://prometheus.io/docs/prometheus/latest/querying/basics/[Querying Prometheus]
* link:https://prometheus.io/docs/concepts/metric_types/[Prometheus metric types]

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ After configuring the in-cluster Prometheus instance to collect {devworkspace} O

* An active `oc` session with administrative permissions to the destination OpenShift cluster. See link:https://docs.openshift.com/container-platform/{ocp4-ver}/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the CLI].

* The in-cluster Prometheus instance is collecting metrics. See xref:proc_collecting-dev-workspace-operator-metrics-with-prometheus[].
* The in-cluster Prometheus instance is collecting metrics. See xref:collecting-dev-workspace-operator-metrics-with-prometheus[].

.Procedure

Expand Down
Loading