What are monitoring mixins?
IntermediateConceptKubernetes Monitoring, Scale & Cloud
Answer
A mixin is a reusable package of alerts, recording rules and Grafana dashboards for one system, written in Jsonnet and versioned alongside the software. Examples: kubernetes-mixin, node-mixin, etcd mixin, Loki/Mimir/Tempo mixins.
jb install github.com/kubernetes-monitoring/kubernetes-mixin@master
jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusAlerts)' > alerts.yaml
kube-prometheus-stack already ships rendered versions of these, which is where alerts like KubePodCrashLooping and KubeCPUOvercommit come from. In production we vendor a pinned mixin version, override thresholds and selectors through its _config object, and render it in CI instead of hand-editing generated YAML.
More on Kubernetes Monitoring, Scale & Cloud
What is kube-prometheus-stack and what does it install?BeginnerWhat CRDs does the Prometheus Operator provide?IntermediateHow does the Prometheus Operator decide which ServiceMonitors to load?IntermediateWhich cAdvisor container memory metric should you watch, and why?IntermediateHow do metrics-server and the custom/external metrics APIs relate to HPA?IntermediateWhich kube-state-metrics metrics do you use most?Beginner