Grafana dashboard: Logging Dashboard
Description: Dashboard for Service Logs


{
  "__inputs": [
    {
      "name": "DS_LOKI",
      "label": "Loki",
      "description": "",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.0"
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Dashboard for Service Logs",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 18221,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1655397917396,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_LOKI}"
      },
      "description": "Live logs is a like 'tail -f' in a real time",
      "gridPos": {
        "h": 19,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "dedupStrategy": "exact",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${DS_LOKI}"
          },
          "expr": "{service_type=~\"$service_type\"}",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Live logs",
      "type": "logs"
    }
  ],
  "refresh": "",
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "logging"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": true,
          "text": "All",
          "value": "$__all"
        },
        "hide": 0,
        "includeAll": true,
        "label": "Service Type",
        "multi": false,
        "name": "service_type",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "$__all"
          },
          {
            "selected": false,
            "text": "ControlPlane",
            "value": "ControlPlane"
          },
          {
            "selected": false,
            "text": "WebhookServer",
            "value": "WebhookServer"
          },
          {
            "selected": false,
            "text": "Exporter",
            "value": "Exporter"
          },
          {
            "selected": false,
            "text": "ResourceCleaner",
            "value": "ResourceCleaner"
          },
          {
            "selected": false,
            "text": "WebBackend",
            "value": "WebBackend"
          },
          {
            "selected": false,
            "text": "Analyzer",
            "value": "Analyzer"
          },
          {
            "selected": false,
            "text": "DexInit",
            "value": "DexInit"
          }
        ],
        "query": "ControlPlane,WebhookServer,Exporter,ResourceCleaner,WebBackend,Analyzer,DexInit",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "current": {
          "selected": false,
          "text": "Loki",
          "value": "Loki"
        },
        "description": "loki datasource",
        "hide": 2,
        "includeAll": false,
        "label": "loki datasource",
        "multi": false,
        "name": "DS_LOKI",
        "options": [],
        "query": "loki",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Logging Dashboard",
  "uid": "logging",
  "version": 1,
  "weekStart": ""
}