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.
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.
- Kubernetes control plane
- etcd database
- All nodes (including workers)
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.
Permissions to Configure Project Monitoring
Only administrators, cluster owners or members, or project owners can configure project level monitoring. Project members can only view monitoring metrics.
Enabling Project Monitoring
Prerequisite: Cluster monitoring must be enabled.
Go to the project where monitoring should be enabled. Note: When cluster monitoring is enabled, monitoring is also enabled by default in the System project.
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.
The default username and password for the Grafana instance will be
admin/admin. However, Grafana dashboards are served via the Rancher authentication proxy, so only users who are currently authenticated into the Rancher server have access to the Grafana dashboard.
Workload metrics are available for the project if monitoring is enabled at the cluster level and at the project level.
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.
Example: A Redis application is deployed in the namespace
redis-appin the project
Datacenter. It is monitored via Redis exporter. After enabling project monitoring, you can edit the application to configure the Advanced Options -> Custom Metrics section. Enter the
Pathand select the
To access a project-level Grafana instance,
From the Global view, navigate to a cluster that has monitoring enabled.
Go to a project that has monitoring enabled.
From the project view, click Apps. In versions before v2.2.0, choose Catalog Apps on the main navigation bar.
Go to the
project-monitoringapplication, there are two
/index.htmllinks: one that leads to a Grafana instance and one that leads to a Prometheus instance. When you click the Grafana link, it will redirect you to a new webpage for Grafana, which shows metrics for the cluster.
You will be signed in to the Grafana instance automatically. The default username is
adminand the default password is
admin. For security, we recommend that you log out of Grafana, log back in with the
adminpassword, and change your password.
Results: You will be logged into Grafana from the Grafana instance. After logging in, you can view the preset Grafana dashboards, which are imported via the Grafana provisioning mechanism, so you cannot modify them directly. For now, if you want to configure your own dashboards, clone the original and modify the new copy.