Available as of v2.2.0

While configuring monitoring at either the cluster level or project level, there are multiple options that can be configured.

Option Description
Data Retention How long your Prometheus instance retains monitoring data scraped from Rancher objects before it’s purged.
Enable Node Exporter Whether or not to deploy the node exporter.
Node Exporter Host Port The host port on which data is exposed, i.e. data that Prometheus collects from your node hardware. Required if you have enabled the node exporter.
Enable Persistent Storage for Prometheus Whether or not to configure storage for Prometheus so that metrics can be retained even if the Prometheus pod fails.
Enable Persistent Storage for Grafana Whether or not to configure storage for Grafana so that the Grafana dashboards and configuration can be retained even if the Grafana pod fails.
Prometheus CPU Limit CPU resource limit for the Prometheus pod.
Prometheus CPU Reservation CPU reservation for the Prometheus pod.
Prometheus Memory Limit Memory resource limit for the Prometheus pod.
Prometheus Memory Reservation Memory resource requests for the Prometheus pod.
Selector Ability to select the nodes in which Prometheus and Grafana pods are deployed to. To use this option, the nodes must have labels.
Advanced Options Since monitoring is an application from the Rancher catalog, it can be configured like other catalog application. Warning: Any modification to the application without understanding the entire application can lead to catastrophic errors.

Node Exporter

The node exporter is a popular open source exporter, which exposes the metrics for hardware and *NIX kernels OS. It is designed to monitor the host system. However, there are still issues with namespaces when running it in a container, mostly around filesystem mount spaces. In order to monitor actual network metrics for the container network, the node exporter must be deployed with the hostNetwork mode.

When configuring Prometheus and enabling the node exporter, enter a host port in the Node Exporter Host Port that will not produce port conflicts with existing applications. The host port chosen must be open to allow internal traffic between Prometheus and the Node Exporter.

Warning: In order for Prometheus to collect the metrics of the node exporter, after enabling cluster monitoring, you must open the Node Exporter Host Port in the host firewall rules to allow intranet access. By default, 9796 is used as that host port.

Persistent Storage

Prerequisite: Configure one or more storage class to use as persistent storage for your Prometheus or Grafana pod.

By default, when you enable Prometheus for either a cluster or project, all monitoring data that Prometheus collects is stored on its own pod. With local storage, if the Prometheus or Grafana pods fail, all the data is lost. Rancher recommends configuring an external persistent storage to the cluster. With the external persistent storage, if the Prometheus or Grafana pods fail, the new pods can recover using data from the persistent storage.

When enabling persistent storage for Prometheus or Grafana, specify the size of the persistent volume and select the storage class.