Prometheus is an open source project for system monitoring and alerting.

Both OKD and Kubernetes integrate Prometheus to enable cluster metrics, monitoring, and alerting capabilities.

Prometheus gathers and stores streams of data from the cluster as time series data. Time series data consists of a sequence of samples, with each sample containing:

  • A time stamp
  • A numeric value (such as an integer, float, or Boolean)
  • A set of labels in the form of key/value pairs

The key/value pairs are used to isolate groups of related values for filtering.

For example, the machine_cpu_cores metric in Prometheus contains a sequence of measurement samples of the number of CPU cores for each machine.

OKD integrates Prometheus metrics at Monitoring → Metrics. A separate Prometheus user interface is accessible using the URL of the prometheus-k8s route in the openshift-monitoring namespace.

From the Metrics page, enter an expression, such as a metric name, and then click Run Queries to retrieve the most recent sample for the metric.

The following example displays the instance:node_cpu_utilisation:rate1m metric over time.