11

Jsonnet and Monitoring Mixins

Have you ever tried to template YAML? It’s a nightmare! Most templating languages like Jinja (used by Ansible and Salt), or even Go’s templating language, handle whitespace in generally unintuitive ways to most users. It’s devilishly easy to accidentally add extra space into a template’s output. Combined with YAML’s whitespace sensitivity, it’s a recipe for headaches. And yet – like it or not – YAML is the de-facto configuration language of the present time, used for everything from deploying apps to Kubernetes to configuring your Prometheus servers. So, how do we balance the tedious, error-prone management of large YAML files by hand with the arguably more error-prone desire to template our way out of the repetitiveness? ...

Get Mastering Prometheus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.