How does the Rancher monitoring stack work and what components does it include?
Quick Answer
The Rancher monitoring stack is based on the Prometheus Operator and includes Prometheus for metrics collection, Grafana for dashboards, Alertmanager for alert routing, and node-exporter and kube-state-metrics for system and cluster metrics. It is deployed as a Rancher chart that integrates directly into the Rancher UI.
Detailed Answer
Think of the Rancher monitoring stack as a hospital's vital signs monitoring system. Prometheus is the collection of sensors attached to each patient (cluster nodes and pods), Grafana is the central nurses' station displaying all patient dashboards, Alertmanager is the pager system that notifies doctors when vitals go critical, and the exporters are the specific probes that measure different things like heart rate (CPU), blood pressure (memory), and temperature (disk I/O).
The Rancher monitoring stack is deployed through the Rancher Apps catalog and is based on the kube-prometheus-stack Helm chart, which bundles the Prometheus Operator, Prometheus instances, Grafana, Alertmanager, node-exporter, and kube-state-metrics into a single deployable package. When you install it from the Rancher catalog, the components are deployed into the cattle-monitoring-system namespace. The Prometheus Operator manages Prometheus and Alertmanager instances as Kubernetes custom resources, making it possible to configure monitoring through YAML rather than editing Prometheus configuration files directly.
Prometheus scrapes metrics from multiple sources: node-exporter provides hardware and OS-level metrics from each node (CPU, memory, disk, network), kube-state-metrics provides cluster-state metrics (pod status, deployment replicas, resource quotas), and application pods that expose Prometheus-format metrics endpoints are automatically discovered through ServiceMonitor custom resources. Grafana comes pre-configured with dashboards for cluster overview, node health, pod resource usage, and Kubernetes component health. Alertmanager receives alerts from Prometheus based on alerting rules and routes them to configured receivers like email, Slack, PagerDuty, or webhook endpoints.
In production, the Rancher monitoring stack is the first thing most teams install after cluster provisioning. A typical setup for monitoring the order-service and inventory-service would include custom ServiceMonitors to scrape application-specific metrics, Grafana dashboards tailored to each team's SLOs (like order processing latency P99 under 200ms), and Alertmanager routes that page the on-call engineer for critical alerts and send informational alerts to a Slack channel. Rancher enhances this by integrating monitoring data into the Rancher UI: you can view metrics charts directly in the workload detail pages without opening a separate Grafana tab.
A common beginner challenge is understanding the resource requirements of the monitoring stack itself. Prometheus stores time-series data in local storage, and for clusters with hundreds of pods, the storage and memory requirements can be significant. The default retention is 15 days, but production clusters often need to reduce this or use remote storage backends like Thanos or Cortex for long-term retention. Another mistake is deploying monitoring without configuring alerting rules, resulting in beautiful dashboards that nobody watches. The value of monitoring comes from proactive alerting, not reactive dashboard browsing.