add docker container network usage graphs

This commit is contained in:
m0duspwnens
2021-07-12 14:18:54 -04:00
parent 19d9258717
commit 8491ffde07
9 changed files with 13477 additions and 36 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -133,42 +133,39 @@ grafana:
y: 9
h: 1
w: 24
cpu_docker_combined_current:
cpu_docker_combined_current_graph:
gridPos:
x: 0
y: 10
h: 8
w: 24
cpu_docker_combined_trend:
cpu_docker_combined_trend_graph:
gridPos:
x: 0
y: 18
h: 8
w: 24
memory_used_docker_combined_current:
memory_used_docker_combined_current_graph:
gridPos:
x: 0
y: 26
h: 8
w: 24
memory_used_docker_combined_trend:
memory_used_docker_combined_trend_graph:
gridPos:
x: 0
y: 34
h: 8
w: 24
# cpu_usage_idle:
# enabled: true
# trend: true
# gridPos:
# h: 10
# w: 20
# x: 0
# y: 0
# cpu_usage_tasks: {}
# disk_io: {}
# disk_used_root: {}
# disk_used_nsm: {}
# elasticsearch_cpu_usage: {}
# elasticsearch_documents_count: {}
# elasticsearch_field_data_cache_size: {}
network_usage_docker_combined_current_graph:
gridPos:
x: 0
y: 42
h: 8
w: 24
network_usage_docker_combined_trend_graph:
gridPos:
x: 0
y: 50
h: 8
w: 24

View File

@@ -2,10 +2,10 @@
"type": "graph",
"title": "Container CPU Usage Current",
"gridPos": {
"x": {{ PANELS.cpu_docker_combined_current.gridPos.x }},
"y": {{ PANELS.cpu_docker_combined_current.gridPos.y }},
"w": {{ PANELS.cpu_docker_combined_current.gridPos.w }},
"h": {{ PANELS.cpu_docker_combined_current.gridPos.h }}
"x": {{ PANELS.cpu_docker_combined_current_graph.gridPos.x }},
"y": {{ PANELS.cpu_docker_combined_current_graph.gridPos.y }},
"w": {{ PANELS.cpu_docker_combined_current_graph.gridPos.w }},
"h": {{ PANELS.cpu_docker_combined_current_graph.gridPos.h }}
},
"id": 100,
"targets": [

View File

@@ -2,10 +2,10 @@
"type": "graph",
"title": "Container CPU Usage Trend",
"gridPos": {
"x": {{ PANELS.cpu_docker_combined_trend.gridPos.x }},
"y": {{ PANELS.cpu_docker_combined_trend.gridPos.y }},
"w": {{ PANELS.cpu_docker_combined_trend.gridPos.w }},
"h": {{ PANELS.cpu_docker_combined_trend.gridPos.h }}
"x": {{ PANELS.cpu_docker_combined_trend_graph.gridPos.x }},
"y": {{ PANELS.cpu_docker_combined_trend_graph.gridPos.y }},
"w": {{ PANELS.cpu_docker_combined_trend_graph.gridPos.w }},
"h": {{ PANELS.cpu_docker_combined_trend_graph.gridPos.h }}
},
"id": 101,
"targets": [

View File

@@ -90,7 +90,7 @@
]
}
],
"title": "5 Minute Load Average",
"title": "5 Minute Load Average - $cpucount Cores",
"type": "stat",
"options": {
"reduceOptions": {

View File

@@ -2,10 +2,10 @@
"type": "graph",
"title": "Container Memory Usage Current",
"gridPos": {
"x": {{ PANELS.memory_used_docker_combined_current.gridPos.x }},
"y": {{ PANELS.memory_used_docker_combined_current.gridPos.y }},
"w": {{ PANELS.memory_used_docker_combined_current.gridPos.w }},
"h": {{ PANELS.memory_used_docker_combined_current.gridPos.h }}
"x": {{ PANELS.memory_used_docker_combined_current_graph.gridPos.x }},
"y": {{ PANELS.memory_used_docker_combined_current_graph.gridPos.y }},
"w": {{ PANELS.memory_used_docker_combined_current_graph.gridPos.w }},
"h": {{ PANELS.memory_used_docker_combined_current_graph.gridPos.h }}
},
"id": 102,
"targets": [

View File

@@ -2,10 +2,10 @@
"type": "graph",
"title": "Container Memory Usage Trend",
"gridPos": {
"x": {{ PANELS.memory_used_docker_combined_trend.gridPos.x }},
"y": {{ PANELS.memory_used_docker_combined_trend.gridPos.y }},
"w": {{ PANELS.memory_used_docker_combined_trend.gridPos.w }},
"h": {{ PANELS.memory_used_docker_combined_trend.gridPos.h }}
"x": {{ PANELS.memory_used_docker_combined_trend_graph.gridPos.x }},
"y": {{ PANELS.memory_used_docker_combined_trend_graph.gridPos.y }},
"w": {{ PANELS.memory_used_docker_combined_trend_graph.gridPos.w }},
"h": {{ PANELS.memory_used_docker_combined_trend_graph.gridPos.h }}
},
"id": 103,
"targets": [

View File

@@ -0,0 +1,231 @@
{
"aliasColors": {},
"dashLength": 10,
"datasource": "InfluxDB",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"gridPos": {
"x": {{ PANELS.network_usage_docker_combined_current_graph.gridPos.x }},
"y": {{ PANELS.network_usage_docker_combined_current_graph.gridPos.y }},
"w": {{ PANELS.network_usage_docker_combined_current_graph.gridPos.w }},
"h": {{ PANELS.network_usage_docker_combined_current_graph.gridPos.h }}
},
"id": 61868,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"pluginVersion": "7.5.4",
"pointradius": 2,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"targets": [
{
"alias": "$tag_container_name RX",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"container_name"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "default",
"queryType": "randomWalk",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"type": "field",
"params": [
"rx_bytes"
]
},
{
"type": "mean",
"params": []
},
{
"type": "non_negative_derivative",
"params": [
"1s"
]
},
{
"type": "math",
"params": [
"*8"
]
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=~",
"value": "/^$containers$/"
}
]
},
{
"alias": "$tag_container_name TX",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"container_name"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "default",
"queryType": "randomWalk",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"type": "field",
"params": [
"tx_bytes"
]
},
{
"type": "mean",
"params": []
},
{
"type": "non_negative_derivative",
"params": [
"1s"
]
},
{
"type": "math",
"params": [
"*8"
]
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=~",
"value": "/^$containers$/"
}
],
"hide": false
}
],
"thresholds": [],
"timeRegions": [],
"title": "Container Network Usage Current",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:315",
"format": "bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:316",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
},
"bars": false,
"dashes": false,
"decimals": null,
"fillGradient": 0,
"hiddenSeries": false,
"percentage": false,
"points": false,
"stack": false,
"steppedLine": false,
"timeFrom": null,
"timeShift": null,
"description": ""
}

View File

@@ -0,0 +1,231 @@
{
"aliasColors": {},
"dashLength": 10,
"datasource": "InfluxDB",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"gridPos": {
"x": {{ PANELS.network_usage_docker_combined_trend_graph.gridPos.x }},
"y": {{ PANELS.network_usage_docker_combined_trend_graph.gridPos.y }},
"w": {{ PANELS.network_usage_docker_combined_trend_graph.gridPos.w }},
"h": {{ PANELS.network_usage_docker_combined_trend_graph.gridPos.h }}
},
"id": 61461,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"pluginVersion": "7.5.4",
"pointradius": 2,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"targets": [
{
"alias": "$tag_container_name RX",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"container_name"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "so_long_term",
"queryType": "randomWalk",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"type": "field",
"params": [
"rx_bytes"
]
},
{
"type": "mean",
"params": []
},
{
"type": "non_negative_derivative",
"params": [
"1s"
]
},
{
"type": "math",
"params": [
"*8"
]
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=~",
"value": "/^$containers$/"
}
]
},
{
"alias": "$tag_container_name TX",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"container_name"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "so_long_term",
"queryType": "randomWalk",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"type": "field",
"params": [
"tx_bytes"
]
},
{
"type": "mean",
"params": []
},
{
"type": "non_negative_derivative",
"params": [
"1s"
]
},
{
"type": "math",
"params": [
"*8"
]
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=~",
"value": "/^$containers$/"
}
],
"hide": false
}
],
"thresholds": [],
"timeRegions": [],
"title": "Container Network Usage Trend",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:315",
"format": "bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:316",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
},
"bars": false,
"dashes": false,
"decimals": null,
"fillGradient": 0,
"hiddenSeries": false,
"percentage": false,
"points": false,
"stack": false,
"steppedLine": false,
"timeFrom": null,
"timeShift": null,
"description": ""
}