|
This is unreleased documentation for SUSE® Rancher Manager v2.15 (Unreleased). |
Monitoring and Dashboards
Rancher Monitoring Dashboards
|
Starting in Rancher v2.15.0, new monitoring installations use the decoupled Rancher maintains the legacy |
The rancher-monitoring-dashboards chart provides Grafana dashboards and Rancher UI integration for external Prometheus monitoring stacks, such as kube-prometheus-stack.
-
No bundled runtime: Operates without depending on Rancher-shipped
kube-prometheus-stackimages or components. It operates independently and does not require installing the legacyrancher-monitoringchart. It installs a dashboard-only version ofrancher-monitoring. -
Prerequisites: Requires uninstalling the
rancher-monitoringchart and using a Prometheus infrastructure. Although several configurations are supported, installingkube-prometheus-stackis the simplest method.
Migrating from rancher-monitoring to rancher-monitoring-dashboards
Follow these steps to migrate to rancher-monitoring-dashboards:
-
Uninstall the
rancher-monitoringchart. See Uninstall Monitoring. -
Install your own
kube-prometheus-stack. See Installkube-prometheus-stackchart. -
Install
rancher-monitoring-dashboards. See Installrancher-monitoring-dashboardschart.
If you need to preserve or migrate existing data, refer to the official Grafana and Prometheus documentation:
Rancher Monitoring Dashboards Installation
This section guides you through setting up your Prometheus stack and installing the rancher-monitoring-dashboards chart.
Install kube-prometheus-stack chart
Before installing the rancher-monitoring-dashboards chart, you must first set up the underlying monitoring infrastructure using the kube-prometheus-stack chart:
-
Add the prometheus-community Helm repository to access the
kube-prometheus-stackchart. You can do this through the Rancher UI or using the Helm CLI with the following command.-
UI
-
Helm
-
Select ☰ > Cluster Management.
-
Locate your cluster and click Explore.
-
In the left navigation menu, select Apps > Repositories.
-
Click Add Repository.
-
Enter a Name (such as
prometheus-community). -
In the Index URL field, enter
https://prometheus-community.github.io/helm-charts. -
Click Add Repository.
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo updateResult: The
prometheus-communityHelm repository is added and available for chart installations. -
-
Create the
kube-prometheus-stackvalues.yamlfile. Configure the file with the following required settings to ensurekube-prometheus-stackintegrates properly and supports embedded dashboards inrancher-monitoring-dashboards.grafana: # NOTE: Do NOT set root_url or serve_from_sub_path here grafana.ini: security: allow_embedding: true auth: disable_login_form: false auth.anonymous: enabled: true org_role: Viewer dashboards: default_home_dashboard_path: /tmp/dashboards/rancher-default-home.json users: auto_assign_org_role: Viewer # Prometheus configuration to pick up all ServiceMonitors prometheus: prometheusSpec: serviceMonitorSelectorNilUsesHelmValues: false podMonitorSelectorNilUsesHelmValues: false # No metric exporter by default kubeEtcd: enabled: false kubeControllerManager: enabled: false kubeScheduler: enabled: false kubeProxy: enabled: falseBy default, the rancher-monitoring-dashboards chart does not enable metric scraping for
kubeEtcd,kubeControllerManager,kubeScheduler, orkubeProxy. To export metrics from these components, you must configure PushProx. -
Install the
kube-prometheus-stackchart in thecattle-monitoring-systemnamespace through the Rancher UI or via the Helm CLI, applying thevalues.yamlfile from the previous step:-
UI
-
Helm
-
Select ☰ > Cluster Management.
-
Locate your cluster and click Explore.
-
In the left navigation menu, select Apps > Charts.
-
Locate and select the kube-prometheus-stack chart.
-
Click Install this version.
-
In the Namespace dropdown, select cattle-monitoring-system. If the namespace does not exist:
-
Select Create a New Namespace and enter
cattle-monitoring-system. -
Enter a unique Name.
-
Select Customize Helm options before install.
-
-
Click Next.
-
Select Edit YAML and paste or upload your
values.yamlfile. -
Click Next.
-
Select and specify additional deployment options.
-
Click Install.
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ --namespace cattle-monitoring-system \ --create-namespace \ --debug \ --wait \ -f values.yamlResult: The Prometheus monitoring infrastructure is deployed in the
cattle-monitoring-systemnamespace. -
Install rancher-monitoring-dashboards chart
To deploy the rancher-monitoring-dashboards chart using the Rancher UI:
-
Select ☰ > Cluster Management.
-
Locate your cluster and click Explore.
-
In the left navigation menu, select Apps > Charts.
-
Locate and select the rancher-monitoring-dashboards chart.
-
Click Install.
-
In the Namespace dropdown, select cattle-monitoring-system.
-
Click Next.
-
Optional: Customize any chart installation values as needed.
-
Click Install.
Result: Rancher deploys the rancher-monitoring-dashboards chart and integrates the dashboards into the Rancher UI.
Customization and Overrides
Use the configuration settings in this section to customize the rancher-monitoring-dashboards chart for your environment.
-
Override default proxy images. See Monitoring Proxy Image Customization.
-
Align upstream service names with your Prometheus stack and disable unused K3s components. See Service Name Overrides.
Monitoring Proxy Image Customization
A single NGINX pod (monitoringProxy) acts as a proxy for Grafana, Prometheus, and Alertmanager, ensuring the Kubernetes API server’s service proxy (used by the Rancher UI) can reach them reliably. You can customize the NGINX image using the following configuration:
monitoringProxy:
image:
repository: <new/image>
tag: <version>
Service Name Overrides
The default values.yaml assumes standard service naming conventions (for example, kube-prometheus-stack-<application>), as shown below:
grafanaProxy:
upstreamService: kube-prometheus-stack-grafana
prometheusProxy:
upstreamService: kube-prometheus-stack-prometheus
alertmanagerProxy:
upstreamService: kube-prometheus-stack-alertmanager
This creates mirror services alongside the new chart, which the reverse proxy uses to enable Rancher UI functionality. If you modified the service names during installation, update the upstreamService configuration accordingly:
grafanaProxy:
upstreamService: <upstream_service_name>
prometheusProxy:
upstreamService: <upstream_service_name>
alertmanagerProxy:
upstreamService: <upstream_service_name>
|
Make sure to disable
|
FAQ
Q: What is the new chart being introduced?
A: The rancher-monitoring-dashboards chart includes only dashboard artifacts and Rancher UI integration metadata. It does not include Prometheus, Grafana, Alertmanager, exporters, or PushProx. To deploy a full monitoring runtime, install kube-prometheus-stack separately from the Prometheus Community Helm repository.
Q: Will the legacy rancher-monitoring chart still be available?
A: Yes. Rancher v2.15 retains the Rancher v2.14 version of the rancher-monitoring chart, but you cannot install it directly as a new installation. Rancher v2.15 also includes an updated monitoring version available exclusively for upgrades.
Q: What happens to existing installations when upgrading to Rancher v2.15?
A: You can upgrade existing installations to the updated monitoring release in Rancher v2.15. To migrate fully to the new dashboards-only chart, follow the standard upstream migration path for Prometheus and Grafana.
Q: How does the Rancher UI locate Grafana and Prometheus?
A: In this release, monitoring service URLs (such as rancher-monitoring-<service>) remain hardcoded in the Rancher UI. Support for configurable, user-provided URLs is planned for a future release.
Q: How does the Rancher UI monitoring installation workflow change?
A: The Rancher UI installation workflow uses kube-prometheus-stack for runtime configuration options. The rancher-monitoring-dashboards chart exposes values only for dashboards and Rancher UI integration.
Rancher Monitoring
|
The |
The rancher-monitoring application can quickly deploy leading open-source monitoring and alerting solutions onto your cluster.
Introduced in Rancher v2.5, the application is powered by Prometheus, Grafana, Alertmanager, the Prometheus Operator, and the Prometheus adapter.
For information on V1 monitoring and alerting, available in Rancher v2.2 up to v2.4, please see the Rancher v2.0—v2.4 docs on xref:[cluster monitoring], xref:[alerting], xref:[notifiers] and other xref:[tools].
Using the rancher-monitoring application, you can quickly deploy leading open-source monitoring and alerting solutions onto your cluster.
Features
Prometheus lets you view metrics from your 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, or restore crashed servers.
The monitoring application:
-
Monitors the state and processes of your cluster nodes, Kubernetes components, and software deployments.
-
Defines alerts based on metrics collected via Prometheus.
-
Creates custom Grafana dashboards.
-
Configures alert-based notifications via email, Slack, PagerDuty, etc. using Prometheus Alertmanager.
-
Defines precomputed, frequently needed or computationally expensive expressions as new time series based on metrics collected via Prometheus.
-
Exposes collected metrics from Prometheus to the Kubernetes Custom Metrics API via Prometheus Adapter for use in HPA.
See How Monitoring Works for an explanation of how the monitoring components work together.
Default Components and Deployments
Built-in Dashboards
By default, the monitoring application deploys Grafana dashboards (curated by the kube-prometheus project) onto a cluster.
It also deploys an Alertmanager UI and a Prometheus UI. For more information about these tools, see Built-in Dashboards.
Default Metrics Exporters
By default, Rancher Monitoring deploys exporters (such as node-exporter and kube-state-metrics).
These default exporters automatically scrape metrics for CPU and memory from all components of your Kubernetes cluster, including your workloads.
Default Alerts
The monitoring application deploys some alerts by default. To see the default alerts, go to the Alertmanager UI and click Expand all groups.
Components Exposed in the Rancher UI
For a list of monitoring components exposed in the Rancher UI, along with common use cases for editing them, see this section.
Role-based Access Control
For more information on configuring access to monitoring, see this page.
|
Rancher and Project read permissions don’t necessarily apply to monitoring resources. See monitoring-ui-view for more details. |
Configuration
Configuring Monitoring Resources in Rancher
The configuration reference assumes familiarity with how monitoring components work together. For more information, see How Monitoring Works.
Configuring Helm Chart Options
For more information on rancher-monitoring chart options, including options to set resource limits and requests, see Helm Chart Options.
Windows Cluster Support
To be able to fully deploy Monitoring V2 for Windows, all of your Windows hosts must have a minimum wins version of v0.1.0.
For more details on how to upgrade wins on existing Windows hosts, see Windows cluster support for Monitoring V2..
Known Issues
There is a known issue that K3s clusters require more than the allotted default memory. If you enable monitoring on a K3s cluster, set prometheus.prometheusSpec.resources.memory.limit to 2500 Mi and prometheus.prometheusSpec.resources.memory.request to 1750 Mi.
See Debugging High Memory Usage for advice and recommendations.