add system uptime graph to overview dash

This commit is contained in:
m0duspwnens
2021-07-21 18:11:42 -04:00
parent a528c5d54b
commit a6630540a4
2 changed files with 177 additions and 17 deletions

View File

@@ -36,109 +36,115 @@ grafana:
- cpucount
- disk
panels:
row_cpu:
system_uptime_graph:
gridPos:
x: 0
y: 0
h: 8
w: 24
row_cpu:
gridPos:
x: 0
y: 8
h: 1
w: 24
cpu_usage_current_graph:
gridPos:
x: 0
y: 1
y: 8
h: 8
w: 24
io_wait_graph:
gridPos:
x: 0
y: 9
y: 17
h: 8
w: 24
cpu_usage_tasks_running_graph:
gridPos:
x: 0
y: 17
y: 25
h: 8
w: 24
cpu_usage_tasks_zombies_graph:
gridPos:
x: 0
y: 25
y: 33
h: 8
w: 12
cpu_usage_tasks_stopped_graph:
gridPos:
x: 12
y: 25
y: 33
h: 8
w: 12
cpu_usage_tasks_sleeping_graph:
gridPos:
x: 0
y: 33
y: 41
h: 8
w: 12
cpu_usage_tasks_blocked_graph:
gridPos:
x: 12
y: 33
y: 41
h: 8
w: 12
cpu_usage_tasks_paging_graph:
gridPos:
x: 0
y: 41
y: 49
h: 8
w: 12
cpu_usage_tasks_unknown_graph:
gridPos:
x: 12
y: 41
y: 49
h: 8
w: 12
row_memory:
gridPos:
x: 0
y: 49
y: 57
h: 1
w: 24
memory_usage_percent_graph:
gridPos:
x: 0
y: 50
y: 58
h: 8
w: 24
row_swap:
gridPos:
x: 0
y: 58
y: 64
h: 1
w: 24
swap_usage_percent_graph:
gridPos:
x: 0
y: 59
y: 65
h: 8
w: 24
row_network:
gridPos:
x: 0
y: 67
y: 73
h: 1
w: 24
management_interface_traffic_inbound_graph:
gridPos:
x: 0
y: 68
y: 74
h: 8
w: 24
management_interface_traffic_outbound_graph:
gridPos:
x: 0
y: 76
y: 82
h: 8
w: 24

View File

@@ -0,0 +1,154 @@
{
"type": "graph",
"title": "System Uptime",
"gridPos": {
"x": {{ PANELS.system_uptime_graph.gridPos.x }},
"y": {{ PANELS.system_uptime_graph.gridPos.y }},
"w": {{ PANELS.system_uptime_graph.gridPos.w }},
"h": {{ PANELS.system_uptime_graph.gridPos.h }}
},
"id": 69016,
"targets": [
{
"refId": "A",
"queryType": "randomWalk",
"policy": "default",
"resultFormat": "time_series",
"orderByTime": "ASC",
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "role",
"operator": "=~",
"value": "/^$role$/"
}
],
"groupBy": [
{
"type": "time",
"params": [
"$__interval"
]
},
{
"type": "tag",
"params": [
"host"
]
},
{
"type": "tag",
"params": [
"role"
]
},
{
"type": "fill",
"params": [
"null"
]
}
],
"select": [
[
{
"type": "field",
"params": [
"uptime"
]
},
{
"type": "last",
"params": []
}
]
],
"measurement": "system",
"alias": "$tag_host $tag_role"
}
],
"options": {
"alertThreshold": true
},
"datasource": "InfluxDB",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"pluginVersion": "7.5.4",
"renderer": "flot",
"yaxes": [
{
"label": "",
"show": true,
"logBase": 1,
"min": "0",
"max": "604800",
"format": "s",
"$$hashKey": "object:213",
"decimals": 1
},
{
"label": null,
"show": true,
"logBase": 1,
"min": null,
"max": null,
"format": "short",
"$$hashKey": "object:214"
}
],
"xaxis": {
"show": true,
"mode": "time",
"name": null,
"values": [],
"buckets": null
},
"yaxis": {
"align": false,
"alignLevel": null
},
"lines": true,
"linewidth": 1,
"dashLength": 10,
"spaceLength": 10,
"pointradius": 2,
"legend": {
"show": true,
"values": true,
"min": false,
"max": false,
"current": true,
"total": false,
"avg": false,
"alignAsTable": true,
"rightSide": true
},
"nullPointMode": "connected",
"tooltip": {
"value_type": "individual",
"shared": true,
"sort": 1
},
"aliasColors": {},
"seriesOverrides": [],
"thresholds": [],
"timeRegions": [],
"fill": 0,
"fillGradient": 0,
"dashes": false,
"hiddenSeries": false,
"points": false,
"bars": false,
"stack": false,
"percentage": false,
"steppedLine": false,
"decimals": 1,
"description": ""
}