diff --git a/server/model/monitor.js b/server/model/monitor.js index 186962b08..b6e950322 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -548,7 +548,7 @@ class Monitor extends BeanModel { log.debug("monitor:", `gRPC response: ${JSON.stringify(response)}`); let responseData = response.data; if (responseData.length > 50) { - responseData = response.substring(0, 47) + "..."; + responseData = responseData.toString().substring(0, 47) + "..."; } if (response.code !== 1) { bean.status = DOWN; diff --git a/server/server.js b/server/server.js index 594c29b31..5473cecd4 100644 --- a/server/server.js +++ b/server/server.js @@ -714,6 +714,7 @@ let needSetup = false; bean.authDomain = monitor.authDomain; bean.grpcUrl = monitor.grpcUrl; bean.grpcProtobuf = monitor.grpcProtobuf; + bean.grpcServiceName = monitor.grpcServiceName; bean.grpcMethod = monitor.grpcMethod; bean.grpcBody = monitor.grpcBody; bean.grpcMetadata = monitor.grpcMetadata; diff --git a/server/util-server.js b/server/util-server.js index 0bf69133b..ffc3b3d95 100644 --- a/server/util-server.js +++ b/server/util-server.js @@ -787,7 +787,7 @@ module.exports.grpcQuery = async (options) => { data: "" }); } else { - log.debug("monitor:", `gRPC response: ${response}`); + log.debug("monitor:", `gRPC response: ${JSON.stringify(response)}`); return resolve({ code: 1, errorMessage: "",