From a1b34d5e7b49bafb5b2da5232012b0652f3d3b1f Mon Sep 17 00:00:00 2001
From: Julien Neuhart
Date: Wed, 21 Aug 2019 15:28:34 +0200
Subject: [PATCH] adding 'restart_time' information about a process in ping
endpoint if LOG_LEVEL=DEBUG
---
build/docs/content/13-ping.md | 10 ++++++----
docs/index.html | 10 ++++++----
internal/pkg/pm2/pm2.go | 3 ++-
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/build/docs/content/13-ping.md b/build/docs/content/13-ping.md
index 2d06f605..2039e682 100644
--- a/build/docs/content/13-ping.md
+++ b/build/docs/content/13-ping.md
@@ -18,20 +18,22 @@ For instance:
{
"name": "google-chrome-stable",
"pm2_env": {
- "status": "online"
+ "status": "online",
+ "restart_time": 0
},
"monit": {
- "memory": 73826304,
+ "memory": 72294400,
"cpu": 0
}
},
{
"name": "unoconv",
"pm2_env": {
- "status": "online"
+ "status": "online",
+ "restart_time": 0
},
"monit": {
- "memory": 70914048,
+ "memory": 71000064,
"cpu": 0
}
}
diff --git a/docs/index.html b/docs/index.html
index 931fe869..02a53776 100755
--- a/docs/index.html
+++ b/docs/index.html
@@ -1356,20 +1356,22 @@ For instance:
{
"name": "google-chrome-stable",
"pm2_env": {
- "status": "online"
+ "status": "online",
+ "restart_time": 0
},
"monit": {
- "memory": 73826304,
+ "memory": 72294400,
"cpu": 0
}
},
{
"name": "unoconv",
"pm2_env": {
- "status": "online"
+ "status": "online",
+ "restart_time": 0
},
"monit": {
- "memory": 70914048,
+ "memory": 71000064,
"cpu": 0
}
}
diff --git a/internal/pkg/pm2/pm2.go b/internal/pkg/pm2/pm2.go
index d267259b..533dc0a9 100644
--- a/internal/pkg/pm2/pm2.go
+++ b/internal/pkg/pm2/pm2.go
@@ -41,7 +41,8 @@ of the command "pm2 jlist".
type JListItem struct {
Name string `json:"name"`
PM2Env struct {
- Status string `json:"status"`
+ Status string `json:"status"`
+ RestartTime int64 `json:"restart_time"`
} `json:"pm2_env"`
Monit struct {
Memory int64 `json:"memory"`