@oneuptime/common 7.0.2711 → 7.0.2721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Types/Infrastructure/BasicMetrics.ts +1 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.ts +2 -0
- package/Utils/Memory.ts +9 -0
- package/Utils/Number.ts +5 -0
- package/build/dist/Utils/Memory.js +9 -0
- package/build/dist/Utils/Memory.js.map +1 -0
- package/build/dist/Utils/Number.js +6 -0
- package/build/dist/Utils/Number.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,8 +9,10 @@ export interface ServerProcess {
|
|
|
9
9
|
|
|
10
10
|
export default interface ServerMonitorResponse {
|
|
11
11
|
monitorId: ObjectID;
|
|
12
|
+
hostname: string; // Hostname of the server
|
|
12
13
|
basicInfrastructureMetrics?: BasicInfrastructureMetrics | undefined;
|
|
13
14
|
requestReceivedAt: Date;
|
|
14
15
|
onlyCheckRequestReceivedAt: boolean;
|
|
15
16
|
processes?: ServerProcess[] | undefined;
|
|
17
|
+
failureCause?: string | undefined;
|
|
16
18
|
}
|
package/Utils/Memory.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import NumberUtil from "./Number";
|
|
2
|
+
|
|
3
|
+
export default class MemoryUtil {
|
|
4
|
+
public static convertToGb(memoryInBytes: number): number {
|
|
5
|
+
const gb: number = memoryInBytes / 1024 / 1024 / 1024;
|
|
6
|
+
//return two decimal places
|
|
7
|
+
return NumberUtil.convertToTwoDecimalPlaces(gb);
|
|
8
|
+
}
|
|
9
|
+
}
|
package/Utils/Number.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import NumberUtil from "./Number";
|
|
2
|
+
export default class MemoryUtil {
|
|
3
|
+
static convertToGb(memoryInBytes) {
|
|
4
|
+
const gb = memoryInBytes / 1024 / 1024 / 1024;
|
|
5
|
+
//return two decimal places
|
|
6
|
+
return NumberUtil.convertToTwoDecimalPlaces(gb);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Memory.js","sourceRoot":"","sources":["../../../Utils/Memory.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,UAAU,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,UAAU;IACtB,MAAM,CAAC,WAAW,CAAC,aAAqB;QAC7C,MAAM,EAAE,GAAW,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QACtD,2BAA2B;QAC3B,OAAO,UAAU,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Number.js","sourceRoot":"","sources":["../../../Utils/Number.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,UAAU;IACtB,MAAM,CAAC,yBAAyB,CAAC,KAAa;QACnD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IACvC,CAAC;CACF"}
|