Update dash, added smartmon

main
mathan 2024-02-25 09:05:48 -08:00
parent b9b3159828
commit 95abc3691f
4 changed files with 4204 additions and 3677 deletions

View File

@ -808,7 +808,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@ -909,7 +910,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@ -1022,9 +1024,29 @@
"selected": true, "selected": true,
"text": "1d", "text": "1d",
"value": "1d" "value": "1d"
},
{
"selected": false,
"text": "2d",
"value": "2d"
},
{
"selected": false,
"text": "7d",
"value": "7d"
},
{
"selected": false,
"text": "14d",
"value": "14d"
},
{
"selected": false,
"text": "30d",
"value": "30d"
} }
], ],
"query": "1m,5m,10m,30m,1h,6h,12h,1d", "query": "1m,5m,10m,30m,1h,6h,12h,1d,2d,7d,14d,30d",
"queryValue": "", "queryValue": "",
"refresh": 2, "refresh": 2,
"skipUrlSync": false, "skipUrlSync": false,
@ -1040,6 +1062,6 @@
"timezone": "", "timezone": "",
"title": "Bsky Statistics", "title": "Bsky Statistics",
"uid": "aXw6dQhSas", "uid": "aXw6dQhSas",
"version": 2, "version": 3,
"weekStart": "" "weekStart": ""
} }

View File

@ -64,7 +64,7 @@
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
"w": 3, "w": 2,
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
@ -559,8 +559,8 @@
}, },
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 9, "w": 7,
"x": 3, "x": 2,
"y": 0 "y": 0
}, },
"id": 10, "id": 10,
@ -569,7 +569,7 @@
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": false
}, },
"tooltip": { "tooltip": {
"mode": "multi", "mode": "multi",
@ -620,7 +620,7 @@
"expr": "sum by(instance) (node_network_receive_bytes_total{instance=\"host.docker.internal:9100\", job=\"node\"})", "expr": "sum by(instance) (node_network_receive_bytes_total{instance=\"host.docker.internal:9100\", job=\"node\"})",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "Total trafic", "legendFormat": "Total traffic",
"range": true, "range": true,
"refId": "C" "refId": "C"
} }
@ -671,7 +671,7 @@
"gridPos": { "gridPos": {
"h": 4, "h": 4,
"w": 3, "w": 3,
"x": 12, "x": 9,
"y": 0 "y": 0
}, },
"id": 25, "id": 25,
@ -735,7 +735,7 @@
"gridPos": { "gridPos": {
"h": 4, "h": 4,
"w": 3, "w": 3,
"x": 15, "x": 12,
"y": 0 "y": 0
}, },
"id": 7, "id": 7,
@ -781,6 +781,9 @@
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "percentage", "mode": "percentage",
@ -790,16 +793,74 @@
"value": null "value": null
}, },
{ {
"color": "yellow", "color": "#EAB839",
"value": 50 "value": 30
},
{
"color": "orange",
"value": 75
}, },
{ {
"color": "red", "color": "red",
"value": 90 "value": 60
}
]
},
"unit": "percent",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 15,
"y": 0
},
"id": 28,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "(sum by(instance) (rate(node_cpu_seconds_total{instance=\"host.docker.internal:9100\",job=\"node\", mode=\"iowait\"}[$rate_interval])) / on(instance) group_left sum by (instance)((rate(node_cpu_seconds_total{instance=\"host.docker.internal:9100\",job=\"node\"}[$rate_interval]))))*100",
"instant": false,
"legendFormat": "Busy Iowait",
"range": true,
"refId": "A"
}
],
"title": "Busy Iowait",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "blue",
"value": null
} }
] ]
}, },
@ -810,7 +871,7 @@
}, },
"gridPos": { "gridPos": {
"h": 4, "h": 4,
"w": 3, "w": 2,
"x": 18, "x": 18,
"y": 0 "y": 0
}, },
@ -873,8 +934,8 @@
}, },
"gridPos": { "gridPos": {
"h": 4, "h": 4,
"w": 3, "w": 2,
"x": 21, "x": 20,
"y": 0 "y": 0
}, },
"id": 26, "id": 26,
@ -902,7 +963,7 @@
"uid": "PBFA97CFB590B2093" "uid": "PBFA97CFB590B2093"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "-10*4*1024*1024*1024*1024/deriv(node_filesystem_free_bytes{mountpoint='/4t'}[$rate_interval])", "expr": "-4*1024*1024*1024*1024/deriv(node_filesystem_free_bytes{mountpoint='/4t'}[$rate_interval])",
"instant": false, "instant": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
@ -912,6 +973,69 @@
"title": "Time to 4TB", "title": "Time to 4TB",
"type": "stat" "type": "stat"
}, },
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
}
]
},
"unit": "s",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 2,
"x": 22,
"y": 0
},
"id": 27,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": true,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "smartmon_total_lbas_written_raw_value{instance=\"host.docker.internal:9100\",disk=\"/dev/sdb\"} * 512 / (1440 * 1024 * 1024 * 1024 * 1024)",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Time to Death",
"type": "stat"
},
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -948,7 +1072,7 @@
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
"w": 3, "w": 2,
"x": 0, "x": 0,
"y": 3 "y": 3
}, },
@ -986,6 +1110,83 @@
"title": "Ram Usage", "title": "Ram Usage",
"type": "gauge" "type": "gauge"
}, },
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "#EAB839",
"value": 25
},
{
"color": "blue",
"value": 50
},
{
"color": "green",
"value": 75
}
]
},
"unit": "repo/h",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 9,
"y": 4
},
"id": 16,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(repos_fully_indexed{job=\"db\"}[$rate_interval])*60*60",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Indexing speed",
"type": "gauge"
},
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -1149,7 +1350,7 @@
}, },
"gridPos": { "gridPos": {
"h": 5, "h": 5,
"w": 3, "w": 2,
"x": 18, "x": 18,
"y": 4 "y": 4
}, },
@ -1194,43 +1395,38 @@
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [], "mappings": [],
"max": 100,
"min": 0,
"thresholds": { "thresholds": {
"mode": "percentage", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "red", "color": "green",
"value": null "value": null
}, },
{ {
"color": "#EAB839", "color": "orange",
"value": 25 "value": 70
}, },
{ {
"color": "blue", "color": "red",
"value": 50 "value": 85
},
{
"color": "green",
"value": 75
} }
] ]
}, },
"unit": "repo/h", "unit": "percent",
"unitScale": true "unitScale": true
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "gridPos": {
"h": 5, "h": 5,
"w": 3, "w": 2,
"x": 21, "x": 20,
"y": 4 "y": 4
}, },
"id": 16, "id": 29,
"options": { "options": {
"minVizHeight": 75, "minVizHeight": 75,
"minVizWidth": 75, "minVizWidth": 75,
@ -1254,14 +1450,86 @@
"uid": "PBFA97CFB590B2093" "uid": "PBFA97CFB590B2093"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(repos_fully_indexed{job=\"db\"}[$rate_interval])*60*60", "expr": "(repos_fully_indexed)/(5000000)*100",
"instant": false, "instant": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "A" "refId": "A"
} }
], ],
"title": "Repo indexing speed", "title": "Indexed/5mil",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "percent",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 2,
"x": 22,
"y": 4
},
"id": 30,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "(repos_fully_indexed)/(10000000)*100",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Indexed/10mil",
"type": "gauge" "type": "gauge"
}, },
{ {
@ -1300,7 +1568,7 @@
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
"w": 3, "w": 2,
"x": 0, "x": 0,
"y": 6 "y": 6
}, },
@ -1413,7 +1681,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true, "showLegend": true,
"width": 0 "width": 0
}, },
@ -1524,7 +1792,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true, "showLegend": true,
"width": 0 "width": 0
}, },
@ -1646,7 +1914,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true "showLegend": true
}, },
"timezone": [ "timezone": [
@ -1928,7 +2196,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
@ -2070,7 +2338,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
@ -2231,7 +2499,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "right",
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
@ -2337,9 +2605,29 @@
"selected": false, "selected": false,
"text": "1d", "text": "1d",
"value": "1d" "value": "1d"
},
{
"selected": false,
"text": "2d",
"value": "2d"
},
{
"selected": false,
"text": "7d",
"value": "7d"
},
{
"selected": false,
"text": "14d",
"value": "14d"
},
{
"selected": false,
"text": "30d",
"value": "30d"
} }
], ],
"query": "1m,5m,10m,30m,1h,6h,12h,1d", "query": "1m,5m,10m,30m,1h,6h,12h,1d,2d,7d,14d,30d",
"queryValue": "", "queryValue": "",
"refresh": 2, "refresh": 2,
"skipUrlSync": false, "skipUrlSync": false,
@ -2355,6 +2643,6 @@
"timezone": "", "timezone": "",
"title": "Bsky indexer", "title": "Bsky indexer",
"uid": "aXw6dQhSzs", "uid": "aXw6dQhSzs",
"version": 2, "version": 8,
"weekStart": "" "weekStart": ""
} }

File diff suppressed because it is too large Load Diff

View File

@ -87,4 +87,18 @@ To allow viewing it on local network:
`cd exporters` `cd exporters`
`sudo ufw allow 9560` `sudo ufw allow 9560`
# Install smartmon
`sudo apt install prometheus-node-exporter-collectors smartmontools`
Check if your SSD is compatible (your device name may differ, mine is /dev/sda)
`sudo smartctl -i /dev/sda`
Enable SMART on your SSD
`sudo smartctl -s on /dev/sda`
`sudo systemctl restart node_exporter`
`systemctl start prometheus-node-exporter-smartmon.service`