问题描述
我有一台 centOS 7 机器。我在上面运行不同的 NRPE 插件。我的插件位于 /usr/local/nagios/libexec/
目录中。当我像这样运行插件 check_ide_smart
时:
/usr/local/nagios/libexec/check_ide_smart -d /dev/sda
效果很好。
然后我在 /usr/local/nagios/etc/nrpe.cfg
文件中添加了如下命令:
command[check_ide_smart] = /usr/local/nagios/libexec/check_ide_smart -d /dev/sda
然后它给出错误
unable to access device /dev/sda: Permission denied
然后我更改了命令以在 nrpe.cfg
中授予 sudo 权限,如下所示:
command[check_ide_smart] = /usr/bin/sudo /usr/local/nagios/libexec/check_ide_smart -d /dev/sda
现在我收到以下错误:
NRPE: Unable to read output
我已将用户 nagios 添加到 /etc/sudoers
文件。但我无法理解这个问题。
有人知道可能的解决方案是什么吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)