Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
不安装nrpe,但是想在Nagios控制服务器上写shell脚本来控制远程主机,像一个进程,数据库状态。可以实现吗?如何编写脚本?
nrpe 的替代方法是使用[check_by_ssh][1]插件。它将通过 SSH 连接并执行指定的插件(或脚本)。
[check_by_ssh][1]
check_free_mem 插件示例
define command{ command_name check_ssh_mem command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "$USER1$/check_free_mem -w $ARG1$ -c $ARG2$" }