@bitcall/pm2-pulse-agent 1.3.4 → 1.4.0
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 -2
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -42,6 +42,7 @@ class MonitoringAgent {
|
|
|
42
42
|
|
|
43
43
|
const credentials = grpc.credentials.createInsecure()
|
|
44
44
|
this.client = new proto.MonitoringService(this.server, credentials)
|
|
45
|
+
console.log(`Initialized MonitoringAgent for server: ${this.server}`)
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
getCpu() {
|
|
@@ -161,7 +162,7 @@ class MonitoringAgent {
|
|
|
161
162
|
timestamp: Date.now()
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
console.log('DEBUG - Sending message:',
|
|
165
|
+
console.log('DEBUG - Sending message:',JSON.stringify(metricsMessage, null, 2))
|
|
165
166
|
|
|
166
167
|
// Add auth token to metadata if configured
|
|
167
168
|
const metadata = new grpc.Metadata()
|
|
@@ -190,7 +191,7 @@ class MonitoringAgent {
|
|
|
190
191
|
|
|
191
192
|
// Run once on start
|
|
192
193
|
this.sendMetrics()
|
|
193
|
-
|
|
194
|
+
console.log('Initial metrics sent.\n')
|
|
194
195
|
// Then run on interval
|
|
195
196
|
setInterval(async () => {
|
|
196
197
|
await this.sendMetrics()
|