Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nagios/NRPE giving a "No output returned from plugin" error

Getting a "No output returned from plugin" error message from a Nagios/NRPE script

1) Running Nagios v3.2.3 and NRPE v2.12

2) The script:

   OK_STATE=0
   UNAME=/bin/uname -r       
   echo "OK: Kernel Version=$UNAME"       
   exit $OK_STATE

2) Command line results on the Nagios Server using NRPE

  • Same OK results for both the root and nagios users:

[nagios@cmonmm03 libexec]$ ./check_nrpe -H dappsi01b.dev.screenscape.local -c check_kernel OK: Kernel Version=2.6.18-194.11.3.el5

When I run the check_kernel.sh script on the machine's local command line it works there to.

Help, any thoughts or known solution regarding this would be appreciated?

Thank you

like image 796
Rick Avatar asked Oct 28 '10 15:10

Rick


People also ask

How Nagios will execute Nrpe plugin in remote system?

The Nagios daemon which run checks on remote machines in NRPE (Nagios Remote Plugin Executor). It allows you to run Nagios plugins on other machines remotely. You can monitor remote machine metrics such as disk usage, CPU load etc.

What is Nagios Nrpe plugin?

The NRPE addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main reason for doing this is to allow Nagios to monitor "local" resources (like CPU load, memory usage, etc.) on remote machines.

What is Nrpe Nagios Remote Plugin Executor in Nagios?

NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well.


1 Answers

Your command does not take any arguments, but it is likely the command definition for check_nrpe does define an argument parameter, for example:

define command{
    command_name    check_nrpe
    command_line    /usr/lib64/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}

Therefore, try placing a dummy argument in the service definition:

define service{
    use                             normal-service
    host_name                       hostname
    service_description             Description
    check_command                   check_nrpe!check_foo!placeholder
}
like image 100
Raman Avatar answered Oct 12 '22 00:10

Raman