diff --git a/server/model/monitor.js b/server/model/monitor.js index ffa4c4540..b5e58c574 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -400,7 +400,7 @@ class Monitor extends BeanModel { bean.msg += ", keyword is found"; bean.status = UP; } else { - data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " "); + data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ").trim(); if (data.length > 50) { data = data.substring(0, 47) + "..."; }