begin overview dashboard

This commit is contained in:
m0duspwnens
2021-07-21 11:26:02 -04:00
parent 47d82b3d35
commit f4d3e13c7f
5 changed files with 210 additions and 4 deletions

View File

@@ -54,8 +54,8 @@
},
"timezone": "browser",
"title": "Detailed {{ NODETYPE }}",
{% if NODETYPE | lower in 'standalone' %}
"uid": "{{ UID }}",
{% if NODETYPE | lower in 'overview' %}
"uid": "so_overview",
{% endif %}
"version": 1
}

View File

@@ -25,6 +25,29 @@ grafana:
# enterprise:
# license_path: /opt/so/conf/grafana/etc/files/license.jwt
dashboards:
overview:
templating:
list:
- servername_all
- containers
- manint
- monint
- cpucount
- disk
panels:
row_cpu:
gridPos:
x: 0
y: 0
h: 1
w: 24
cpu_usage_current_graph:
gridPos:
x: 0
y: 1
h: 8
w: 24
standalone:
templating:
list:

View File

@@ -14,7 +14,7 @@
{% set nodeTypes = ['eval'] %}
{% else %}
{#% set nodeTypes = ['standalone', 'manager', 'managersearch', 'sensortab', 'searchnode'] %#}
{% set nodeTypes = ['standalone', 'sensor', 'searchnode', 'manager', 'managersearch', 'heavynode'] %}
{% set nodeTypes = ['overview', 'standalone', 'sensor', 'searchnode', 'manager', 'managersearch', 'heavynode'] %}
{% endif %}
{% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] or (grains.role == 'so-eval' and GRAFANA == 1) %}
@@ -95,7 +95,6 @@ detailed-{{nodeType}}-dashboard:
- template: jinja
- source: salt://grafana/dashboards/common_template.json.jinja
- defaults:
UID: so_overview
PANELS: {{GRAFANA_SETTINGS.dashboards[nodeType].panels}}
TEMPLATES: {{GRAFANA_SETTINGS.dashboards[nodeType].templating.list}}
NODETYPE: {{ nodeType | capitalize }}

View File

@@ -0,0 +1,160 @@
{
"type": "graph",
"title": "CPU Usage",
"gridPos": {
"x": {{ PANELS.cpu_usage_current_graph.gridPos.x }},
"y": {{ PANELS.cpu_usage_current_graph.gridPos.y }},
"w": {{ PANELS.cpu_usage_current_graph.gridPos.w }},
"h": {{ PANELS.cpu_usage_current_graph.gridPos.h }}
},
"id": 69001,
"targets": [
{
"refId": "A",
"queryType": "randomWalk",
"policy": "default",
"resultFormat": "time_series",
"orderByTime": "ASC",
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$servername$/"
},
{
"condition": "AND",
"key": "cpu",
"operator": "=",
"value": "cpu-total"
}
],
"groupBy": [
{
"type": "time",
"params": [
"$__interval"
]
},
{
"type": "tag",
"params": [
"host"
]
},
{
"type": "fill",
"params": [
"null"
]
}
],
"select": [
[
{
"type": "field",
"params": [
"usage_idle"
]
},
{
"type": "mean",
"params": []
},
{
"type": "math",
"params": [
"*-1 + 100"
]
}
]
],
"measurement": "cpu",
"alias": "$tag_host"
}
],
"options": {
"alertThreshold": true
},
"datasource": "InfluxDB",
"fieldConfig": {
"defaults": {
"unit": "percent"
},
"overrides": []
},
"pluginVersion": "7.5.4",
"renderer": "flot",
"yaxes": [
{
"label": null,
"show": true,
"logBase": 1,
"min": "0",
"max": null,
"format": "percent",
"$$hashKey": "object:933"
},
{
"label": null,
"show": true,
"logBase": 1,
"min": null,
"max": null,
"format": "short",
"$$hashKey": "object:934"
}
],
"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": true,
"current": true,
"sort": "current",
"sortDesc": false,
"total": false,
"avg": true,
"alignAsTable": true,
"rightSide": true
},
"nullPointMode": "connected",
"tooltip": {
"value_type": "individual",
"shared": true,
"sort": 2
},
"aliasColors": {},
"seriesOverrides": [],
"thresholds": [],
"timeRegions": [],
"decimals": 1,
"fill": 0,
"fillGradient": 0,
"dashes": false,
"hiddenSeries": false,
"points": false,
"bars": false,
"stack": false,
"percentage": false,
"steppedLine": false,
"timeFrom": null,
"timeShift": null,
"interval": "30",
"maxDataPoints": 750
}

View File

@@ -0,0 +1,24 @@
{
"allValue": null,
"current": {},
"datasource": "InfluxDB",
"definition": "show tag values with key=\"host\"",
"description": "",
"error": null,
"hide": 0,
"includeAll": false,
"label": "Node",
"multi": false,
"name": "servername",
"options": [],
"query": "show tag values with key=\"host\"",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}