diff --git a/_topic_map.yml b/_topic_map.yml index 0580a911bfe6..0e9a09975cca 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -780,6 +780,8 @@ Topics: File: configuring-the-monitoring-stack - Name: Managing cluster alerts File: managing-cluster-alerts + - Name: Examining cluster metrics + File: examining-cluster-metrics - Name: Accessing Prometheus, Alertmanager, and Grafana File: prometheus-alertmanager-and-grafana - Name: Exposing custom application metrics for autoscaling diff --git a/images/metrics-screen.png b/images/metrics-screen.png new file mode 100644 index 000000000000..4058f7f196dd Binary files /dev/null and b/images/metrics-screen.png differ diff --git a/modules/monitoring-contents-of-the-metrics-ui.adoc b/modules/monitoring-contents-of-the-metrics-ui.adoc new file mode 100644 index 000000000000..16adea91f3f9 --- /dev/null +++ b/modules/monitoring-contents-of-the-metrics-ui.adoc @@ -0,0 +1,35 @@ +// Module included in the following assemblies: +// +// * monitoring/cluster-monitoring/examining-cluster-metrics.adoc + +[id="contents-of-the-metrics-ui_{context}"] += Contents of the Metrics UI + +This section shows and explains the contents of the Metrics UI, a Web interface to Prometheus. + +The *Metrics* page is located in *Monitoring* -> *Metrics* of the {product-title} web console. + +image::../images/metrics-screen.png[] + +. Actions. +* Add query. +* Expand all query tables. +* Delete all queries. +. Hide the plot. +. The interactive plot. +. The catalog of available metrics. +. Add query. +. Run queries. +. Query forms. +. Expand or collapse the form. +. The query. +. Clear query. +. Disable query. +. Actions for a specific query. +* Disable query. +* Hide all series of the query from the plot. +* Delete query. +. The metrics table for a query. +. Color assigned to the graph of the metric. Clicking the square shows or hides the metric's graph. + +Additionally, there is a link to the old Prometheus interface next to the title of the page. diff --git a/modules/monitoring-exploring-the-visualized-metrics.adoc b/modules/monitoring-exploring-the-visualized-metrics.adoc new file mode 100644 index 000000000000..4bc6966ecbe7 --- /dev/null +++ b/modules/monitoring-exploring-the-visualized-metrics.adoc @@ -0,0 +1,26 @@ +// Module included in the following assemblies: +// +// * monitoring/cluster-monitoring/examining-cluster-metrics.adoc + +[id="exploring-the-visualized-metrics_{context}"] += Exploring the visualized metrics + +After running the queries, the metrics are displayed on the interactive plot. The X axis of the plot represents time. The Y axis represents the metrics values. Each metric is shown as a colored graph. You can manipulate the plot and explore the metrics. + +.Procedure + +. Initially, all metrics from all enabled queries are shown on the plot. You can select which metrics are shown. +* To hide all metrics from a query, click the action button of the query and click "Hide all series". +* To hide a specific metric, go to the query table and click the colored square near the metric name. +. To zoom into the plot and change the shown time range, do one of the following: ++ +-- +* Visually select the time range by clicking and dragging on the plot horizontally. +* Use the menu in the left upper corner to select the time range. +-- ++ +To reset the time range, click "Reset Zoom". +. To see outputs of all queries at a specific point in time, hold the mouse cursor on the plot at that point. Query outputs will appear in a popup box. +. For more detailed information about metrics of a specific query, expand the table of that query. Every metric is shown with its current value. +. To hide the plot, use the "Hide Graph" button. + diff --git a/modules/monitoring-running-metrics-queries.adoc b/modules/monitoring-running-metrics-queries.adoc new file mode 100644 index 000000000000..381a17435cb1 --- /dev/null +++ b/modules/monitoring-running-metrics-queries.adoc @@ -0,0 +1,30 @@ +// Module included in the following assemblies: +// +// * monitoring/cluster-monitoring/examining-cluster-metrics.adoc + +[id="running-metrics-queries_{context}"] += Running metrics queries + +You begin working with metrics by entering one or several Prometheus Query Language (PromQL) queries. + +.Procedure + +. Open the OpenShift Container Platform web console and navigate to *Monitoring* -> *Metrics*. + +. In the query field, enter your PromQL query. +* To show all available metrics and PromQL functions, use the "Insert Metric at Cursor" button. +. For multiple queries, use the "Add Query" button. +. For deleting queries, click the action button for the query and select "Delete query". +. For keeping but not running a query, click the "Disable query" button. +. Once you finish creating queries, click the "Run Queries" button. The metrics from the queries are visualized on the plot. If a query is invalid, the UI shows an error message. ++ +[NOTE] +==== +Queries that operate on large amounts of data might timeout or overload the browser when drawing timeseries graphs. To avoid this, you might prefer to hide the graph and calibrate your query using only the metrics table. Then, after finding a feasible query, enable the plot to draw the graphs. +==== ++ +. Optional: The page URL now contains the queries you ran. To use this set of queries again in the future, save this URL. + +.Additional resources + +See the link:https://prometheus.io/docs/prometheus/latest/querying/basics/[Prometheus Query Language documentation.] diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc new file mode 100644 index 000000000000..c40ee23f5cb3 --- /dev/null +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -0,0 +1,17 @@ +[id="examining-cluster-metrics"] += Examining cluster metrics +include::modules/common-attributes.adoc[] +:context: querying-metrics + +toc::[] + +{product-title} 4 provides a Web interface to Prometheus, which enables you to run Prometheus Query Language (PromQL) queries and examine the metrics visualized on a plot. This provides an extensive overview of the cluster state and enables you to troubleshoot problems. + +include::modules/monitoring-contents-of-the-metrics-ui.adoc[leveloffset=+1] +include::modules/monitoring-running-metrics-queries.adoc[leveloffset=+1] +include::modules/monitoring-exploring-the-visualized-metrics.adoc[leveloffset=+1] + +.Next steps + +xref:../../monitoring/cluster-monitoring/prometheus-alertmanager-and-grafana.adoc#prometheus-alertmanager-and-grafana[Access the Prometheus, Alertmanager, and Grafana.] + diff --git a/monitoring/cluster-monitoring/managing-cluster-alerts.adoc b/monitoring/cluster-monitoring/managing-cluster-alerts.adoc index 84f0431e5f3f..4ec7572c890b 100644 --- a/monitoring/cluster-monitoring/managing-cluster-alerts.adoc +++ b/monitoring/cluster-monitoring/managing-cluster-alerts.adoc @@ -16,5 +16,5 @@ include::modules/monitoring-expiring-silences.adoc[leveloffset=+1] .Next steps -xref:../../monitoring/cluster-monitoring/prometheus-alertmanager-and-grafana.adoc#prometheus-alertmanager-and-grafana[Access the Prometheus, Alertmanager, and Grafana.] +xref:../../monitoring/cluster-monitoring/examining-cluster-metrics.adoc#examining-cluster-metrics[Examine cluster metrics.]