{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Vector → OTel Collector → Loki.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 4,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "fillOpacity": 60,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 0,
            "scaleDistribution": {
              "type": "linear"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "options": {
        "barAlignment": 0,
        "barRadius": 0,
        "barWidth": 0.97,
        "fillOpacity": 60,
        "fullHighlight": false,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": true
        },
        "orientation": "auto",
        "showValue": "auto",
        "stacking": {
          "group": "A",
          "mode": "normal"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "expr": "sum by (detected_level) (count_over_time({service_name=~\"${service:pipe}\"}[$__interval]))",
          "legendFormat": "{{detected_level}}",
          "refId": "A"
        }
      ],
      "title": "Log Volume by Level",
      "type": "barchart"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "gridPos": {
        "h": 18,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "id": 2,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": true
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "expr": "{service_name=~\"${service:pipe}\", host_hostname=~\"${host:pipe}\"} |~ \"${search}\"",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Log Records",
      "type": "logs"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 38,
  "tags": [
    "monitoring",
    "logs",
    "loki",
    "vector"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": true,
          "text": "Loki",
          "value": "P8E80F9AEF21F6940"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "loki",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "loki",
          "uid": "${datasource}"
        },
        "definition": "label_values(service_name)",
        "hide": 0,
        "includeAll": true,
        "label": "Service",
        "multi": true,
        "name": "service",
        "options": [],
        "query": {
          "label": "service_name",
          "stream": "{}",
          "type": "labels"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "loki",
          "uid": "${datasource}"
        },
        "definition": "label_values(host_hostname)",
        "hide": 0,
        "includeAll": true,
        "label": "Host",
        "multi": true,
        "name": "host",
        "options": [],
        "query": {
          "label": "host_hostname",
          "stream": "{}",
          "type": "labels"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "text": "",
          "value": ""
        },
        "hide": 0,
        "label": "Search",
        "name": "search",
        "options": [],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "KTalk Loki Logs",
  "uid": "loki-logs",
  "version": 3,
  "weekStart": ""
}
