它显示在页面上,我可以在chrome上的视图源码中看到它,但我似乎无法通过curl获得这些信息,因为页面停止加载-可能是由于格式化页面所涉及的JSON/js。
有没有办法通过rest、JSON或curling获取这些信息?
发布于 2021-07-28 15:01:59
对于主机和服务,此https://thruk.org/documentation/rest.html#_get-hosts-name-commandline都有一个rest端点。
可从命令行获得:
thruk r /hosts/localhost/commandline
[
{
"check_command" : "check-host-alive",
"command_line" : "/omd/sites/devel/lib/monitoring-plugins/check_icmp -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5",
"error" : "",
"host_name" : "localhost",
"peer_key" : "78bcd"
}
]可以通过curl从https://thrukhost/thruk/r/hosts/localhost/commandline获取相同的信息
https://stackoverflow.com/questions/66804255
复制相似问题