@gazzehamine/armada-watch-agent 1.0.0 → 1.0.1
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/README.md +0 -3
- package/dist/collector.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/collector.js
CHANGED
|
@@ -23,11 +23,11 @@ async function collectMetrics() {
|
|
|
23
23
|
// CPU Usage
|
|
24
24
|
const cpuLoad = await systeminformation_1.default.currentLoad();
|
|
25
25
|
const cpuUsage = cpuLoad.currentLoad;
|
|
26
|
-
// Memory Usage
|
|
26
|
+
// Memory Usage (excluding buffers/cache)
|
|
27
27
|
const mem = await systeminformation_1.default.mem();
|
|
28
|
-
const memoryUsage = (mem.
|
|
28
|
+
const memoryUsage = ((mem.total - mem.available) / mem.total) * 100;
|
|
29
29
|
const memoryTotal = mem.total;
|
|
30
|
-
const memoryUsed = mem.
|
|
30
|
+
const memoryUsed = mem.total - mem.available;
|
|
31
31
|
// Disk Usage
|
|
32
32
|
const fsSize = await systeminformation_1.default.fsSize();
|
|
33
33
|
const mainDisk = fsSize[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gazzehamine/armada-watch-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Monitoring agent for Armada Watch - EC2 instance monitoring",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/armadadelivery/armada-watch.git",
|
|
28
28
|
"directory": "agent"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|