Adopt Grafana with Argo CD
This commit is contained in:
1 parent
870ea89b88
commit
77e60e6ac6
10 files changed
+2506
No files matched your search
@@ -0,0 +1,227 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ceph-rbd-pvc-capacity-dashboard
|
||||
namespace: default
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
ceph-rbd-pvc-capacity.json: |-
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"description": "Capacity, growth, and inode usage for mounted Ceph RBD Kubernetes PVCs.",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {"mode": "thresholds"},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "orange", "value": 75},
|
||||
{"color": "red", "value": 85}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 0},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"minVizHeight": 10,
|
||||
"minVizWidth": 0,
|
||||
"namePlacement": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false},
|
||||
"showUnfilled": true,
|
||||
"sizing": "auto",
|
||||
"valueMode": "color"
|
||||
},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "(100 * (1 - kubelet_volume_stats_available_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} / kubelet_volume_stats_capacity_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"})) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"instant": true,
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Current RBD PVC usage",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {"mode": "palette-classic"},
|
||||
"custom": {"drawStyle": "line", "fillOpacity": 8, "lineWidth": 2, "showPoints": "never"},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 75}, {"color": "red", "value": 85}]},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 9, "w": 16, "x": 0, "y": 10},
|
||||
"id": 2,
|
||||
"options": {"legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "(100 * (1 - kubelet_volume_stats_available_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} / kubelet_volume_stats_capacity_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"})) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "RBD PVC usage history",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 1073741824}, {"color": "green", "value": 5368709120}]}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 9, "w": 8, "x": 16, "y": 10},
|
||||
"id": 3,
|
||||
"options": {"colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "kubelet_volume_stats_available_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"instant": true,
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Free space now",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"drawStyle": "line", "fillOpacity": 8, "lineWidth": 2, "showPoints": "never"}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 9, "w": 12, "x": 0, "y": 19},
|
||||
"id": 4,
|
||||
"options": {"legend": {"calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "kubelet_volume_stats_used_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Used bytes",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"drawStyle": "line", "fillOpacity": 8, "lineWidth": 2, "showPoints": "never"}, "unit": "Bps"}, "overrides": []},
|
||||
"gridPos": {"h": 9, "w": 12, "x": 12, "y": 19},
|
||||
"id": 5,
|
||||
"options": {"legend": {"calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "clamp_min(deriv(kubelet_volume_stats_used_bytes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}[6h]), 0) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Six-hour growth rate",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"drawStyle": "line", "fillOpacity": 8, "lineWidth": 2, "showPoints": "never"}, "max": 100, "min": 0, "unit": "percent"}, "overrides": []},
|
||||
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 28},
|
||||
"id": 6,
|
||||
"options": {"legend": {"calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "(100 * kubelet_volume_stats_inodes_used{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} / kubelet_volume_stats_inodes{job=\"kubelet\",metrics_path=\"/metrics\",namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}",
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Inode usage",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"schemaVersion": 42,
|
||||
"tags": ["ceph", "rbd", "kubernetes", "storage"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {"selected": true, "text": "Prometheus", "value": "aevstx976yku8a"},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Prometheus",
|
||||
"multi": false,
|
||||
"name": "DS_PROMETHEUS",
|
||||
"options": [],
|
||||
"query": "prometheus",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
},
|
||||
{
|
||||
"allValue": ".*",
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"definition": "label_values(kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}, namespace)",
|
||||
"includeAll": true,
|
||||
"label": "Namespace",
|
||||
"multi": true,
|
||||
"name": "namespace",
|
||||
"options": [],
|
||||
"query": {"query": "label_values(kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\"}, namespace)", "refId": "PrometheusVariableQueryEditor-VariableQuery"},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"allValue": ".*",
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"definition": "label_values(kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\",namespace=~\"$namespace\"}, persistentvolumeclaim)",
|
||||
"includeAll": true,
|
||||
"label": "PVC",
|
||||
"multi": true,
|
||||
"name": "pvc",
|
||||
"options": [],
|
||||
"query": {"query": "label_values(kube_persistentvolumeclaim_info{storageclass=~\"rook-ceph-block.*\",namespace=~\"$namespace\"}, persistentvolumeclaim)", "refId": "PrometheusVariableQueryEditor-VariableQuery"},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {"from": "now-7d", "to": "now"},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Ceph RBD PVC Capacity",
|
||||
"uid": "ceph-rbd-pvc-capacity",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: dahoam-disk-health-dashboard
|
||||
namespace: default
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
dahoam-disk-health.json: |-
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"description": "Sortable current SMART and bcachefs device inventory for dahoam (arschrock).",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {"type": "influxdb", "uid": "${DS_INFLUXDB}"},
|
||||
"description": "Latest SMART values from Telegraf, joined to the existing bcachefs_devices measurement by physical drive. Click any heading to sort.",
|
||||
"fieldConfig": {
|
||||
"defaults": {},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Health"},
|
||||
"properties": [
|
||||
{
|
||||
"id": "mappings",
|
||||
"value": [
|
||||
{
|
||||
"options": {
|
||||
"false": {"color": "red", "index": 1, "text": "FAILED"},
|
||||
"true": {"color": "green", "index": 0, "text": "PASSED"}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-text"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Temperature"},
|
||||
"properties": [
|
||||
{"id": "unit", "value": "celsius"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-text"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 45}, {"color": "red", "value": 55}]}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Lifetime remaining"},
|
||||
"properties": [
|
||||
{"id": "unit", "value": "percent"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-text"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 10}, {"color": "green", "value": 25}]}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Power-on hours"},
|
||||
"properties": [{"id": "unit", "value": "suffix: h"}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byRegexp", "options": "/^(Reallocated sectors|Reallocated events|Pending sectors|Offline uncorrectable|Reported uncorrectable)$/"},
|
||||
"properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-text"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "red", "value": 1}]}}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {"h": 26, "w": 24, "x": 0, "y": 0},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {"countRows": false, "fields": "", "reducer": ["sum"], "show": false},
|
||||
"showHeader": true,
|
||||
"sortBy": [{"desc": false, "displayName": "Drive"}]
|
||||
},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {"type": "influxdb", "uid": "${DS_INFLUXDB}"},
|
||||
"query": "import \"strings\"\n\nfrom(bucket: \"telegraf\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"smart_device\" and r.host == \"arschrock\")\n |> filter(fn: (r) => contains(value: r._field, set: [\"power_on_hours\", \"reallocated_sectors_count\", \"realloc_event_count\", \"pending_sector_count\", \"uncorrectable_sector_count\", \"percent_lifetime_remain\", \"uncorrectable_errors\", \"temp_c\"]))\n |> last()\n |> group(columns: [\"device\", \"model\"])\n |> pivot(rowKey: [\"device\", \"model\"], columnKey: [\"_field\"], valueColumn: \"_value\")\n |> group()\n |> map(fn: (r) => ({r with drive: if strings.hasPrefix(v: r.device, prefix: \"nvme\") then r.device + \"n1\" else r.device}))\n |> keep(columns: [\"drive\", \"model\", \"power_on_hours\", \"reallocated_sectors_count\", \"realloc_event_count\", \"pending_sector_count\", \"uncorrectable_sector_count\", \"percent_lifetime_remain\", \"uncorrectable_errors\", \"temp_c\"])\n |> sort(columns: [\"drive\"])",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "influxdb", "uid": "${DS_INFLUXDB}"},
|
||||
"query": "import \"strings\"\n\nfrom(bucket: \"telegraf\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"smart_device\" and r.host == \"arschrock\" and r._field == \"health_ok\")\n |> group(columns: [\"device\"])\n |> last()\n |> group()\n |> map(fn: (r) => ({drive: if strings.hasPrefix(v: r.device, prefix: \"nvme\") then r.device + \"n1\" else r.device, health_ok: r._value}))\n |> sort(columns: [\"drive\"])",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "influxdb", "uid": "${DS_INFLUXDB}"},
|
||||
"query": "import \"regexp\"\n\nfrom(bucket: \"telegraf\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"bcachefs_devices\" and r.host == \"arschrock\" and r._field == \"capacity_data\")\n |> last()\n |> group()\n |> map(fn: (r) => ({drive: regexp.replaceAllString(r: /p[0-9]+$/, v: r.device, t: \"\"), bcachefs_diskid: int(v: r.devid), bcachefs_label: r.label}))\n |> sort(columns: [\"drive\"])",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"title": "Disk health and bcachefs membership",
|
||||
"transformations": [
|
||||
{"id": "merge", "options": {}},
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"drive": 0,
|
||||
"model": 1,
|
||||
"bcachefs_diskid": 2,
|
||||
"bcachefs_label": 3,
|
||||
"health_ok": 4,
|
||||
"temp_c": 5,
|
||||
"power_on_hours": 6,
|
||||
"reallocated_sectors_count": 7,
|
||||
"realloc_event_count": 8,
|
||||
"pending_sector_count": 9,
|
||||
"uncorrectable_sector_count": 10,
|
||||
"percent_lifetime_remain": 11,
|
||||
"uncorrectable_errors": 12
|
||||
},
|
||||
"renameByName": {
|
||||
"bcachefs_diskid": "bcachefs disk ID",
|
||||
"bcachefs_label": "bcachefs label",
|
||||
"drive": "Drive",
|
||||
"health_ok": "Health",
|
||||
"model": "Model",
|
||||
"pending_sector_count": "Pending sectors",
|
||||
"percent_lifetime_remain": "Lifetime remaining",
|
||||
"power_on_hours": "Power-on hours",
|
||||
"realloc_event_count": "Reallocated events",
|
||||
"reallocated_sectors_count": "Reallocated sectors",
|
||||
"temp_c": "Temperature",
|
||||
"uncorrectable_errors": "Reported uncorrectable",
|
||||
"uncorrectable_sector_count": "Offline uncorrectable"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"schemaVersion": 42,
|
||||
"tags": ["dahoam", "smart", "bcachefs", "storage"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {"selected": true, "text": "influxdb", "value": "aes16l4bz9xc0a"},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "InfluxDB",
|
||||
"multi": false,
|
||||
"name": "DS_INFLUXDB",
|
||||
"options": [],
|
||||
"query": "influxdb",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {"from": "now-6h", "to": "now"},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "dahoam Disk Health",
|
||||
"uid": "dahoam-disk-health",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kubernetes-pvc-overview-dashboard
|
||||
namespace: default
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
kubernetes-pvc-overview.json: |-
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"description": "Cluster-wide PVC inventory and mounted filesystem usage, including namespace, PV, storage class, workload owner, and pod labels.",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 5, "w": 8, "x": 0, "y": 0},
|
||||
"id": 1,
|
||||
"options": {"colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto", "wideLayout": true},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "sum(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"})",
|
||||
"instant": true,
|
||||
"legendFormat": "Requested",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Requested PVC capacity",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 5, "w": 8, "x": 8, "y": 0},
|
||||
"id": 2,
|
||||
"options": {"colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto", "wideLayout": true},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "sum(max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) * on(namespace,persistentvolumeclaim) group_left(storageclass) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"})",
|
||||
"instant": true,
|
||||
"legendFormat": "Used",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Mounted PVC space used",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 5, "w": 8, "x": 16, "y": 0},
|
||||
"id": 3,
|
||||
"options": {"colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto", "wideLayout": true},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "sum(max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) * on(namespace,persistentvolumeclaim) group_left(storageclass) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"})",
|
||||
"instant": true,
|
||||
"legendFormat": "Free",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Mounted PVC space free",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {"mode": "thresholds"},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 75}, {"color": "red", "value": 85}]},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 13, "w": 24, "x": 0, "y": 5},
|
||||
"id": 4,
|
||||
"options": {"cellHeight": "sm", "footer": {"countRows": false, "fields": "", "reducer": ["sum"], "show": false}, "showHeader": true},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "(max by(namespace,persistentvolumeclaim,pod,volume) (kube_pod_spec_volumes_persistentvolumeclaims_info{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) ((100 * (1 - max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes) / max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes))) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"})) * on(namespace,pod) group_left(owner_kind,owner_name,workload) max by(namespace,pod,owner_kind,owner_name,workload) (label_replace(kube_pod_owner{owner_kind=\"ReplicaSet\"}, \"workload\", \"$1\", \"owner_name\", \"(.+)-[a-z0-9]{8,10}\") or label_replace(kube_pod_owner{owner_kind!=\"ReplicaSet\"}, \"workload\", \"$1\", \"owner_name\", \"(.+)\"))",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"legendFormat": "__auto",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "PVC usage by namespace, workload, and pod",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {"Time": true, "owner_name": true, "volume": true},
|
||||
"indexByName": {"namespace": 0, "workload": 1, "owner_kind": 2, "pod": 3, "persistentvolumeclaim": 4, "volumename": 5, "storageclass": 6, "Value": 7},
|
||||
"renameByName": {"Value": "Used %", "namespace": "Namespace", "owner_kind": "Owner kind", "persistentvolumeclaim": "PVC", "pod": "Pod", "storageclass": "Storage class", "volumename": "PV", "workload": "Workload"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 18},
|
||||
"id": 5,
|
||||
"options": {"displayMode": "gradient", "minVizHeight": 12, "minVizWidth": 0, "namePlacement": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showUnfilled": true, "sizing": "auto", "valueMode": "color"},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"} * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"}",
|
||||
"instant": true,
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}} / {{storageclass}}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "PVC requested capacity (includes PV name in labels)",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 1073741824}, {"color": "green", "value": 5368709120}]}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 18},
|
||||
"id": 6,
|
||||
"options": {"displayMode": "gradient", "minVizHeight": 12, "minVizWidth": 0, "namePlacement": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showUnfilled": true, "sizing": "auto", "valueMode": "color"},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"}",
|
||||
"instant": true,
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": false,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Mounted PVC free space",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"drawStyle": "line", "fillOpacity": 8, "lineWidth": 2, "showPoints": "never"}, "max": 100, "min": 0, "unit": "percent"}, "overrides": []},
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 28},
|
||||
"id": 7,
|
||||
"options": {"legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [
|
||||
{
|
||||
"editorMode": "code",
|
||||
"expr": "(100 * (1 - max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}) / max by(namespace,persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\",persistentvolumeclaim=~\"$pvc\"}))) * on(namespace,persistentvolumeclaim) group_left(storageclass,volumename) kube_persistentvolumeclaim_info{storageclass=~\"$storageclass\"}",
|
||||
"legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Mounted PVC usage history",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"schemaVersion": 42,
|
||||
"tags": ["kubernetes", "storage", "pv", "pvc", "capacity"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {"selected": true, "text": "Prometheus", "value": "aevstx976yku8a"},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Prometheus",
|
||||
"multi": false,
|
||||
"name": "DS_PROMETHEUS",
|
||||
"options": [],
|
||||
"query": "prometheus",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
},
|
||||
{
|
||||
"allValue": ".*",
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"definition": "label_values(kube_persistentvolumeclaim_info, namespace)",
|
||||
"includeAll": true,
|
||||
"label": "Namespace",
|
||||
"multi": true,
|
||||
"name": "namespace",
|
||||
"options": [],
|
||||
"query": {"query": "label_values(kube_persistentvolumeclaim_info, namespace)", "refId": "PrometheusVariableQueryEditor-VariableQuery"},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"allValue": ".*",
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"definition": "label_values(kube_persistentvolumeclaim_info{namespace=~\"$namespace\"}, storageclass)",
|
||||
"includeAll": true,
|
||||
"label": "Storage class",
|
||||
"multi": true,
|
||||
"name": "storageclass",
|
||||
"options": [],
|
||||
"query": {"query": "label_values(kube_persistentvolumeclaim_info{namespace=~\"$namespace\"}, storageclass)", "refId": "PrometheusVariableQueryEditor-VariableQuery"},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"allValue": ".*",
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
|
||||
"definition": "label_values(kube_persistentvolumeclaim_info{namespace=~\"$namespace\",storageclass=~\"$storageclass\"}, persistentvolumeclaim)",
|
||||
"includeAll": true,
|
||||
"label": "PVC",
|
||||
"multi": true,
|
||||
"name": "pvc",
|
||||
"options": [],
|
||||
"query": {"query": "label_values(kube_persistentvolumeclaim_info{namespace=~\"$namespace\",storageclass=~\"$storageclass\"}, persistentvolumeclaim)", "refId": "PrometheusVariableQueryEditor-VariableQuery"},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {"from": "now-7d", "to": "now"},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Kubernetes PV / PVC Overview",
|
||||
"uid": "kubernetes-pvc-overview",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: default
|
||||
resources:
|
||||
- ceph-rbd-pvc-capacity-dashboard.yaml
|
||||
- dahoam-disk-health-dashboard.yaml
|
||||
- kubernetes-pvc-overview-dashboard.yaml
|
||||
- mikrotik-storage-dashboard.yaml
|
||||
configMapGenerator:
|
||||
- name: traefik-official-dashboard
|
||||
files:
|
||||
- traefik-official.json
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
@@ -0,0 +1,124 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: mikrotik-storage-dashboard
|
||||
namespace: default
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
mikrotik-storage.json: |-
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"description": "RouterOS writable flash capacity exported by MKTXP.",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {"mode": "thresholds"},
|
||||
"mappings": [],
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 0},
|
||||
"id": 1,
|
||||
"options": {"colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [{"editorMode": "code", "expr": "count(mktxp_system_free_hdd_space)", "instant": true, "legendFormat": "Devices", "range": false, "refId": "A"}],
|
||||
"title": "Monitored devices",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"fieldConfig": {
|
||||
"defaults": {"color": {"mode": "thresholds"}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 1}] }},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 5, "w": 6, "x": 6, "y": 0},
|
||||
"id": 2,
|
||||
"options": {"colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [{"editorMode": "code", "expr": "count(mktxp_system_free_hdd_space < 131072)", "instant": true, "legendFormat": "Below 128 KiB", "range": false, "refId": "A"}],
|
||||
"title": "Low space",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"fieldConfig": {
|
||||
"defaults": {"color": {"mode": "thresholds"}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "red", "value": 1}] }},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {"h": 5, "w": 6, "x": 12, "y": 0},
|
||||
"id": 3,
|
||||
"options": {"colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [{"editorMode": "code", "expr": "count(mktxp_system_free_hdd_space < 65536)", "instant": true, "legendFormat": "Below 64 KiB", "range": false, "refId": "A"}],
|
||||
"title": "Critical space",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "custom": {"fillOpacity": 70, "lineWidth": 1}, "mappings": [], "max": 131072, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 65536}, {"color": "green", "value": 131072}]}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 5, "w": 6, "x": 18, "y": 0},
|
||||
"id": 4,
|
||||
"options": {"displayMode": "gradient", "legend": {"displayMode": "list", "placement": "bottom", "showLegend": false}, "maxVizHeight": 300, "minVizHeight": 10, "minVizWidth": 0, "namePlacement": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showUnfilled": true, "sizing": "auto", "valueMode": "color"},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [{"editorMode": "code", "expr": "min(mktxp_system_free_hdd_space)", "instant": true, "legendFormat": "Lowest free space", "range": false, "refId": "A"}],
|
||||
"title": "Lowest free space",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"description": "Current MKTXP inventory. Sort by Free flash to find constrained RouterBOARDs.",
|
||||
"fieldConfig": {
|
||||
"defaults": {},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Free flash"}, "properties": [{"id": "unit", "value": "bytes"}, {"id": "custom.cellOptions", "value": {"type": "color-text"}}, {"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 65536}, {"color": "green", "value": 131072}]}}]},
|
||||
{"matcher": {"id": "byName", "options": "Total flash"}, "properties": [{"id": "unit", "value": "bytes"}]}
|
||||
]
|
||||
},
|
||||
"gridPos": {"h": 17, "w": 24, "x": 0, "y": 5},
|
||||
"id": 5,
|
||||
"options": {"cellHeight": "sm", "footer": {"countRows": false, "fields": "", "reducer": ["sum"], "show": false}, "showHeader": true, "sortBy": [{"desc": false, "displayName": "Free flash"}]},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [
|
||||
{"editorMode": "code", "expr": "mktxp_system_free_hdd_space", "format": "time_series", "instant": true, "legendFormat": "Free flash", "range": false, "refId": "A"},
|
||||
{"editorMode": "code", "expr": "mktxp_system_total_hdd_space", "format": "time_series", "instant": true, "legendFormat": "Total flash", "range": false, "refId": "B"}
|
||||
],
|
||||
"title": "RouterOS flash inventory",
|
||||
"transformations": [
|
||||
{"id": "labelsToFields", "options": {"mode": "columns"}},
|
||||
{"id": "organize", "options": {"excludeByName": {"Time": true, "architecture_name": true, "cpu": true, "job": true, "routerboard_address": true}, "indexByName": {"routerboard_name": 0, "board_name": 1, "version": 2, "Free flash": 3, "Total flash": 4}, "renameByName": {"board_name": "Board", "routerboard_name": "Device", "version": "RouterOS"}}}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 5, "gradientMode": "none", "hideFrom": {"legend": false, "tooltip": false, "viz": false}, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 3, "scaleDistribution": {"type": "linear"}, "showPoints": "never", "spanNulls": false, "stacking": {"group": "A", "mode": "none"}}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 65536}, {"color": "green", "value": 131072}]}, "unit": "bytes"}, "overrides": []},
|
||||
"gridPos": {"h": 12, "w": 24, "x": 0, "y": 22},
|
||||
"id": 6,
|
||||
"options": {"legend": {"calcs": ["lastNotNull", "min"], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Last *", "sortDesc": false, "width": 350}, "tooltip": {"hideZeros": false, "mode": "multi", "sort": "asc"}},
|
||||
"pluginVersion": "12.3.1",
|
||||
"targets": [{"editorMode": "code", "expr": "mktxp_system_free_hdd_space", "legendFormat": "{{routerboard_name}}", "range": true, "refId": "A"}],
|
||||
"title": "Free flash history",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 42,
|
||||
"tags": ["mikrotik", "routeros", "mktxp", "storage"],
|
||||
"templating": {"list": []},
|
||||
"time": {"from": "now-24h", "to": "now"},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "MikroTik Storage",
|
||||
"uid": "mikrotik-storage",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,84 @@
|
||||
admin:
|
||||
existingSecret: grafana
|
||||
|
||||
testFramework:
|
||||
enabled: false
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- grafana.brunner.ninja
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
|
||||
envFromSecret: grafana-postgres-secret
|
||||
|
||||
datasources:
|
||||
datasources.yaml:
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: aevstx976yku8a
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090
|
||||
isDefault: false
|
||||
editable: false
|
||||
- name: Loki
|
||||
uid: eevt1560lw3r4e
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://loki.logging.svc.cluster.local:3100
|
||||
isDefault: false
|
||||
editable: false
|
||||
jsonData:
|
||||
maxLines: 5000
|
||||
|
||||
sidecar:
|
||||
dashboards:
|
||||
enabled: true
|
||||
skipReload: true
|
||||
label: grafana_dashboard
|
||||
labelValue: "1"
|
||||
searchNamespace: default
|
||||
provider:
|
||||
allowUiUpdates: true
|
||||
|
||||
grafana.ini:
|
||||
server:
|
||||
domain: grafana.brunner.ninja
|
||||
root_url: https://%(domain)s/
|
||||
smtp:
|
||||
enabled: true
|
||||
host: smtp-relay.gmail.com:587
|
||||
skip_verify: false
|
||||
from_address: alerts@brunner.ninja
|
||||
from_name: Cluster Alerts
|
||||
ehlo_identity: grafana.brunner.ninja
|
||||
startTLS_policy: MandatoryStartTLS
|
||||
database:
|
||||
type: postgres
|
||||
host: postgresql.default.svc.cluster.local
|
||||
name: grafana
|
||||
user: grafana
|
||||
auth:
|
||||
disable_login_form: true
|
||||
signout_redirect_url: https://auth.brunner.ninja/application/o/grafana/end-session/
|
||||
oauth_auto_login: true
|
||||
auth.anonymous:
|
||||
enabled: true
|
||||
org_name: Main Org.
|
||||
org_role: Viewer
|
||||
hide_version: true
|
||||
auth.generic_oauth:
|
||||
name: brunner.ninja auth
|
||||
enabled: true
|
||||
client_id: 4UivQGE1FvTVrlQ6azzc7DroYDDoprRLNKCTpIgc
|
||||
scopes: openid email profile
|
||||
role_attribute_path: contains(groups, 'Grafana Admins') && 'Admin' || contains(groups, 'Grafana Editors') && 'Editor' || 'Viewer'
|
||||
auth_url: https://auth.brunner.ninja/application/o/authorize/
|
||||
token_url: https://auth.brunner.ninja/application/o/token/
|
||||
api_url: https://auth.brunner.ninja/application/o/userinfo/
|
||||
security:
|
||||
allow_embedding: true
|
||||
x_frame_options: ""
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AppProject
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: argocd
|
||||
spec:
|
||||
description: Grafana and its cluster-specific dashboards
|
||||
sourceRepos:
|
||||
- https://grafana-community.github.io/helm-charts
|
||||
- https://code.brunner.ninja/feedc0de/homelab-gitops.git
|
||||
destinations:
|
||||
- namespace: default
|
||||
server: https://kubernetes.default.svc
|
||||
clusterResourceWhitelist:
|
||||
- group: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
- group: rbac.authorization.k8s.io
|
||||
kind: ClusterRoleBinding
|
||||
namespaceResourceWhitelist:
|
||||
- group: ""
|
||||
kind: ConfigMap
|
||||
- group: ""
|
||||
kind: Service
|
||||
- group: ""
|
||||
kind: ServiceAccount
|
||||
- group: apps
|
||||
kind: Deployment
|
||||
- group: networking.k8s.io
|
||||
kind: Ingress
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: grafana
|
||||
sources:
|
||||
- repoURL: https://grafana-community.github.io/helm-charts
|
||||
chart: grafana
|
||||
targetRevision: 14.0.1
|
||||
helm:
|
||||
releaseName: grafana
|
||||
valueFiles:
|
||||
- $values/apps/grafana/values.yaml
|
||||
- repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
|
||||
targetRevision: main
|
||||
ref: values
|
||||
- repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
|
||||
targetRevision: main
|
||||
path: apps/grafana/resources
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: default
|
||||
syncPolicy:
|
||||
automated:
|
||||
enabled: true
|
||||
prune: false
|
||||
selfHeal: false
|
||||
@@ -4,6 +4,7 @@ resources:
|
||||
- argocd-project.yaml
|
||||
- argocd.yaml
|
||||
- project.yaml
|
||||
- grafana-project.yaml
|
||||
- platform-project.yaml
|
||||
- sealed-secrets.yaml
|
||||
- immich-sync.yaml
|
||||
@@ -52,5 +53,6 @@ resources:
|
||||
- ombi.yaml
|
||||
- tautulli.yaml
|
||||
- uptime-kuma.yaml
|
||||
- grafana.yaml
|
||||
- visual-studio-code.yaml
|
||||
- wiki-js.yaml
|
||||
Reference in new issue
Block a user