Skip to main content

Home Office Monitoring-as-Code (MaC) Overview

The Home Office Monitoring-as-Code (MaC) is a monitoring and alerting framework. It's a Jsonnet Mixin implementation of Service Level Indicators (SLIs), Service Level Objectives (SLOs) and Error Budgets. It uses Prometheus and Grafana, which are open-source monitoring and alerting systems.

Monitoring-as-code allows platform teams to:

  • create consistent Grafana dashboards and Prometheus rules across the entire service portfolio
  • monitor defined SLOs targets
  • measure service reliability

The Monitoring-as-Code implementation follows SRE best practices.

How MaC works

MaC takes a Mixin.jsonnet file as an input. Mixin is a monitoring definition file, a set of SLIs and SLOs rules and alerts, packaged together in a reuseable and extensible bundle. The monitoring mixin files bundle up your SLI configuration, alerting and Grafana dashboards into a single package. At the moment, you will need to compose runbooks separately afterwards.

MaC contains configuration libraries you can use out of the box. In the future you can also configure them yourself.

MaC creates a dashboard json and associated recording and alert rules for Prometheus and Grafana. When you commit the mixin file MaC packages the Prometheus rules and Grafana dashboards and injects them into the monitoring tools.

Monitoring-as-Code how it works