我有一个 etch nagios 服务器(我将称之为 NagiosServer),它成功地监控了很多东西,包括另一个 etch 服务器(MonitorEtch)。使用 check_nrpe 和 check_procs,我可以检查正在运行的守护进程的进程列表,例如“/usr/sbin/squid”。
从 NagiosServer 检查 MonitorEtch(正确结果):
/usr/lib/nagios/plugins/check_nrpe -H MonitorEtch -c check_process -a /usr/sbin/squid 1:1 1:1
PROCS OK: 1 process with args '/usr/sbin/squid'
/usr/lib/nagios/plugins/check_nrpe -H MonitorEtch -c check_process -a whatever 1:1 1:1
PROCS CRITICAL: 0 processes with args 'whatever'
Run Code Online (Sandbox Code Playgroud)
我已经构建了一个我想要监控的新服务器,运行 Lucid (MonitorLucid)。无论我尝试从 NagiosServer 监控什么进程,我都会得到超出预期的结果。
从 NagiosServer 检查 MonitorLucid(结果不正确):
/usr/lib/nagios/plugins/check_nrpe -H MonitorLucid -c check_process -a whatever 1:1 1:1
PROCS OK: 1 process with args 'whatever'
ps ax|grep sophie
12737 ? Ss 0:00 /usr/sbin/sophie -D …
Run Code Online (Sandbox Code Playgroud)