@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.
- package/agent.js +3 -5
- 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
|
|
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 {
|