Generate Prometheus rules for your SLOs

prometheus-slo

Generates Prometheus rules for alerting on SLOs. Based on https://developers.soundcloud.com/blog/alerting-on-slos.

Usage

Build and Run

$ go build -o prometheus-slo *.go
$ ./prometheus-slo # Takes prometheus-slo.yaml as the default config file
2021/06/19 18:18:01 Generating cortex.yaml
2021/06/19 18:18:01 Generating example.yaml
$ ./prometheus-slo --config=<config_file_path> # For config at other paths

Config file format

slo_files:
  <file-path>:
    - service: <string> # Service name
      slo_name: <string> # SLO name
      alertname: <string> # Name of the SLO alert
      alert_summary: <string> # Summary of this alert
      # PromQL query giving the count of requests *within SLO*.
      # Put $__range for the range in the range selector.
      success_query: <string>
      # PromQL query giving the total count of requests.
      # Put $__range for the range in the range selector.
      total_query: <string> 
      threshold: <string> # Quantile values in terms of %, example: 99.9, 99.95

Look at prometheus-slo.yaml for an example of the config.

Owner
Ganesh Vernekar
@prometheus maintainer | Software Engineer @grafana | IIT Hyderabad CSE Alumnus
Ganesh Vernekar
Similar Resources

A set of tests to check compliance with the Prometheus Remote Write specification

Prometheus Remote Write Compliance Test This repo contains a set of tests to check compliance with the Prometheus Remote Write specification. The test

Dec 4, 2022

Automating Kubernetes Rollouts with Argo and Prometheus. Checkout the demo URL below

Automating Kubernetes Rollouts with Argo and Prometheus. Checkout the demo URL below

observe-argo-rollout Demo for Automating and Monitoring Kubernetes Rollouts with Argo and Prometheus Performing Demo The demo can be found on Katacoda

Nov 16, 2022

📡 Prometheus exporter that exposes metrics from SpaceX Starlink Dish

📡  Prometheus exporter that exposes metrics from SpaceX Starlink Dish

Starlink Prometheus Exporter A Starlink exporter for Prometheus. Not affiliated with or acting on behalf of Starlink(™) 📡 Starlink Monitoring System

Dec 19, 2022

A tool to dump and restore Prometheus data blocks.

A tool to dump and restore Prometheus data blocks.

promdump promdump dumps the head and persistent blocks of Prometheus. It supports filtering the persistent blocks by time range. Why This Tool When de

Dec 16, 2022

🦥 Easy and simple Prometheus SLO generator

🦥 Easy and simple Prometheus SLO generator

Sloth Introduction Use the easiest way to generate SLOs for Prometheus. Sloth generates understandable, uniform and reliable Prometheus SLOs for any k

Jan 4, 2023

Prometheus rule linter

pint pint is a Prometheus rule linter. Usage There are two modes it works in: CI PR linting Ad-hoc linting of a selected files or directories Pull Req

Jan 2, 2023

Prometheus exporter for Chia node metrics

chia_exporter Prometheus metric collector for Chia nodes, using the local RPC API Building and Running With the Go compiler tools installed: go build

Sep 19, 2022

Plays videos using Prometheus, e.g. Bad Apple.

Plays videos using Prometheus, e.g. Bad Apple.

prom_bad_apple Plays videos using Prometheus, e.g. Bad Apple. Inspiration A while back I thought this blog post and the corresponding source code were

Nov 30, 2022

k6 prometheus output extension

xk6-prometheus A k6 extension implements Prometheus HTTP exporter as k6 output extension. Using xk6-prometheus output extension you can collect metric

Nov 22, 2022
Represent your rego rules programmatically.
Represent your rego rules programmatically.

Policy Enforcer Policy enforcer is a open source tool that allows you to easily create complex authorization policy. Supports RBAC, ABAC and resource

Jul 5, 2022
Export Prometheus metrics from journald events using Prometheus Go client library

journald parser and Prometheus exporter Export Prometheus metrics from journald events using Prometheus Go client library. For demonstration purposes,

Jan 3, 2022
Library/tool to change a yaml given a rules file

golang-yaml-rules/yaml-transform Library/tool to change a yaml given a rules file Using jsonpath ( https://github.com/vmware-labs/yaml-jsonpath ), thi

Feb 11, 2022
A prometheus exporter which reports metrics about your Gmail inbox.

prometheus-gmail-exporter-go A prometheus exporter for gmail. Heavily inspired by https://github.com/jamesread/prometheus-gmail-exporter, but written

Nov 15, 2022
Exporter your cypress.io dashboard into prometheus Metrics

Cypress.io dashboard Prometheus exporter Prometheus exporter for a project from Cypress.io dashboards, giving the ability to alert, make special opera

Feb 8, 2022
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.

StatusOK Monitor your Website and APIs from your computer.Get notified through Slack or E-mail when your server is down or response time is more than

Dec 27, 2022
A handy utility to generate configmap and values.yaml of your application for helmifying them

Helmfig Are you tired of writing values.yaml for configmap of your project when you are helmifying them? Helmfig is a handy tool that can generate the

Dec 14, 2022
Translate Prometheus Alerts into Kubernetes pod readiness

prometheus-alert-readiness Translates firing Prometheus alerts into a Kubernetes readiness path. Why? By running this container in a singleton deploym

Oct 31, 2022
A beginner friendly introduction to prometheus 🔥
A beginner friendly introduction to prometheus 🔥

Prometheus-Basics A beginner friendly introduction to prometheus. Table of Contents What is prometheus ? What are metrics and why is it important ? Ba

Dec 29, 2022
Doraemon is a Prometheus based monitor system
Doraemon is a Prometheus based monitor system

English | 中文 Doraemon Doraemon is a Prometheus based monitor system ,which are made up of three components——the Rule Engine,the Alert Gateway and the

Nov 28, 2022