Nagios - 无法读取输出

问题描述 投票:-1回答:1

我做了一个自定义的bash脚本来监控ssh失败登录--本地运行正常--在nagios服务器和远程主机上。

root@xxx:/usr/local/nagios/libexec# ./check_bruteforce_ssh.sh -c 20 -w 50
OK - no constant bruteforce attack

但在nagios页面 - 显示 无法读取输出

我在配置中做了这样的改变,以验证形式。https:/support.nagios.comkbarticlenrpe-nrpe-unable to read-output-620.html。 到底是怎么回事,我找不到问题出在哪里。

脚本通过在所有机器上运行的nrpe来运行。

root@test:/usr/local/nagios/libexec# ./check_nrpe -H test1
NRPE v3.2.1

当我通过 nrpe 测试脚本时,我遇到了以下问题

NRPE: Command 'check_bruteforce_ssh' not defined 

在nrpe.cfg中定义的。

command[check_bruteforce_attack]=/usr/local/nagios/libexec/check_bruteforce_attack.sh -w 20 -c 50

nagios用户的所有权限都被添加了--在sudoers等等。

我在哪里可以找到解决方法或者somedoby有类似的问题?

linux bash nagios nrpe
1个回答
0
投票

你的定义中有一个错误。替换 check_bruteforce_attacknrpe.cfgcheck_bruteforce_ssh 就会成功)

© www.soinside.com 2019 - 2024. All rights reserved.