我正在用nagios和nrpe在nagios服务器上监视NTP服务器,当我得到以下错误:服务状态UNKNOWN状态信息我缺less一个重要的组件:bash
该插件是: http : //archive.groundworkopensource.com/groundwork-opensource/trunk/monitor-core/nagios/plugins-contrib/check_procr.sh
当我做bash -x check_procr.sh时的输出是:
+ myself=check_procr + verify_dep + needed='bash cut egrep expr grep let ps sed sort tail test tr wc' ++ echo bash cut egrep expr grep let ps sed sort tail test tr wc + for i in '`echo $needed`' + type bash /dev/null + '[' 1 -eq 1 ']' + echo 'I am missing an important component : bash' I am missing an important component : bash + echo 'Cannot continue, sorry, try to find the missing one...' Cannot continue, sorry, try to find the missing one... + exit 3
提前致谢
编辑函数verify_dep()以使行
type $i > /dev/null 2>&1 /dev/null
更改为
type $i > /dev/null 2>&1
之后,它应该工作。 原始的行是错误的,总是导致错误。