This commit is contained in:
minhhoang 2022-12-28 22:31:33 +07:00
parent 8c684e9293
commit 4147a4c404
3 changed files with 3 additions and 2 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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: "",