dashboards: migrate from old table panel in cluster dashboard (#1993)

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
Roman Khavronenko 2021-12-22 11:21:06 +02:00 committed by GitHub
parent 566c9791be
commit 4010f548b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,8 +28,8 @@
},
{
"type": "panel",
"id": "table-old",
"name": "Table (old)",
"id": "table",
"name": "Table",
"version": ""
}
],
@ -57,7 +57,7 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"iteration": 1640012887049,
"iteration": 1640161142159,
"links": [
{
"icon": "doc",
@ -111,7 +111,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -174,7 +175,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -238,7 +240,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -301,7 +304,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -364,7 +368,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -427,7 +432,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -490,7 +496,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -553,7 +560,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -602,11 +610,83 @@
"type": "stat"
},
{
"columns": [],
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"fontSize": "100%",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Value #A"
},
"properties": [
{
"id": "unit",
"value": "s"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.displayMode",
"value": "color-background"
},
{
"id": "custom.align"
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "rgba(245, 54, 54, 0.9)",
"value": null
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 1800
},
{
"color": "rgba(50, 172, 45, 0.97)",
"value": 3600
}
]
}
}
]
}
]
},
"gridPos": {
"h": 5,
"w": 8,
@ -614,79 +694,69 @@
"y": 5
},
"id": 26,
"scroll": true,
"showHeader": true,
"sort": {
"col": 3,
"desc": false
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"styles": [
{
"alias": "uptime",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value",
"thresholds": [
"1800",
"3600"
],
"type": "number",
"unit": "s"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "instance",
"thresholds": [],
"type": "string",
"unit": "short"
},
{
"alias": "",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "/.*/",
"thresholds": [],
"type": "hidden",
"unit": "short"
}
],
"pluginVersion": "8.3.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"exemplar": false,
"expr": "sort((time() - vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}) or (up{job=~\"$job\", instance=~\"$instance\"}))",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"title": "Uptime",
"transform": "table",
"type": "table-old"
"transformations": [
{
"id": "sortBy",
"options": {
"fields": {},
"sort": [
{
"desc": false,
"field": "Value #A"
}
]
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"job": true
},
"indexByName": {
"Time": 0,
"Value #A": 2,
"env": 3,
"instance": 1,
"job": 4,
"team": 5
},
"renameByName": {
"Value #A": "uptime"
}
}
}
],
"type": "table"
},
{
"aliasColors": {},
@ -6255,6 +6325,7 @@
"name": "ds",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,