Difference between revisions of "Grafana Dashboards k8s"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "k8s mimir/prometheus 15758 15760")
 
 
Line 1: Line 1:
k8s mimir/prometheus
+
# Grafana Dashboards for mimir/loki k8s
 +
## k8s mimir/prometheus
 +
 
 
15758
 
15758
 +
 
15760
 
15760
 +
 +
## Loki
 +
 +
```
 +
{
 +
  "__inputs": [
 +
    {
 +
      "name": "DS_LOKI",
 +
      "label": "Loki",
 +
      "description": "",
 +
      "type": "datasource",
 +
      "pluginId": "loki",
 +
      "pluginName": "Loki"
 +
    }
 +
  ],
 +
  "__requires": [
 +
    {
 +
      "type": "grafana",
 +
      "id": "grafana",
 +
      "name": "Grafana",
 +
      "version": "10.0.0"
 +
    },
 +
    {
 +
      "type": "datasource",
 +
      "id": "loki",
 +
      "name": "Loki",
 +
      "version": "1.0.0"
 +
    }
 +
  ],
 +
  "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": [
 +
    {
 +
      "datasource": {
 +
        "type": "loki",
 +
        "uid": "${DS_LOKI}"
 +
      },
 +
      "gridPos": {
 +
        "h": 18,
 +
        "w": 24,
 +
        "x": 0,
 +
        "y": 0
 +
      },
 +
      "id": 2,
 +
      "options": {
 +
        "dedupStrategy": "none",
 +
        "enableLogDetails": true,
 +
        "prettifyJson": true,
 +
        "showCommonLabels": false,
 +
        "showLabels": false,
 +
        "showTime": true,
 +
        "sortOrder": "Descending",
 +
        "wrapLogMessage": true
 +
      },
 +
      "targets": [
 +
        {
 +
          "datasource": {
 +
            "type": "loki",
 +
            "uid": "${DS_LOKI}"
 +
          },
 +
          "expr": "{cluster=~\"$cluster\", namespace=~\"$namespace\", app=~\"$app\"}",
 +
          "refId": "A"
 +
        }
 +
      ],
 +
      "title": "Application Logs",
 +
      "type": "logs"
 +
    }
 +
  ],
 +
  "refresh": "",
 +
  "schemaVersion": 38,
 +
  "style": "dark",
 +
  "tags": [
 +
    "loki",
 +
    "kubernetes",
 +
    "alloy"
 +
  ],
 +
  "templating": {
 +
    "list": [
 +
      {
 +
        "current": {
 +
          "selected": false,
 +
          "text": "All",
 +
          "value": "$__all"
 +
        },
 +
        "datasource": {
 +
          "type": "loki",
 +
          "uid": "${DS_LOKI}"
 +
        },
 +
        "definition": "label_values(cluster)",
 +
        "hide": 0,
 +
        "includeAll": true,
 +
        "label": "Cluster",
 +
        "multi": true,
 +
        "name": "cluster",
 +
        "options": [],
 +
        "query": "label_values(cluster)",
 +
        "refresh": 1,
 +
        "regex": "",
 +
        "skipUrlSync": false,
 +
        "sort": 0,
 +
        "type": "query"
 +
      },
 +
      {
 +
        "current": {
 +
          "selected": false,
 +
          "text": "All",
 +
          "value": "$__all"
 +
        },
 +
        "datasource": {
 +
          "type": "loki",
 +
          "uid": "${DS_LOKI}"
 +
        },
 +
        "definition": "label_values({cluster=~\"$cluster\"}, namespace)",
 +
        "hide": 0,
 +
        "includeAll": true,
 +
        "label": "Namespace",
 +
        "multi": true,
 +
        "name": "namespace",
 +
        "options": [],
 +
        "query": "label_values({cluster=~\"$cluster\"}, namespace)",
 +
        "refresh": 1,
 +
        "regex": "",
 +
        "skipUrlSync": false,
 +
        "sort": 0,
 +
        "type": "query"
 +
      },
 +
      {
 +
        "current": {
 +
          "selected": false,
 +
          "text": "All",
 +
          "value": "$__all"
 +
        },
 +
        "datasource": {
 +
          "type": "loki",
 +
          "uid": "${DS_LOKI}"
 +
        },
 +
        "definition": "label_values({cluster=~\"$cluster\", namespace=~\"$namespace\"}, app)",
 +
        "hide": 0,
 +
        "includeAll": true,
 +
        "label": "Application",
 +
        "multi": true,
 +
        "name": "app",
 +
        "options": [],
 +
        "query": "label_values({cluster=~\"$cluster\", namespace=~\"$namespace\"}, app)",
 +
        "refresh": 1,
 +
        "regex": "",
 +
        "skipUrlSync": false,
 +
        "sort": 0,
 +
        "type": "query"
 +
      }
 +
    ]
 +
  },
 +
  "time": {
 +
    "from": "now-1h",
 +
    "to": "now"
 +
  },
 +
  "timepicker": {},
 +
  "timezone": "browser",
 +
  "title": "K8s Application Logs by Cluster, Namespace, App",
 +
  "version": 1,
 +
  "weekStart": ""
 +
}
 +
```

Latest revision as of 06:19, 28 June 2025

Grafana Dashboards for mimir/loki k8s

k8s mimir/prometheus

15758

15760

Loki

{
  "__inputs": [
    {
      "name": "DS_LOKI",
      "label": "Loki",
      "description": "",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "10.0.0"
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    }
  ],
  "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": [
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_LOKI}"
      },
      "gridPos": {
        "h": 18,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyJson": true,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": true
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${DS_LOKI}"
          },
          "expr": "{cluster=~\"$cluster\", namespace=~\"$namespace\", app=~\"$app\"}",
          "refId": "A"
        }
      ],
      "title": "Application Logs",
      "type": "logs"
    }
  ],
  "refresh": "",
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "loki",
    "kubernetes",
    "alloy"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI}"
        },
        "definition": "label_values(cluster)",
        "hide": 0,
        "includeAll": true,
        "label": "Cluster",
        "multi": true,
        "name": "cluster",
        "options": [],
        "query": "label_values(cluster)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI}"
        },
        "definition": "label_values({cluster=~\"$cluster\"}, namespace)",
        "hide": 0,
        "includeAll": true,
        "label": "Namespace",
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": "label_values({cluster=~\"$cluster\"}, namespace)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI}"
        },
        "definition": "label_values({cluster=~\"$cluster\", namespace=~\"$namespace\"}, app)",
        "hide": 0,
        "includeAll": true,
        "label": "Application",
        "multi": true,
        "name": "app",
        "options": [],
        "query": "label_values({cluster=~\"$cluster\", namespace=~\"$namespace\"}, app)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "K8s Application Logs by Cluster, Namespace, App",
  "version": 1,
  "weekStart": ""
}