mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-21 04:24:30 +00:00
fix: parse Block I/O and Network I/O stats to numeric MB so monitoring charts render
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { promises } from "node:fs";
|
||||
import { OSUtils } from "node-os-utils";
|
||||
import { paths } from "../constants";
|
||||
import { parseIoToMb } from "./units";
|
||||
|
||||
export interface Container {
|
||||
BlockIO: string;
|
||||
@@ -28,13 +29,13 @@ export const recordAdvancedStats = async (
|
||||
});
|
||||
|
||||
await updateStatsFile(appName, "block", {
|
||||
readMb: stats.BlockIO.split(" ")[0],
|
||||
writeMb: stats.BlockIO.split(" ")[2],
|
||||
readMb: parseIoToMb(stats.BlockIO.split(" ")[0]),
|
||||
writeMb: parseIoToMb(stats.BlockIO.split(" ")[2]),
|
||||
});
|
||||
|
||||
await updateStatsFile(appName, "network", {
|
||||
inputMb: stats.NetIO.split(" ")[0],
|
||||
outputMb: stats.NetIO.split(" ")[2],
|
||||
inputMb: parseIoToMb(stats.NetIO.split(" ")[0]),
|
||||
outputMb: parseIoToMb(stats.NetIO.split(" ")[2]),
|
||||
});
|
||||
|
||||
if (appName === "dokploy") {
|
||||
|
||||
Reference in New Issue
Block a user