@bitcall/pm2-pulse-agent 1.3.0 → 1.3.3

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.
Files changed (2) hide show
  1. package/agent.js +3 -5
  2. package/package.json +1 -1
package/agent.js CHANGED
@@ -6,17 +6,15 @@ const { exec } = require('child_process')
6
6
  const grpc = require('@grpc/grpc-js')
7
7
  const protoLoader = require('@grpc/proto-loader')
8
8
  require('dotenv').config()
9
-
10
- // Fixed agent defaults (only token + thresholds are configurable)
9
+
11
10
  const DEFAULT_SERVER = 'localhost:50051'
12
11
  const DEFAULT_VPS_ID = 'server-' + os.hostname()
13
- const DEFAULT_CHECK_INTERVAL = 10 // seconds (accurate CPU measurement)
12
+ const DEFAULT_CHECK_INTERVAL = 10
14
13
  const DEFAULT_CPU_THRESHOLD = 70
15
14
  const DEFAULT_RAM_THRESHOLD = 80
16
15
  const DEFAULT_DISK_THRESHOLD = 85
17
16
  const DEFAULT_AUTH_TOKEN = process.env.AUTH_TOKEN || ''
18
-
19
- // Load proto from package directory
17
+
20
18
  const PROTO_PATH = path.join(__dirname, 'monitoring.proto')
21
19
 
22
20
  class MonitoringAgent {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitcall/pm2-pulse-agent",
3
- "version": "1.3.0",
3
+ "version": "1.3.3",
4
4
  "description": "PM2 monitoring agent that tracks server metrics and sends alerts via gRPC",
5
5
  "main": "agent.js",
6
6
  "bin": {