{ "__inputs": [ { "name": "DS_MIMIR", "label": "Mimir", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" }, { "name": "DS_LOKI", "label": "Loki", "description": "", "type": "datasource", "pluginId": "loki", "pluginName": "Loki" } ], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "9.5.2" }, { "type": "datasource", "id": "loki", "name": "Loki", "version": "1.0.0" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 8, "title": "RED", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "ns" }, "overrides": [] }, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 1 }, "id": 9, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "looseleaf_http_request_time{job=~\"$instance\"}", "legendFormat": "Latency", "range": true, "refId": "A" } ], "title": "LATENCY", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "reqps" }, "overrides": [] }, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 1 }, "id": 11, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_http_request_total{job=~\"$instance\"}[$__rate_interval])", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "TRAFFIC", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "cps" }, "overrides": [] }, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 1 }, "id": 10, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_http_error_500_total{job=~\"$instance\"}[$__rate_interval])", "legendFormat": "5xx", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_http_error_400_total{job=~\"$instance\"}[$__rate_interval])", "hide": false, "legendFormat": "4xx", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_db_errors_total{job=~\"$instance\"}[$__rate_interval])", "hide": false, "legendFormat": "db", "range": true, "refId": "C" } ], "title": "ERRORS", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 9 }, "id": 7, "panels": [], "title": "DATABASE", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "continuous-GrYlRd" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 20, "gradientMode": "scheme", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "ns" }, "overrides": [] }, "gridPos": { "h": 10, "w": 6, "x": 0, "y": 10 }, "id": 2, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "looseleaf_db_time{job=~\"$instance\"}", "legendFormat": "Access Time", "range": true, "refId": "A" } ], "title": "Database Access Time", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "ops" }, "overrides": [] }, "gridPos": { "h": 10, "w": 6, "x": 6, "y": 10 }, "id": 1, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_db_reads_total{job=~\"$instance\"}[$__rate_interval])", "legendFormat": "Reads", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_db_writes_total{job=~\"$instance\"}[$__rate_interval])", "hide": false, "legendFormat": "Writes", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_db_deletes_total{job=~\"$instance\"}[$__rate_interval])", "hide": false, "legendFormat": "Deletes", "range": true, "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "rate(looseleaf_db_errors_total{job=~\"$instance\"}[$__rate_interval])", "hide": false, "legendFormat": "Errors", "range": true, "refId": "D" } ], "title": "Operations", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 10, "w": 6, "x": 12, "y": 10 }, "id": 5, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "looseleaf_db_keys{job=~\"$instance\"}", "legendFormat": "Keys", "range": true, "refId": "A" } ], "title": "Database Keys", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 10, "w": 6, "x": 18, "y": 10 }, "id": 6, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "editorMode": "code", "expr": "looseleaf_db_size{job=~\"$instance\"}", "legendFormat": "Size", "range": true, "refId": "A" } ], "title": "Database Size", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 20 }, "id": 12, "panels": [], "title": "LOGS", "type": "row" }, { "datasource": { "type": "loki", "uid": "${DS_LOKI}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Time" }, "properties": [ { "id": "custom.width", "value": 219 } ] }, { "matcher": { "id": "byName", "options": "Level" }, "properties": [ { "id": "custom.width", "value": 70 } ] }, { "matcher": { "id": "byName", "options": "User" }, "properties": [ { "id": "custom.width", "value": 64 } ] }, { "matcher": { "id": "byName", "options": "Key" }, "properties": [ { "id": "custom.width", "value": 302 } ] }, { "matcher": { "id": "byName", "options": "Op" }, "properties": [ { "id": "custom.width", "value": 141 } ] } ] }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 21 }, "id": 3, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Time" } ] }, "pluginVersion": "9.5.2", "targets": [ { "datasource": { "type": "loki", "uid": "${DS_LOKI}" }, "editorMode": "builder", "expr": "{level=\"INFO\"} | json", "maxLines": 20, "queryType": "range", "refId": "A" } ], "title": "Events", "transformations": [ { "id": "extractFields", "options": { "source": "labels" } }, { "id": "organize", "options": { "excludeByName": { "Line": true, "Time": false, "attributes_looseleaf_key": false, "attributes_looseleaf_operation": false, "attributes_looseleaf_user": false, "body": false, "exporter": true, "id": true, "instrumentation_scope_name": true, "job": true, "labels": true, "level": true, "resources_service_name": true, "resources_service_version": true, "resources_telemetry_sdk_language": true, "resources_telemetry_sdk_name": true, "resources_telemetry_sdk_version": true, "spanid": true, "traceid": true, "tsNs": true }, "indexByName": { "Line": 3, "Time": 0, "attributes_looseleaf_key": 7, "attributes_looseleaf_operation": 8, "attributes_looseleaf_user": 6, "body": 9, "exporter": 10, "id": 5, "instrumentation_scope_name": 11, "job": 12, "labels": 2, "level": 1, "resources_service_name": 13, "resources_service_version": 14, "resources_telemetry_sdk_language": 15, "resources_telemetry_sdk_name": 16, "resources_telemetry_sdk_version": 17, "spanid": 18, "traceid": 19, "tsNs": 4 }, "renameByName": { "attributes_looseleaf_key": "Key", "attributes_looseleaf_operation": "Op", "attributes_looseleaf_user": "User", "body": "Message", "level": "Level" } } } ], "type": "table" }, { "datasource": { "type": "loki", "uid": "${DS_LOKI}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Time" }, "properties": [ { "id": "custom.width", "value": 219 } ] }, { "matcher": { "id": "byName", "options": "Level" }, "properties": [ { "id": "custom.width", "value": 70 } ] }, { "matcher": { "id": "byName", "options": "User" }, "properties": [ { "id": "custom.width", "value": 64 } ] }, { "matcher": { "id": "byName", "options": "Key" }, "properties": [ { "id": "custom.width", "value": 302 } ] }, { "matcher": { "id": "byName", "options": "Op" }, "properties": [ { "id": "custom.width", "value": 141 } ] }, { "matcher": { "id": "byName", "options": "Message" }, "properties": [ { "id": "custom.width", "value": 303 } ] } ] }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 28 }, "id": 4, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Time" } ] }, "pluginVersion": "9.5.2", "targets": [ { "datasource": { "type": "loki", "uid": "${DS_LOKI}" }, "editorMode": "builder", "expr": "{level=\"ERROR\"} | json", "maxLines": 20, "queryType": "range", "refId": "A" } ], "title": "Errors", "transformations": [ { "id": "extractFields", "options": { "source": "labels" } }, { "id": "organize", "options": { "excludeByName": { "Line": true, "Time": false, "attributes_looseleaf_key": false, "attributes_looseleaf_operation": false, "attributes_looseleaf_user": false, "body": false, "exporter": true, "id": true, "instrumentation_scope_name": true, "job": true, "labels": true, "level": true, "resources_service_name": true, "resources_service_version": true, "resources_telemetry_sdk_language": true, "resources_telemetry_sdk_name": true, "resources_telemetry_sdk_version": true, "spanid": true, "traceid": false, "tsNs": true }, "indexByName": { "Line": 3, "Time": 0, "attributes_looseleaf_operation": 6, "attributes_looseleaf_remoteAddress": 17, "body": 7, "exporter": 8, "id": 5, "instrumentation_scope_name": 9, "job": 10, "labels": 2, "level": 1, "resources_service_name": 11, "resources_service_version": 12, "resources_telemetry_sdk_language": 13, "resources_telemetry_sdk_name": 14, "resources_telemetry_sdk_version": 15, "spanid": 16, "traceid": 18, "tsNs": 4 }, "renameByName": { "attributes_looseleaf_key": "Key", "attributes_looseleaf_operation": "Op", "attributes_looseleaf_remoteAddress": " ", "attributes_looseleaf_user": "User", "body": "Message", "level": "Level", "traceid": "Trace" } } } ], "type": "table" } ], "refresh": "5s", "schemaVersion": 38, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "Mimir", "value": "Mimir" }, "description": "The metrics source, such as Mimir or Prometheus.", "hide": 0, "includeAll": false, "label": "", "multi": false, "name": "Metrics", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": { "selected": false, "text": "Loki", "value": "Loki" }, "description": "The log data source.", "hide": 0, "includeAll": false, "multi": false, "name": "Logs", "options": [], "query": "loki", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_MIMIR}" }, "definition": "query_result(looseleaf_up{})", "description": "The instance/job.", "hide": 0, "includeAll": false, "multi": false, "name": "instance", "options": [], "query": { "query": "query_result(looseleaf_up{})", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, "regex": "/.*job=\"([^\"]+).*/", "skipUrlSync": false, "sort": 1, "type": "query" } ] }, "time": { "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "utc", "title": "Looseleaf", "uid": "f0239963-07a8-41d6-ac32-8b239956e62f", "version": 30, "weekStart": "" }