Update dash. Add smartmon to readme.
parent
95ca4f0eef
commit
067be8ec83
|
@ -214,7 +214,7 @@
|
|||
"uid": "PBFA97CFB590B2093"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "repos_seen{job=\"db\"}",
|
||||
"expr": "repos_fully_indexed{job=\"db\"}",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true,
|
||||
|
@ -236,26 +236,85 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "h",
|
||||
"unit": "s",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 7,
|
||||
"w": 3,
|
||||
"x": 17,
|
||||
"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": "(6000000-repos_fully_indexed{job=\"db\"})/rate(repos_fully_indexed{job=\"db\"}[$rate_interval])",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Time to 6 milion users",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "PBFA97CFB590B2093"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "purple",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 4,
|
||||
"x": 20,
|
||||
"y": 0
|
||||
},
|
||||
"id": 24,
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
|
@ -281,7 +340,7 @@
|
|||
"uid": "PBFA97CFB590B2093"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "10000000/(rate(repos_fully_indexed{job=\"db\"}[$rate_interval])*60*60)",
|
||||
"expr": "(10000000-repos_fully_indexed{job=\"db\"})/rate(repos_fully_indexed{job=\"db\"}[$rate_interval])",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true,
|
||||
|
@ -1062,6 +1121,6 @@
|
|||
"timezone": "",
|
||||
"title": "Bsky Statistics",
|
||||
"uid": "aXw6dQhSas",
|
||||
"version": 3,
|
||||
"version": 6,
|
||||
"weekStart": ""
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -56,7 +56,7 @@ After=network-online.target
|
|||
User=node_exporter
|
||||
Group=node_exporter
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/node_exporter
|
||||
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory=/var/lib/prometheus/node-exporter/
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
|
@ -99,6 +99,38 @@ Check if your SSD is compatible (your device name may differ, mine is /dev/sda)
|
|||
Enable SMART on your SSD
|
||||
`sudo smartctl -s on /dev/sda`
|
||||
|
||||
Check smartmon is configured correctly
|
||||
`sudo nano /lib/systemd/system/prometheus-node-exporter-smartmon.service`
|
||||
|
||||
It should be like this:
|
||||
```
|
||||
[Unit]
|
||||
Description=Collect SMART metrics for prometheus-node-exporter
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=TMPDIR=/var/lib/prometheus/node-exporter
|
||||
ExecStart=/bin/bash -c "/usr/share/prometheus-node-exporter-collectors/smartmon.sh | sponge /var/lib/prometheus/node-exporter/smartmon.prom"
|
||||
```
|
||||
|
||||
Start the service
|
||||
`systemctl start prometheus-node-exporter-smartmon.service`
|
||||
|
||||
Open node exporter
|
||||
`sudo nano /etc/systemd/system/node_exporter.service`
|
||||
|
||||
Check it contains the `--collector.textfile.directory` parameter
|
||||
```
|
||||
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory=/var/lib/prometheus/node-exporter/
|
||||
```
|
||||
|
||||
Start the smartmon service
|
||||
`systemctl start prometheus-node-exporter-smartmon.service`
|
||||
|
||||
Check the file contains correct metrics
|
||||
`nano /var/lib/prometheus/node-exporter/smartmon.prom`
|
||||
|
||||
Restart the node exporter
|
||||
`sudo systemctl restart node_exporter`
|
||||
|
||||
`systemctl start prometheus-node-exporter-smartmon.service`
|
||||
Metrics should display on `http://localhost:9100/metrics`
|
Loading…
Reference in New Issue