Add system info, CPU, memory and disk metrics

Collect basic metrics about the system the controller and hosts run on
including CPU, memory and disk capacity and usage.
This commit is contained in:
Hornwitser committed 2024-01-14 00:42:43 +01:00
1 parent 81d6369a34
commit b46efeb4e3
3 files changed
+128

No files matched your search

+6
View File
@@ -748,6 +748,12 @@ export default class Host extends lib.Link {
metricName: result.metric.name.replace("process_", "clusterio_host_"),
}));
} else if (result.metric.name.startsWith("system_")) {
results.push(lib.serializeResult(result, {
addLabels: { "host_id": String(this.config.get("host.id")) },
metricName: result.metric.name.replace("system_", "clusterio_host_system_"),
}));
} else {
results.push(lib.serializeResult(result));
}