Available as of v2.2.4
Using Rancher, you can monitor the state and processes of your cluster nodes, Kubernetes components, and software deployments through integration with Prometheus, a leading open-source monitoring solution. Prometheus provides a time series of your data, which is, according to Prometheus documentation:
A stream of timestamped values belonging to the same metric and the same set of labeled dimensions, along with comprehensive statistics and metrics of the monitored cluster.
In other words, Prometheus lets you view metrics from your different Rancher and Kubernetes objects. Using timestamps, Prometheus lets you query and view these metrics in easy-to-read graphs and visuals, either through the Rancher UI or Grafana, which is an analytics viewing platform deployed along with Prometheus. By viewing data that Prometheus scrapes from your cluster control plane, nodes, and deployments, you can stay on top of everything happening in your cluster. You can then use these analytics to better run your organization: stop system emergencies before they start, develop maintenance strategies, restore crashed servers, etc. Multi-tenancy support in terms of cluster and project-only Prometheus instances are also supported.
Using Prometheus, you can monitor Rancher at both the cluster level and project level. For each cluster and project that is enabled for monitoring, Rancher deploys a Prometheus server.
Cluster monitoring allows you to view the health of your Kubernetes cluster. Prometheus collects metrics from the cluster components below, which you can view in graphs and charts.
Project monitoring allows you to view the state of pods running in a given project. Prometheus collects metrics from the project’s deployed HTTP and TCP/UDP workloads.
Configuring Project Monitoring
From the Global view, navigate to the project that you want to configure project monitoring.
Select Tools > Monitoring in the navigation bar.
Select Enable to show the Prometheus configuration options. Enter in your desired configuration options.
Project Level Monitoring Resource Requirements
|Container||CPU - Request||Mem - Request||CPU - Limit||Mem - Limit||Configurable|
Result: A single application,
project-monitoring, is added as an application to the project. After the application is
active, you can start viewing project metrics through the Rancher dashboard or directly from Grafana.
If only project monitoring is enabled, you can monitor custom metrics from any exporters. You can also expose some custom endpoints on deployments without needing to configure Prometheus for your project.
After enabling project monitoring, you can edit the application to configure the Advanced Options -> Custom Metrics section. Enter the
Container Port and
Path and select the