Skip to content

Commit

Permalink
Merge pull request #2399 from hxy7yx/main-1
Browse files Browse the repository at this point in the history
fix monitor
  • Loading branch information
fengzeroz authored Feb 25, 2025
2 parents 7a778f3 + df7080e commit a523209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/monitor/monitor.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"description_zh": "事件消息发布的主题前缀",
"type": "string",
"attribute": "required",
"default": "/neuron/{client-id}",
"default": "/neuron/monitor/${random_str}",
"valid": {
"length": 255
}
Expand All @@ -42,7 +42,7 @@
"description_zh": "心跳消息发布的主题",
"type": "string",
"attribute": "required",
"default": "/neuron/${node-name}/heartbeat",
"default": "/neuron/heartbeat/${random_str}",
"valid": {
"length": 255
}
Expand Down
3 changes: 2 additions & 1 deletion plugins/restful/adapter_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static inline int send_node_update_req(nng_aio * aio,
return NEU_ERR_NODE_NAME_EMPTY;
}

if (strcmp(req->new_name, "monitor") == 0) {
if (strcmp(req->new_name, "monitor") == 0 ||
strcmp(req->name, "monitor") == 0) {
return NEU_ERR_NODE_NOT_ALLOW_UPDATE;
}

Expand Down

0 comments on commit a523209

Please sign in to comment.