Improve graphs (#19)

This commit is contained in:
Patrick Stevens
2023-10-01 22:28:47 +01:00
committed by GitHub
parent 713401546a
commit e9f72f7acd

View File

@@ -62,6 +62,7 @@
} }
}, },
"mappings": [], "mappings": [],
"min": 0,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@@ -75,7 +76,7 @@
} }
] ]
}, },
"unit": "d" "unit": "none"
}, },
"overrides": [] "overrides": []
}, },
@@ -85,7 +86,7 @@
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"id": 10, "id": 11,
"options": { "options": {
"legend": { "legend": {
"calcs": [], "calcs": [],
@@ -105,13 +106,14 @@
"uid": "P40645DF18AF953B4" "uid": "P40645DF18AF953B4"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "domain_expiry_days", "expr": "sum by(state) (node_systemd_unit_state)",
"legendFormat": "{{domain}}", "instant": false,
"legendFormat": "{{state}}",
"range": true, "range": true,
"refId": "A" "refId": "A"
} }
], ],
"title": "Domain expiry time", "title": "Systemd state",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -234,6 +236,8 @@
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"axisSoftMax": 3650,
"axisSoftMin": 0,
"barAlignment": 0, "barAlignment": 0,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
@@ -273,7 +277,7 @@
} }
] ]
}, },
"unit": "none" "unit": "d"
}, },
"overrides": [] "overrides": []
}, },
@@ -283,7 +287,7 @@
"x": 0, "x": 0,
"y": 8 "y": 8
}, },
"id": 9, "id": 10,
"options": { "options": {
"legend": { "legend": {
"calcs": [], "calcs": [],
@@ -303,13 +307,13 @@
"uid": "P40645DF18AF953B4" "uid": "P40645DF18AF953B4"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "rate(nginx_http_requests_total[5m])", "expr": "domain_expiry_days",
"legendFormat": "{{instance}}", "legendFormat": "{{domain}}",
"range": true, "range": true,
"refId": "A" "refId": "A"
} }
], ],
"title": "Nginx HTTP requests/5min", "title": "Domain expiry time",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -409,7 +413,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "P40645DF18AF953B4" "uid": "P40645DF18AF953B4"
}, },
"description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@@ -458,7 +461,8 @@
"value": 80 "value": 80
} }
] ]
} },
"unit": "none"
}, },
"overrides": [] "overrides": []
}, },
@@ -468,7 +472,7 @@
"x": 0, "x": 0,
"y": 16 "y": 16
}, },
"id": 5, "id": 9,
"options": { "options": {
"legend": { "legend": {
"calcs": [], "calcs": [],
@@ -488,15 +492,13 @@
"uid": "P40645DF18AF953B4" "uid": "P40645DF18AF953B4"
}, },
"editorMode": "builder", "editorMode": "builder",
"exemplar": false, "expr": "rate(nginx_http_requests_total[5m])",
"expr": "rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])", "legendFormat": "{{instance}}",
"hide": false,
"legendFormat": "{{mode}}",
"range": true, "range": true,
"refId": "A" "refId": "A"
} }
], ],
"title": "CPU usage", "title": "Nginx HTTP requests/5min",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -607,6 +609,101 @@
"title": "Free disk", "title": "Free disk",
"type": "timeseries" "type": "timeseries"
}, },
{
"datasource": {
"type": "prometheus",
"uid": "P40645DF18AF953B4"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "P40645DF18AF953B4"
},
"editorMode": "builder",
"exemplar": false,
"expr": "rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])",
"hide": false,
"legendFormat": "{{mode}}",
"range": true,
"refId": "A"
}
],
"title": "CPU usage",
"type": "timeseries"
},
{ {
"datasource": { "datasource": {
"type": "datasource", "type": "datasource",
@@ -616,7 +713,7 @@
"h": 3, "h": 3,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 24 "y": 32
}, },
"id": 1, "id": 1,
"targets": [ "targets": [
@@ -639,12 +736,14 @@
"h": 15, "h": 15,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 27 "y": 35
}, },
"id": 3, "id": 3,
"links": [], "links": [],
"options": { "options": {
"folderId": 0, "folderId": 0,
"includeVars": false,
"keepTime": false,
"maxItems": 30, "maxItems": 30,
"query": "", "query": "",
"showHeadings": true, "showHeadings": true,
@@ -653,7 +752,7 @@
"showStarred": true, "showStarred": true,
"tags": [] "tags": []
}, },
"pluginVersion": "9.5.2", "pluginVersion": "10.0.2",
"tags": [], "tags": [],
"targets": [ "targets": [
{ {
@@ -676,7 +775,7 @@
"h": 15, "h": 15,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 27 "y": 35
}, },
"id": 4, "id": 4,
"links": [], "links": [],
@@ -697,7 +796,7 @@
"type": "news" "type": "news"
} }
], ],
"refresh": false, "refresh": "",
"schemaVersion": 38, "schemaVersion": 38,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
@@ -705,8 +804,8 @@
"list": [] "list": []
}, },
"time": { "time": {
"from": "2023-07-22T01:55:10.667Z", "from": "now-12h",
"to": "2023-07-23T01:55:10.667Z" "to": "now"
}, },
"timepicker": { "timepicker": {
"hidden": true, "hidden": true,
@@ -738,6 +837,6 @@
"timezone": "browser", "timezone": "browser",
"title": "Node", "title": "Node",
"uid": "d872af8a-0e64-4b22-8d97-7db77958960b", "uid": "d872af8a-0e64-4b22-8d97-7db77958960b",
"version": 1, "version": 4,
"weekStart": "" "weekStart": ""
} }