1084 lines
26 KiB
Plaintext
Raw Normal View History

2023-07-24 14:26:57 +02:00
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "Docker monitoring with Prometheus and cAdvisor",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 193,
"graphTooltip": 1,
"id": 19,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 20
},
{
"color": "red",
"value": 30
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 0,
"y": 0
},
"id": 7,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "background",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "count(container_last_seen{instance=~\"$host\",image!=\"\"})",
"interval": "",
"intervalFactor": 2,
"legendFormat": "",
"metric": "container_last_seen",
"refId": "A",
"step": 240
}
],
"title": "Total Running containers",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 80
},
{
"color": "red",
"value": 90
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 8,
"y": 0
},
"id": 5,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "background",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(1 - (node_memory_MemAvailable_bytes{instance=~\"$host\"} / (node_memory_MemTotal_bytes{instance=~\"$host\"})))* 100",
"interval": "",
"intervalFactor": 2,
"legendFormat": "",
"metric": "container_memory_usage_bytes",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Total Memory Usage",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 60
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 16,
"y": 0
},
"id": 6,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "background",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "sum(rate(container_cpu_user_seconds_total{instance=~\"$host\",name=~\"$container\",image!=\"\"}[5m]) * 100)",
"interval": "",
"intervalFactor": 2,
"legendFormat": "",
"metric": "container_memory_usage_bytes",
"refId": "A",
"step": 240
}
],
"title": "Total CPU Usage",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 5
},
"id": 2,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Last *",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-beta1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "rate(container_cpu_user_seconds_total{instance=~\"$host\",name=~\"$container\",image!=\"\"}[5m]) * 100",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "cpu",
"refId": "A",
"step": 10
}
],
"title": "CPU Usage per Container",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 12
},
"id": 1,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Last *",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-beta1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "container_memory_usage_bytes{instance=~\"$host\",name=~\"$container\",image!=\"\"}",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "container_memory_usage_bytes",
"refId": "A",
"step": 10
}
],
"title": "Memory Usage per Container",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "Bps"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 19
},
"id": 3,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-beta1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "irate(container_network_receive_bytes_total{instance=~\"$host\",name=~\"$container\",image!=\"\"}[5m])",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "container_network_receive_bytes_total",
"refId": "A",
"step": 20
}
],
"title": "Network Rx per Container",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "Bps"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 19
},
"id": 4,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-beta1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"expr": "irate(container_network_transmit_bytes_total{instance=~\"$host\",name=~\"$container\",image!=\"\"}[5m])",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"refId": "A",
"step": 20
}
],
"title": "Network Tx per Container",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 26
},
"id": 13,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.3.0-beta1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(container_memory_swap{instance=~\"$host\",name=~\"$container\",image!=\"\"}) by (name)",
"hide": false,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Memory Swap per Container",
"type": "timeseries"
},
{
"columns": [
{
"$$hashKey": "object:464",
"text": "Current",
"value": "current"
}
],
"datasource": {
"type": "prometheus",
"uid": ""
},
"editable": true,
"error": false,
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 6,
"x": 12,
"y": 26
},
"id": 9,
"links": [],
"scroll": true,
"showHeader": true,
"sort": {
"col": 1,
"desc": true
},
"styles": [
{
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [
"80",
"90"
],
"type": "number",
"unit": "percent"
}
],
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(100 - ((container_spec_memory_limit_bytes{instance=~\"$host\",name=~\".+\"} - container_memory_usage_bytes{instance=~\"$host\",name=~\".+\"}) * 100 / container_spec_memory_limit_bytes{instance=~\"$host\",name=~\".+\"}) ) by (name) ",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "",
"range": true,
"refId": "A",
"step": 240
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(container_spec_memory_limit_bytes{instance=~\"$host\",name=~\".+\"}) by (name) ",
"hide": true,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"range": true,
"refId": "B",
"step": 240
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "container_memory_usage_bytes{instance=~\"$host\",name=~\".+\"}",
"hide": true,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"range": true,
"refId": "C",
"step": 240
}
],
"title": "Remaining memory per Container",
"transform": "timeseries_aggregations",
"type": "table-old"
},
{
"columns": [
{
"$$hashKey": "object:504",
"text": "Current",
"value": "current"
}
],
"datasource": {
"type": "prometheus",
"uid": ""
},
"editable": true,
"error": false,
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 26
},
"id": 11,
"links": [],
"scroll": true,
"showHeader": true,
"sort": {
"col": 1,
"desc": true
},
"styles": [
{
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [
"10000000",
" 25000000"
],
"type": "number",
"unit": "decbytes"
}
],
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(container_spec_memory_limit_bytes{instance=~\"$host\",name=~\".+\"} - container_memory_usage_bytes{instance=~\"$host\",name=~\".+\"}) by (name) ",
"hide": true,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "",
"range": true,
"refId": "A",
"step": 240
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "sum(container_spec_memory_limit_bytes{instance=~\"$host\",name=~\".+\"}) by (name) ",
"hide": false,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"range": true,
"refId": "B",
"step": 240
},
{
"datasource": {
"type": "prometheus",
"uid": ""
},
"editorMode": "code",
"expr": "container_memory_usage_bytes{instance=~\"$host\",name=~\".+\"}",
"hide": true,
"intervalFactor": 2,
"legendFormat": "{{name}}",
"range": true,
"refId": "C",
"step": 240
}
],
"title": "Limit memory per Container",
"transform": "timeseries_aggregations",
"type": "table-old"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"docker"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": ""
},
"definition": "label_values(container_last_seen, instance)",
"hide": 0,
"includeAll": true,
"label": "Host",
"multi": false,
"name": "host",
"options": [],
"query": {
"query": "label_values(container_last_seen, instance)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "{{ grafana_dashboard_regex | default('') }}",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": ""
},
"definition": "label_values(container_tasks_state, name)",
"hide": 0,
"includeAll": true,
"label": "Container",
"multi": true,
"name": "container",
"options": [],
"query": {
"query": "label_values(container_tasks_state, name)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Docker",
"uid": "x_2OaKEGk",
"version": 16,
"weekStart": ""
}