Fix consolidated Kubernetes dashboard

Fixes #56.
This commit is contained in:
Carlos de Paula 2020-06-15 19:02:16 -03:00
parent b617576d64
commit 33af4a53d1
2 changed files with 2010 additions and 1693 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20576,7 +20576,6 @@ items:
"editable": true, "editable": true,
"gnetId": 162, "gnetId": 162,
"graphTooltip": 1, "graphTooltip": 1,
"id": 7,
"links": [ "links": [
], ],
@ -20593,6 +20592,16 @@ items:
"datasource": "prometheus", "datasource": "prometheus",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"format": "percent", "format": "percent",
"gauge": { "gauge": {
"maxValue": 100, "maxValue": 100,
@ -20678,6 +20687,16 @@ items:
"#890f02" "#890f02"
], ],
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"format": "percentunit", "format": "percentunit",
"gauge": { "gauge": {
"maxValue": 100, "maxValue": 100,
@ -20728,7 +20747,7 @@ items:
"lineColor": "rgb(31, 120, 193)", "lineColor": "rgb(31, 120, 193)",
"show": false "show": false
}, },
"tableColumn": "", "tableColumn": "{job=\"kubelet\"}",
"targets": [ "targets": [
{ {
"expr": "avg(up{job=\"kubelet\"}) BY (job)", "expr": "avg(up{job=\"kubelet\"}) BY (job)",
@ -20765,6 +20784,16 @@ items:
"decimals": 0, "decimals": 0,
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"format": "percent", "format": "percent",
"gauge": { "gauge": {
"maxValue": 100, "maxValue": 100,
@ -20845,6 +20874,16 @@ items:
], ],
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fontSize": "90%", "fontSize": "90%",
"gridPos": { "gridPos": {
"h": 5, "h": 5,
@ -20866,6 +20905,7 @@ items:
"styles": [ "styles": [
{ {
"alias": "Time", "alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss", "dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false, "link": false,
"pattern": "Time", "pattern": "Time",
@ -20873,6 +20913,7 @@ items:
}, },
{ {
"alias": "Uptime", "alias": "Uptime",
"align": "auto",
"colorMode": null, "colorMode": null,
"colors": [ "colors": [
"rgba(50, 172, 45, 0.97)", "rgba(50, 172, 45, 0.97)",
@ -20890,6 +20931,7 @@ items:
}, },
{ {
"alias": "", "alias": "",
"align": "auto",
"colorMode": null, "colorMode": null,
"colors": [ "colors": [
"rgba(245, 54, 54, 0.9)", "rgba(245, 54, 54, 0.9)",
@ -20906,6 +20948,7 @@ items:
}, },
{ {
"alias": "", "alias": "",
"align": "auto",
"colorMode": null, "colorMode": null,
"colors": [ "colors": [
"rgba(245, 54, 54, 0.9)", "rgba(245, 54, 54, 0.9)",
@ -20936,10 +20979,11 @@ items:
"title": "Node Uptime", "title": "Node Uptime",
"transform": "table", "transform": "table",
"transparent": true, "transparent": true,
"type": "table" "type": "table-old"
}, },
{ {
"collapsed": false, "collapsed": false,
"datasource": null,
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -20999,13 +21043,25 @@ items:
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 8 "y": 8
}, },
"hiddenSeries": false,
"id": 10, "id": 10,
"legend": { "legend": {
"avg": false, "avg": false,
@ -21022,6 +21078,11 @@ items:
], ],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21146,13 +21207,25 @@ items:
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 8 "y": 8
}, },
"hiddenSeries": false,
"id": 11, "id": 11,
"legend": { "legend": {
"avg": false, "avg": false,
@ -21169,6 +21242,11 @@ items:
], ],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21247,6 +21325,16 @@ items:
], ],
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fontSize": "100%", "fontSize": "100%",
"gridPos": { "gridPos": {
"h": 9, "h": 9,
@ -21268,6 +21356,7 @@ items:
"styles": [ "styles": [
{ {
"alias": "Time", "alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss", "dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false, "link": false,
"pattern": "Time", "pattern": "Time",
@ -21275,6 +21364,7 @@ items:
}, },
{ {
"alias": "", "alias": "",
"align": "auto",
"colorMode": null, "colorMode": null,
"colors": [ "colors": [
"rgba(245, 54, 54, 0.9)", "rgba(245, 54, 54, 0.9)",
@ -21292,6 +21382,7 @@ items:
}, },
{ {
"alias": "", "alias": "",
"align": "auto",
"colorMode": null, "colorMode": null,
"colors": [ "colors": [
"rgba(245, 54, 54, 0.9)", "rgba(245, 54, 54, 0.9)",
@ -21325,13 +21416,24 @@ items:
], ],
"title": "Active Alerts", "title": "Active Alerts",
"transform": "table", "transform": "table",
"type": "table" "type": "table-old"
}, },
{ {
"dashboardFilter": "", "dashboardFilter": "",
"dashboardTags": [ "dashboardTags": [
], ],
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"folderId": null, "folderId": null,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
@ -21367,6 +21469,16 @@ items:
"decimals": null, "decimals": null,
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"format": "percent", "format": "percent",
"gauge": { "gauge": {
"maxValue": 100, "maxValue": 100,
@ -21488,13 +21600,25 @@ items:
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 4, "h": 4,
"w": 7, "w": 7,
"x": 17, "x": 17,
"y": 22 "y": 22
}, },
"hiddenSeries": false,
"id": 29, "id": 29,
"legend": { "legend": {
"avg": false, "avg": false,
@ -21511,6 +21635,11 @@ items:
], ],
"nullPointMode": "null as zero", "nullPointMode": "null as zero",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21646,13 +21775,25 @@ items:
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "prometheus", "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 26 "y": 26
}, },
"hiddenSeries": false,
"id": 13, "id": 13,
"legend": { "legend": {
"avg": false, "avg": false,
@ -21669,6 +21810,11 @@ items:
], ],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21743,6 +21889,7 @@ items:
}, },
{ {
"collapsed": false, "collapsed": false,
"datasource": null,
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -21767,7 +21914,18 @@ items:
"decimals": 0, "decimals": 0,
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 0, "fill": 0,
"fillGradient": 0,
"grid": { "grid": {
}, },
@ -21777,6 +21935,7 @@ items:
"x": 0, "x": 0,
"y": 33 "y": 33
}, },
"hiddenSeries": false,
"id": 3, "id": 3,
"isNew": true, "isNew": true,
"legend": { "legend": {
@ -21801,6 +21960,11 @@ items:
], ],
"nullPointMode": "null as zero", "nullPointMode": "null as zero",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21813,12 +21977,12 @@ items:
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "topk(10,sum by (container_name)( rate(container_cpu_usage_seconds_total{image!=\"\",container_name!=\"POD\"}[1m] ) ))", "expr": "topk(10,sum by (pod)(rate(container_cpu_usage_seconds_total{image!=\"\"}[1m] ) ))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ container_name}}", "legendFormat": "{{ pod}}",
"metric": "container_cpu", "metric": "container_cpu",
"refId": "A", "refId": "A",
"step": 10 "step": 10
@ -21883,7 +22047,18 @@ items:
"decimals": 2, "decimals": 2,
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 0, "fill": 0,
"fillGradient": 0,
"grid": { "grid": {
}, },
@ -21893,6 +22068,7 @@ items:
"x": 0, "x": 0,
"y": 40 "y": 40
}, },
"hiddenSeries": false,
"id": 2, "id": 2,
"isNew": true, "isNew": true,
"legend": { "legend": {
@ -21915,6 +22091,11 @@ items:
], ],
"nullPointMode": "connected", "nullPointMode": "connected",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -21927,21 +22108,22 @@ items:
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "sort_desc(sum(container_memory_usage_bytes{image!=\"\"}) by (container_name, image))", "expr": "sort_desc(sum(container_memory_usage_bytes{image!=\"\"}) by (pod, image))",
"format": "time_series", "format": "time_series",
"hide": true, "hide": true,
"interval": "10s", "interval": "10s",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ container_name }}", "legendFormat": "{{ pod }}",
"metric": "container_memory_usage:sort_desc", "metric": "container_memory_usage:sort_desc",
"refId": "A", "refId": "A",
"step": 10 "step": 10
}, },
{ {
"expr": "topk(10,sum(container_memory_rss{name=~\".+\"}) by (container_name))", "expr": "topk(10,sum(container_memory_rss{name=~\".+\"}) by (pod))",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ container_name }}", "legendFormat": "{{ pod }}",
"refId": "B" "refId": "B"
} }
], ],
@ -22003,7 +22185,18 @@ items:
"datasource": "prometheus", "datasource": "prometheus",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"grid": { "grid": {
}, },
@ -22013,6 +22206,7 @@ items:
"x": 0, "x": 0,
"y": 47 "y": 47
}, },
"hiddenSeries": false,
"id": 19, "id": 19,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": true,
@ -22036,6 +22230,11 @@ items:
], ],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -22048,8 +22247,9 @@ items:
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "topk(10,sum(rate(container_network_transmit_bytes_total{pod_name=~\".+\"}[5m])) by (pod_name))", "expr": "topk(10,sum(rate(container_network_transmit_bytes_total{pod=~\".+\"}[5m])) by (pod))",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{ pod_name }}", "legendFormat": "{{ pod_name }}",
"refId": "A", "refId": "A",
@ -22059,6 +22259,7 @@ items:
"expr": "rate(container_network_transmit_bytes_total{id=\"/\"}[$interval])", "expr": "rate(container_network_transmit_bytes_total{id=\"/\"}[$interval])",
"format": "time_series", "format": "time_series",
"hide": true, "hide": true,
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "", "legendFormat": "",
"refId": "B", "refId": "B",
@ -22080,7 +22281,6 @@ items:
"sort": 2, "sort": 2,
"value_type": "cumulative" "value_type": "cumulative"
}, },
"transparent": false,
"type": "graph", "type": "graph",
"xaxis": { "xaxis": {
"buckets": null, "buckets": null,
@ -22124,7 +22324,18 @@ items:
"datasource": "prometheus", "datasource": "prometheus",
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"grid": { "grid": {
}, },
@ -22134,6 +22345,7 @@ items:
"x": 12, "x": 12,
"y": 47 "y": 47
}, },
"hiddenSeries": false,
"id": 21, "id": 21,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": true,
@ -22157,6 +22369,11 @@ items:
], ],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -22169,8 +22386,9 @@ items:
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "topk(10,sum(rate(container_network_receive_bytes_total{pod_name=~\".+\"}[5m])) by (pod_name))", "expr": "topk(10,sum(rate(container_network_receive_bytes_total{pod=~\".+\"}[5m])) by (pod))",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{pod_name}}", "legendFormat": "{{pod_name}}",
"refId": "A", "refId": "A",
@ -22201,7 +22419,6 @@ items:
"sort": 2, "sort": 2,
"value_type": "cumulative" "value_type": "cumulative"
}, },
"transparent": false,
"type": "graph", "type": "graph",
"xaxis": { "xaxis": {
"buckets": null, "buckets": null,
@ -22246,7 +22463,18 @@ items:
"decimals": 2, "decimals": 2,
"editable": true, "editable": true,
"error": false, "error": false,
"fieldConfig": {
"defaults": {
"custom": {
}
},
"overrides": [
]
},
"fill": 0, "fill": 0,
"fillGradient": 0,
"grid": { "grid": {
}, },
@ -22256,6 +22484,7 @@ items:
"x": 0, "x": 0,
"y": 54 "y": 54
}, },
"hiddenSeries": false,
"id": 8, "id": 8,
"isNew": true, "isNew": true,
"legend": { "legend": {
@ -22266,7 +22495,7 @@ items:
"min": false, "min": false,
"rightSide": true, "rightSide": true,
"show": true, "show": true,
"sideWidth": 200, "sideWidth": 220,
"sort": "current", "sort": "current",
"sortDesc": true, "sortDesc": true,
"total": false, "total": false,
@ -22278,6 +22507,11 @@ items:
], ],
"nullPointMode": "connected", "nullPointMode": "connected",
"options": {
"dataLinks": [
]
},
"percentage": false, "percentage": false,
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
@ -22337,6 +22571,7 @@ items:
}, },
"yaxes": [ "yaxes": [
{ {
"$$hashKey": "object:1163",
"format": "bytes", "format": "bytes",
"label": null, "label": null,
"logBase": 1, "logBase": 1,
@ -22345,6 +22580,7 @@ items:
"show": true "show": true
}, },
{ {
"$$hashKey": "object:1164",
"format": "short", "format": "short",
"label": null, "label": null,
"logBase": 1, "logBase": 1,
@ -22360,7 +22596,7 @@ items:
} }
], ],
"refresh": "10s", "refresh": "10s",
"schemaVersion": 16, "schemaVersion": 25,
"style": "dark", "style": "dark",
"tags": [ "tags": [
"custom" "custom"