GithubHelp home page GithubHelp logo

globocom / slo-generator Goto Github PK

View Code? Open in Web Editor NEW
129.0 13.0 18.0 2.19 MB

Easy setup a service level objective using prometheus

License: MIT License

Go 98.69% Makefile 1.31%
sre slo prometheus workbook grafana alert kubernetes

slo-generator's Introduction

slo-generator

Easily setup a service level objective using prometheus, based on lessons from the SRE workbook.

slo-generator -slo.path=slo_example.yml -rule.output rule.yml

Generating

Look the file slo_example.yml to see how to parametrize SLOs and generate Prometheus rules by running the following command:

Alert methods currently supported

  • 1. Target Error Rate โ‰ฅ SLO Threshold, using alertMethod: simple
  • 2. Increased Alert Window, using alertMethod: simple
  • 3. Incrementing Alert Duration, using alertMethod: simple
  • 4. Alert on Burn Rate alertMethod: simple and burnRate: <rate>
  • 5. Multiple Burn Rate Alerts, using alertMethod: multi-window and shortWindow: false
  • 6. Multiwindow, Multi-Burn-Rate Alerts, using alertMethod: multi-window

alertMethod: simple

Look the file slo_simple_example.yml to see a full example of usage. the simple alert method require two params:

  1. alertWindow: how far back in time will used to alerting. supported values: 5m, 30m, 1h, 2h, 6h, 1d and 3d.
  2. alertWait: for long time will begin fire an alert.

alertMethod: multi-window

The philosofy of this alert is described on the section of book: (https://landing.google.com/sre/workbook/chapters/alerting-on-slos#6-multiwindow-multi-burn-rate-alerts)

SLOs at scale

The Workbook suggests to create classes to simplify how to set a SLO for your services, read details about concepts here

Look at slo_example_with_classes.yml and slo_classes.yml to see how to define classes and associate with your services.

After that, you can run the command specifying the classes:

slo-generator -slo.path=slo_example_with_classes.yml -classes.path slo_classes.yml -rule.output rule.yml

Kubernetes integration

We support to export SLOs as a well known PrometheusRule resources managed by prometheus-operator, just use -kubernetes flag, example:

slo-generator -kubernetes -slo.path=slo_example.yml > slo_manifest.yml
cat slo_manifest.yml
kubectl apply -f slo_manifest.yml

Grafana integration

All generated SLOs are visible by grafana:

Overview Long Term

Import dashboard using following JSON files

slo-generator's People

Contributors

luanagp avatar marcelometal avatar pedrokiefer avatar rodrigo-brito avatar viniciusbds avatar wpjunior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slo-generator's Issues

Support custom SLO types

In google book there are more types of SLO and also custom types if needed.
Lets add support for Batch and Storage SLO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.