Nagios:缺少 bash

Nagios:缺少 bash

我正在使用 nagios 和 nrpe 监控 NTP 服务器,在 nagios 服务器上,我收到以下错误:服务状态未知状态信息我缺少一个重要组件: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

提前致谢

答案1

编辑函数verify_dep(),使行

  type $i > /dev/null 2>&1 /dev/null

更改为

  type $i > /dev/null 2>&1

之后它应该可以工作了。原来的那行是错误的,总是导致错误。

相关内容