Grafana dashboard: High level Sloth SLOs
Description: A high level view of all Sloth SLOs


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.0.2"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "state-timeline",
      "name": "State timeline",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 14643,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1625070977636,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 102,
      "panels": [],
      "title": "Stats",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "purple",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 0,
        "y": 1
      },
      "id": 104,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "count(sloth_slo_info)",
          "interval": "",
          "legendFormat": "SLOs",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "purple",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 4,
        "y": 1
      },
      "id": 105,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "count(max(sloth_slo_info) by (sloth_service))",
          "interval": "",
          "legendFormat": "Services",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              },
              {
                "color": "orange",
                "value": 2
              },
              {
                "color": "red",
                "value": 3
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 8,
        "y": 1
      },
      "id": 106,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(slo:current_burn_rate:ratio)",
          "interval": "",
          "legendFormat": "Avg burn rate",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 14,
        "y": 1
      },
      "id": 107,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "max(ALERTS{sloth_id!=\"\",sloth_severity=\"ticket\"}) OR on() vector(0)",
          "interval": "",
          "legendFormat": "Warning alerts",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 19,
        "y": 1
      },
      "id": 108,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "max(ALERTS{sloth_id!=\"\",sloth_severity=\"page\"}) OR on() vector(0)",
          "interval": "",
          "legendFormat": "Critical alerts",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 36,
      "panels": [],
      "title": "General",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "The burning rate of the all the Service SLOs",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "points",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "graph": false,
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 3,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 14,
        "w": 15,
        "x": 0,
        "y": 8
      },
      "id": 56,
      "options": {
        "graph": {},
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "pluginVersion": "7.5.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "slo:current_burn_rate:ratio > ${min_burning_rate}",
          "interval": "",
          "legendFormat": "{{sloth_id}}",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "title": "All burning rate (Filtered >${min_burning_rate}x)",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "The SLOs that currently are burning more error budget that then available",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Burning rate %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "thresholds"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 1
                    },
                    {
                      "color": "red",
                      "value": 1.1
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Service"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 119
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 14,
        "w": 9,
        "x": 15,
        "y": 8
      },
      "id": 38,
      "options": {
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Burning rate %"
          }
        ]
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "slo:current_burn_rate:ratio > ${min_burning_rate}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "title": "Current exceeded burning rate SLOs ",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "sloth_service",
                "sloth_slo",
                "Value"
              ]
            }
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "Value",
            "renamePattern": "Burning rate %"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "sloth_service",
            "renamePattern": "Service"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "sloth_slo",
            "renamePattern": "SLO"
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "Shows all the SLOs at the same time burning rate state",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "fillOpacity": 74,
            "lineWidth": 0
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              },
              {
                "color": "red",
                "value": 1.1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 19,
        "w": 15,
        "x": 0,
        "y": 22
      },
      "id": 100,
      "options": {
        "alignValue": "left",
        "legend": {
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "mergeValues": true,
        "rowHeight": 0.9,
        "showValue": "never",
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "slo:current_burn_rate:ratio",
          "interval": "",
          "legendFormat": "{{sloth_service}}/{{sloth_slo}}",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "title": "SLOs burn rate state timeline",
      "type": "state-timeline"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": -0.5
              },
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 19,
        "w": 9,
        "x": 15,
        "y": 22
      },
      "id": 110,
      "options": {
        "displayMode": "gradient",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "slo:period_error_budget_remaining:ratio",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "{{sloth_id}}",
          "queryType": "randomWalk",
          "refId": "A"
        }
      ],
      "title": "Budget remaining 30 day window",
      "transformations": [],
      "type": "bargauge"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [
    "service levels",
    "sli",
    "slo",
    "sloth"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "prometheus",
          "value": "prometheus"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "Datasource",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": true,
          "text": "1",
          "value": "1"
        },
        "description": "The minimum burning budget rate (0-1) to show on the general SLOs block",
        "error": null,
        "hide": 0,
        "label": "Min Burning rate",
        "name": "min_burning_rate",
        "options": [
          {
            "selected": true,
            "text": "1",
            "value": "1"
          }
        ],
        "query": "1",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-12h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "High level Sloth SLOs",
  "uid": "high-level-sloth-slos",
  "version": 5,
  "description": "A high level view of all Sloth SLOs"
}