我有很多nagios服务,它们的名称中都有正斜杠。当我尝试通过thruk api确认服务时,它返回如下所示的错误。
request: http://<thruk_url>/r/v1/services/test-host/check_disk_%2Fvar/cmd/acknowledge_svc_problem
response: /r/v1/services/test-host/check_disk_/var/cmd/acknowledge_svc_problem was not found on this server.服务名称为check_disk_/var。我有很多这样的服务,因此重命名它们都不是一个容易的解决方案。
发布于 2021-06-29 16:13:46
这里描述了一个通用的命令端点:https://thruk.org/documentation/rest_commands.html#_generic-command-endpoint
%> curl -H "X-Thruk-Auth-Key: ****" \
-d "cmd=acknowledge_svc_problem" \
-d "host=hostname" \
-d "service=servicedescription" \
-d "comment_data=test" \
'http://localhost/thruk/r/cmd'https://stackoverflow.com/questions/68167011
复制相似问题