OpenShift Metrics Concepts

From NovaOrdis Knowledge Base
Revision as of 03:05, 17 October 2017 by Ovidiu (talk | contribs) (Created page with "=External= * https://docs.openshift.com/container-platform/latest/install_config/cluster_metrics.html =Overview= OpenShift comes with built in support for metric collection...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Overview

OpenShift comes with built in support for metric collection and display. If enabled during the installation phase, Heapster retrieves a list of all nodes from the master and then contacts each node individually through the /stats endpoint, collecting CPU, memory and network metrics. The data is sent to Hawkular Metrics, which stores them in a Cassandra database. Metrics are then exposes through the OpenShift web console, and the URL for accessing the Hawkular Metrics service is configured in master-config.yml. The API can also be directly accessed. The metrics are also available to the horizontal pod autoscalers.

The metrics components must be deployed as part of the "openshift-infra" project. The name can be changed with 'openshift_metrics_project' during installation.

Metric data can be stored in persistent storage or temporary pod volumes. The data stored in temporary pod volumes will be discarded when the pod exists. In case of persistent volumes, is the administrator’s responsibility to ensure that the storage is large enough. The size of the persistent volume claim is specified during installation with 'openshift_metrics_cassandra_pvc_size'. Metrics data is stored by default for seven days. After seven days, Cassandra purges the oldest metrics data. Metrics data for deleted pods and projects is not automatically purged; it is only removed once the data is more than seven days old. If the Cassandra persisted volume runs out of sufficient space, then data loss will occur. For more details on capacity planning see Capacity Planning for Cluster Metrics and Scaling Cluster Metrics.

The metric pods should run on dedicated infrastructure nodes.

Troubleshooting

Metrics can be troubleshot with [diagnostics MetricsApiProxy].