-1

I make custom bash script to monitor ssh failed logins - which locally runs ok - on nagios server and remote hosts.

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

But on nagios page - shows Unable to read output

I make so changes in configs to verify form https://support.nagios.com/kb/article/nrpe-nrpe-unable-to-read-output-620.html what's going wrong and I cannot find out where is the problem.

Script runs via nrpe which run on all machine

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

When I tested script via nrpe I've got problem with

NRPE: Command 'check_bruteforce_ssh' not defined 

which is defined in nrpe.cfg

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

All permissions for user nagios is added - in sudoers etc.

Where can I find the solution or somedoby got similar problem?

parsley93
  • 7
  • 3

1 Answers1

0

You have an error in your definition.
Replace check_bruteforce_attack in nrpe.cfg with check_bruteforce_ssh and it will work ;-)

Rohlik
  • 1,286
  • 19
  • 28