Interview Prep/Monitoring & Observability/Observability as Code, Security & Vendor Choices

What are monitoring mixins and how do you consume them?

AdvancedProductionObservability as Code, Security & Vendor Choices
Answer

A mixin is a Jsonnet package bundling dashboards, recording rules and alerts for one system, written by people who know it (kubernetes-mixin, node-mixin, Prometheus, Loki, Mimir, etcd mixins). kube-prometheus-stack is largely built from them.

jb init && jb install github.com/kubernetes-monitoring/kubernetes-mixin@master
# render with a small jsonnet file that imports the mixin and overrides _config
jsonnet -J vendor -m out/ render.jsonnet

We override _config (selectors, thresholds, clusterLabel) instead of editing generated YAML, pin versions, and re-render on upgrade. Editing the generated output by hand is how teams end up stuck on a three-year-old mixin.

All Monitoring & Observability questions

More on Observability as Code, Security & Vendor Choices