add files for custom grafana image with provisioned dashboards

This commit is contained in:
2024-05-29 23:50:29 +03:00
parent e62f8448a1
commit 83c69683a6
13 changed files with 2835 additions and 4047 deletions

5
grafana/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM --platform=amd64 grafana/grafana:10.4.1
COPY ./provisioning /etc/grafana/provisioning
COPY ./dashboards /etc/grafana/dashboards

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_VICTORIA_METRICS",
"label": "Victoria Metrics",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.4.1"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@@ -63,14 +26,14 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"gnetId": 7587, "gnetId": 7587,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 27,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -143,7 +106,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "probe_success{instance=~\"$target\"}", "expr": "probe_success{instance=~\"$target\"}",
@@ -158,7 +121,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -239,7 +202,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_duration_seconds{instance=~\"$target\"}", "expr": "probe_duration_seconds{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -282,7 +245,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -362,7 +325,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_success{instance=~\"$target\"}", "expr": "probe_success{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -377,7 +340,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -458,7 +421,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_http_duration_seconds{instance=~\"$target\"}", "expr": "probe_http_duration_seconds{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -474,7 +437,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -555,7 +518,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_duration_seconds{instance=~\"$target\"}", "expr": "probe_duration_seconds{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -571,7 +534,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -651,7 +614,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_http_status_code{instance=~\"$target\"}", "expr": "probe_http_status_code{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -666,7 +629,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -729,7 +692,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_http_version{instance=~\"$target\"}", "expr": "probe_http_version{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -743,7 +706,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -822,7 +785,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_http_ssl{instance=~\"$target\"}", "expr": "probe_http_ssl{instance=~\"$target\"}",
"format": "time_series", "format": "time_series",
@@ -837,7 +800,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -917,7 +880,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "probe_ssl_earliest_cert_expiry{instance=~\"$target\"} - time()", "expr": "probe_ssl_earliest_cert_expiry{instance=~\"$target\"} - time()",
"format": "time_series", "format": "time_series",
@@ -932,7 +895,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -995,7 +958,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "avg(probe_duration_seconds{instance=~\"$target\"})", "expr": "avg(probe_duration_seconds{instance=~\"$target\"})",
"format": "time_series", "format": "time_series",
@@ -1010,7 +973,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1074,7 +1037,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"expr": "avg(probe_dns_lookup_time_seconds{instance=~\"$target\"})", "expr": "avg(probe_dns_lookup_time_seconds{instance=~\"$target\"})",
"format": "time_series", "format": "time_series",
@@ -1185,10 +1148,14 @@
"type": "interval" "type": "interval"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(probe_success, instance)", "definition": "label_values(probe_success, instance)",
"hide": 0, "hide": 0,
@@ -1243,6 +1210,6 @@
"timezone": "", "timezone": "",
"title": "Blackbox", "title": "Blackbox",
"uid": "xtkCtBkiz", "uid": "xtkCtBkiz",
"version": 3, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1,41 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_KUBE-PROMETHEUS",
"label": "Kube-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.0.2"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@@ -61,7 +24,7 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 28,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
@@ -81,7 +44,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -89,6 +52,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -102,6 +66,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -185,7 +150,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
@@ -203,7 +168,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@@ -247,14 +212,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "builder", "editorMode": "builder",
"exemplar": false, "exemplar": false,
@@ -282,7 +249,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -359,7 +326,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -371,7 +338,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -388,7 +355,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -465,7 +432,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -477,7 +444,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_requests{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -494,7 +461,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -571,7 +538,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -583,7 +550,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"cpu\", unit=\"core\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -600,7 +567,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -677,7 +644,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -689,7 +656,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (sum by(exported_pod) (kube_pod_container_resource_limits{exported_namespace=\"$namespace\", resource=\"memory\", unit=\"byte\"}) and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -723,7 +690,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -731,6 +698,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -744,6 +712,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -817,7 +786,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
@@ -830,7 +799,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_cpu_usage_seconds_total{container!~\"POD|\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_cpu_usage_seconds_total{container!~\"POD|\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -841,13 +810,12 @@
} }
], ],
"title": "CPU (cores)", "title": "CPU (cores)",
"transformations": [],
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -855,6 +823,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -868,6 +837,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -925,7 +895,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "label_replace(sum by(pod) (container_memory_working_set_bytes{namespace=\"$namespace\"}), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "label_replace(sum by(pod) (container_memory_working_set_bytes{namespace=\"$namespace\"}), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -936,7 +906,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (container_memory_working_set_bytes{namespace=\"$namespace\"}), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (container_memory_working_set_bytes{namespace=\"$namespace\"}), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -952,7 +922,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@@ -961,6 +931,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -974,6 +945,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1031,7 +1003,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "label_replace(sum by(pod) (rate(container_fs_writes_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "label_replace(sum by(pod) (rate(container_fs_writes_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -1042,7 +1014,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_fs_writes_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_fs_writes_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -1058,7 +1030,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1066,6 +1038,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1079,6 +1052,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1136,7 +1110,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "label_replace(sum by(pod) (rate(container_fs_reads_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "label_replace(sum by(pod) (rate(container_fs_reads_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -1147,7 +1121,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_fs_reads_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_fs_reads_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -1176,7 +1150,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@@ -1254,7 +1228,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "label_replace(sum by(pod) (rate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "label_replace(sum by(pod) (rate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -1266,7 +1240,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_network_receive_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -1283,7 +1257,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@@ -1361,7 +1335,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "label_replace(sum by(pod) (rate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}", "expr": "label_replace(sum by(pod) (rate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"}",
@@ -1373,7 +1347,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})", "expr": "sum by(label_app_kubernetes_io_component) (label_replace(sum by(pod) (rate(container_network_transmit_bytes_total{namespace=\"$namespace\"}[$__rate_interval])), \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_labels{exported_namespace=\"$namespace\", label_app_kubernetes_io_component=\"$component\"})",
@@ -1389,8 +1363,7 @@
} }
], ],
"refresh": "", "refresh": "",
"schemaVersion": 38, "schemaVersion": 39,
"style": "dark",
"tags": [ "tags": [
"kubernetes" "kubernetes"
], ],
@@ -1400,7 +1373,7 @@
"current": { "current": {
"selected": false, "selected": false,
"text": "Kube-prometheus", "text": "Kube-prometheus",
"value": "Kube-prometheus" "value": "P8D3620484E958841"
}, },
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -1416,10 +1389,14 @@
"type": "datasource" "type": "datasource"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "cert-manager",
"value": "cert-manager"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_namespace_labels, exported_namespace)", "definition": "label_values(kube_namespace_labels, exported_namespace)",
"hide": 0, "hide": 0,
@@ -1438,10 +1415,14 @@
"type": "query" "type": "query"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "controller",
"value": "controller"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)", "definition": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)",
"hide": 0, "hide": 0,
@@ -1469,6 +1450,6 @@
"timezone": "", "timezone": "",
"title": "Component Metrics", "title": "Component Metrics",
"uid": "e5ae1f99-2b2b-44e3-9165-487757ea2d57", "uid": "e5ae1f99-2b2b-44e3-9165-487757ea2d57",
"version": 13, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1,47 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_VICTORIA_METRICS",
"label": "Victoria Metrics",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.4.1"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@@ -63,7 +20,7 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"gnetId": 19716, "gnetId": 19716,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 29,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
@@ -83,7 +40,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -131,7 +88,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -161,7 +118,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -213,7 +170,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -245,7 +202,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -297,7 +254,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -327,7 +284,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -379,7 +336,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -409,7 +366,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -477,7 +434,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -510,7 +467,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -573,7 +530,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -618,7 +575,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -666,7 +623,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -686,7 +643,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -734,7 +691,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -755,7 +712,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -841,20 +798,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
},
"editorMode": "code",
"expr": "sum (harbor_project_total{instance=~\"$instance\",job=\"harbor-exporter\"})",
"hide": false,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (public)(harbor_project_total{instance=~\"$instance\"})", "expr": "sum by (public)(harbor_project_total{instance=~\"$instance\"})",
@@ -870,7 +814,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -919,7 +863,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -949,7 +893,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1002,7 +946,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (project_name)(harbor_project_repo_total{instance=~\"$instance\"})", "expr": "sum by (project_name)(harbor_project_repo_total{instance=~\"$instance\"})",
@@ -1018,7 +962,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1071,7 +1015,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (project_name) (harbor_project_quota_usage_byte{instance=~\"$instance\"})", "expr": "sum by (project_name) (harbor_project_quota_usage_byte{instance=~\"$instance\"})",
@@ -1087,7 +1031,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1139,7 +1083,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -1172,7 +1116,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1184,8 +1128,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "blue", "color": "blue"
"value": null
} }
] ]
} }
@@ -1220,7 +1163,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -1240,7 +1183,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1252,8 +1195,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "blue", "color": "blue"
"value": null
} }
] ]
} }
@@ -1288,7 +1230,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -1308,7 +1250,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1352,8 +1294,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1387,7 +1328,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (project_name)(harbor_project_artifact_total{instance=~\"$instance\"})", "expr": "sum by (project_name)(harbor_project_artifact_total{instance=~\"$instance\"})",
@@ -1403,7 +1344,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1456,7 +1397,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -1476,7 +1417,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1520,8 +1461,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1555,7 +1495,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
@@ -1581,10 +1521,14 @@
"templating": { "templating": {
"list": [ "list": [
{ {
"current": {}, "current": {
"selected": false,
"text": "10.233.73.249:8001",
"value": "10.233.73.249:8001"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(harbor_system_info,instance)", "definition": "label_values(harbor_system_info,instance)",
"hide": 0, "hide": 0,
@@ -1604,12 +1548,16 @@
"type": "query" "type": "query"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_VICTORIA_METRICS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(harbor_project_artifact_total{instance=~\"$instance\"},project_name)", "definition": "label_values(harbor_project_repo_total{instance=~\"$instance\"},project_name)",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": "Project", "label": "Project",
@@ -1617,7 +1565,8 @@
"name": "project", "name": "project",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(harbor_project_artifact_total{instance=~\"$instance\"},project_name)", "qryType": 1,
"query": "label_values(harbor_project_repo_total{instance=~\"$instance\"},project_name)",
"refId": "PrometheusVariableQueryEditor-VariableQuery" "refId": "PrometheusVariableQueryEditor-VariableQuery"
}, },
"refresh": 1, "refresh": 1,
@@ -1629,13 +1578,13 @@
] ]
}, },
"time": { "time": {
"from": "now-24h", "from": "now-5m",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
"timezone": "", "timezone": "",
"title": "Harbor", "title": "Harbor",
"uid": "a65d2835-5027-46c8-951f-3799fb702232", "uid": "a65d2835-5027-46c8-951f-3799fb702232",
"version": 3, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1,61 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_KUBE-LOKI",
"label": "Kube-loki",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
},
{
"name": "DS_KUBE-PROMETHEUS",
"label": "Kube-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.0.2"
},
{
"type": "datasource",
"id": "loki",
"name": "Loki",
"version": "1.0.0"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@@ -76,14 +19,14 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 31,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -91,6 +34,7 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -104,6 +48,7 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineStyle": { "lineStyle": {
"fill": "solid" "fill": "solid"
@@ -164,7 +109,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))", "expr": "count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))",
@@ -176,7 +121,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "count(rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))", "expr": "count(rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))",
@@ -203,7 +148,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -246,14 +191,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `OOMKilled` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `OOMKilled` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -267,7 +214,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -310,14 +257,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Evicted` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Evicted` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -331,7 +280,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -374,14 +323,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `BackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `BackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -395,7 +346,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -438,14 +389,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `ImagePullBackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `ImagePullBackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -468,7 +421,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -511,14 +464,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\" | reason = `Failed` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\" | reason = `Failed` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -532,7 +487,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -575,14 +530,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Unhealthy` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Unhealthy` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -607,7 +564,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -650,14 +607,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `FailedMount` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `FailedMount` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -671,7 +630,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -714,14 +673,16 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"textMode": "auto" "showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `FailedScheduling` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))", "expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `FailedScheduling` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
@@ -744,7 +705,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -933,12 +894,12 @@
} }
] ]
}, },
"pluginVersion": "10.0.2", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "{logs_type=\"kube-events\"} | json namespace=\"namespace\", event_type=\"event_type\", component=\"component\" | namespace =~ `$namespace` | event_type =~ `$event_type` | component =~ `$component`", "expr": "{logs_type=\"kube-events\"} | json namespace=\"namespace\", event_type=\"event_type\", component=\"component\" | namespace =~ `$namespace` | event_type =~ `$event_type` | component =~ `$component`",
@@ -999,8 +960,7 @@
} }
], ],
"refresh": "", "refresh": "",
"schemaVersion": 38, "schemaVersion": 39,
"style": "dark",
"tags": [ "tags": [
"kubernetes" "kubernetes"
], ],
@@ -1010,7 +970,7 @@
"current": { "current": {
"selected": false, "selected": false,
"text": "Kube-loki", "text": "Kube-loki",
"value": "Kube-loki" "value": "P2895588539814C92"
}, },
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -1029,7 +989,7 @@
"current": { "current": {
"selected": false, "selected": false,
"text": "Kube-prometheus", "text": "Kube-prometheus",
"value": "Kube-prometheus" "value": "P8D3620484E958841"
}, },
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -1045,10 +1005,14 @@
"type": "datasource" "type": "datasource"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_namespace_labels,exported_namespace)", "definition": "label_values(kube_namespace_labels,exported_namespace)",
"hide": 0, "hide": 0,
@@ -1069,7 +1033,7 @@
}, },
{ {
"current": { "current": {
"selected": true, "selected": false,
"text": "Warning", "text": "Warning",
"value": "Warning" "value": "Warning"
}, },
@@ -1101,10 +1065,14 @@
"type": "custom" "type": "custom"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)", "definition": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)",
"hide": 0, "hide": 0,
@@ -1133,6 +1101,6 @@
"timezone": "", "timezone": "",
"title": "Kubernetes events", "title": "Kubernetes events",
"uid": "bce70149-6173-4ba5-bdd9-9ed60dc0f296", "uid": "bce70149-6173-4ba5-bdd9-9ed60dc0f296",
"version": 45, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1,47 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_KUBE-PROMETHEUS",
"label": "Kube-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.4.1"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@@ -69,7 +26,7 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"gnetId": 315, "gnetId": 315,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 32,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
@@ -102,7 +59,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -171,7 +128,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"}) * 100", "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"}) * 100",
"interval": "10s", "interval": "10s",
@@ -186,7 +143,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -256,7 +213,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) / sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"}) * 100", "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) / sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"}) * 100",
"interval": "10s", "interval": "10s",
@@ -271,7 +228,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -341,7 +298,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (container_fs_usage_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (container_fs_limit_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) * 100", "expr": "sum (container_fs_usage_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (container_fs_limit_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) * 100",
@@ -360,7 +317,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -440,7 +397,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})",
@@ -452,7 +409,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"memory\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"memory\"}))",
@@ -463,7 +420,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"memory\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"memory\"}))",
@@ -475,7 +432,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})",
@@ -491,7 +448,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -571,7 +528,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\", kubernetes_io_hostname=~\"^$Node$\"}[$__rate_interval]))", "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\", kubernetes_io_hostname=~\"^$Node$\"}[$__rate_interval]))",
@@ -582,7 +539,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"cpu\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"cpu\"}))",
@@ -594,7 +551,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"cpu\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"cpu\"}))",
@@ -606,7 +563,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})",
@@ -622,7 +579,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -687,7 +644,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (container_fs_usage_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (container_fs_usage_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})",
@@ -704,7 +661,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -769,7 +726,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (container_fs_limit_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (container_fs_limit_bytes{device=~\"$data_filesystem\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})",
@@ -786,7 +743,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -851,7 +808,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})",
@@ -868,7 +825,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -933,7 +890,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})",
@@ -950,7 +907,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1015,7 +972,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\", kubernetes_io_hostname=~\"^$Node$\"}[$__rate_interval]))", "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\", kubernetes_io_hostname=~\"^$Node$\"}[$__rate_interval]))",
@@ -1032,7 +989,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1097,7 +1054,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})", "expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})",
@@ -1114,7 +1071,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1179,7 +1136,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"memory\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"memory\"}))",
@@ -1196,7 +1153,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1249,7 +1206,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"memory\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"memory\"}))",
@@ -1264,7 +1221,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1329,7 +1286,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"cpu\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_requests{node=~\"^$Node$\", resource=\"cpu\"}))",
@@ -1346,7 +1303,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1411,7 +1368,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"cpu\"}))", "expr": "sum(sum by(node) (kube_pod_container_resource_limits{node=~\"^$Node$\", resource=\"cpu\"}))",
@@ -1441,7 +1398,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1493,7 +1450,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (sum by(node)(label_replace(kube_pod_info{node=~\"$Node\"}, \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_status_phase{phase=\"Running\"}))", "expr": "sum (sum by(node)(label_replace(kube_pod_info{node=~\"$Node\"}, \"exported_pod\", \"$1\", \"pod\", \"(.*)\") and on(exported_pod) kube_pod_status_phase{phase=\"Running\"}))",
@@ -1508,7 +1465,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1560,7 +1517,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum(kube_node_status_capacity{node=~\"$Node\", resource=\"pods\"})", "expr": "sum(kube_node_status_capacity{node=~\"$Node\", resource=\"pods\"})",
@@ -1601,7 +1558,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -1686,7 +1643,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"expr": "sum (rate (container_network_receive_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", "expr": "sum (rate (container_network_receive_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))",
"interval": "10s", "interval": "10s",
@@ -1699,7 +1656,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"expr": "- sum (rate (container_network_transmit_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", "expr": "- sum (rate (container_network_transmit_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))",
"interval": "10s", "interval": "10s",
@@ -1741,10 +1698,14 @@
}, },
{ {
"allValue": ".*", "allValue": ".*",
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "", "definition": "",
"hide": 0, "hide": 0,
@@ -1764,10 +1725,14 @@
"type": "query" "type": "query"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "/dev/longhorn/pvc-500e32c3-8dab-4761-890a-1ecffd6c14f1",
"value": "/dev/longhorn/pvc-500e32c3-8dab-4761-890a-1ecffd6c14f1"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(container_fs_limit_bytes{instance=~\"$Node\"},device)", "definition": "label_values(container_fs_limit_bytes{instance=~\"$Node\"},device)",
"hide": 0, "hide": 0,
@@ -1820,6 +1785,6 @@
"timezone": "browser", "timezone": "browser",
"title": "Kubernetes resources", "title": "Kubernetes resources",
"uid": "N7uzcMu4z", "uid": "N7uzcMu4z",
"version": 3, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1,55 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_KUBE-LOKI",
"label": "Kube-loki",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
},
{
"name": "DS_KUBE-PROMETHEUS",
"label": "Kube-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.3.5"
},
{
"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": { "annotations": {
"list": [ "list": [
{ {
@@ -69,14 +18,14 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 34,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -128,8 +77,7 @@
"value": 80 "value": 80
} }
] ]
}, }
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -156,7 +104,7 @@
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "count(rate({job=\"$job\"} | json | kubernetes_namespace_name =~ `$namespaces` | kubernetes_container_name =~ `.*$component.*` | kubernetes_labels_app_kubernetes_io_component =~ `$component` | log =~ `.*$log_contains.*` | kubernetes_pod_name =~ `.*.$pod_name_contains.*` [$__auto]))", "expr": "count(rate({job=\"$job\"} | json | kubernetes_namespace_name =~ `$namespaces` | kubernetes_container_name =~ `.*$component.*` | kubernetes_labels_app_kubernetes_io_component =~ `$component` | log =~ `.*$log_contains.*` | kubernetes_pod_name =~ `.*.$pod_name_contains.*` [$__auto]))",
@@ -166,13 +114,12 @@
} }
], ],
"title": "Timeline", "title": "Timeline",
"transformations": [],
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@@ -196,8 +143,7 @@
"value": 80 "value": 80
} }
] ]
}, }
"unitScale": false
}, },
"overrides": [ "overrides": [
{ {
@@ -300,12 +246,12 @@
} }
] ]
}, },
"pluginVersion": "10.3.5", "pluginVersion": "10.4.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "{job=\"$job\"} | json | kubernetes_namespace_name =~ `$namespaces` | kubernetes_container_name =~ `.*$component.*` | kubernetes_labels_app_kubernetes_io_component =~ `$component` | log =~ `.*$log_contains.*` | kubernetes_pod_name =~ `.*$pod_name_contains.*`", "expr": "{job=\"$job\"} | json | kubernetes_namespace_name =~ `$namespaces` | kubernetes_container_name =~ `.*$component.*` | kubernetes_labels_app_kubernetes_io_component =~ `$component` | log =~ `.*$log_contains.*` | kubernetes_pod_name =~ `.*$pod_name_contains.*`",
@@ -416,10 +362,14 @@
"type": "datasource" "type": "datasource"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "fluent-bit",
"value": "fluent-bit"
},
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "${DS_KUBE-LOKI}" "uid": "P2895588539814C92"
}, },
"definition": "", "definition": "",
"hide": 0, "hide": 0,
@@ -441,10 +391,14 @@
"type": "query" "type": "query"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_namespace_labels,exported_namespace)", "definition": "label_values(kube_namespace_labels,exported_namespace)",
"hide": 0, "hide": 0,
@@ -465,10 +419,14 @@
"type": "query" "type": "query"
}, },
{ {
"current": {}, "current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}" "uid": "P8D3620484E958841"
}, },
"definition": "label_values(kube_pod_labels{exported_namespace=~\"$namespaces\"},label_app_kubernetes_io_component)", "definition": "label_values(kube_pod_labels{exported_namespace=~\"$namespaces\"},label_app_kubernetes_io_component)",
"hide": 0, "hide": 0,
@@ -534,11 +492,10 @@
"from": "now-30m", "from": "now-30m",
"to": "now" "to": "now"
}, },
"timeRangeUpdatedDuringEditOrView": false,
"timepicker": {}, "timepicker": {},
"timezone": "", "timezone": "",
"title": "Pod logs", "title": "Pod logs",
"uid": "e0a431f1-fd31-48ce-885b-079bba3bf58d", "uid": "e0a431f1-fd31-48ce-885b-079bba3bf58d",
"version": 30, "version": 1,
"weekStart": "" "weekStart": ""
} }

View File

@@ -0,0 +1,13 @@
apiVersion: 1
providers:
- name: "Dashboard provider"
orgId: 1
type: file
disableDeletion: false
updateIntervalSeconds: 10
allowUiUpdates: true
editable: true
options:
path: /etc/grafana/dashboards
foldersFromFilesStructure: true

0
grafana/version.txt Normal file
View File