View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Addons : NRPE

Title:Did not recieve data from remote host
FAQ ID:F0439
Submitted By:Matt Lowe 
Last Updated:12/15/2009

Description:System Ubuntu 9.10 karmic Nagios 3.0.6 NRPE 2.12 After following the Nagios NRPE install guides you configure NRPE to check a remote host, and Nagios always returns 'didnt recieve output from command' or such like, clicking on the detail for the service gives something similar to the following: Current Status: UNKNOWN (for 0d 0h 39m 58s) Status Information: (No output returned from plugin) NRPE Plugin for Nagios Copyright (c) 1999-2008 Ethan Galstad ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) Version: 2.12 Last Modified: 03-10-2008 License: GPL v2 with exemptions (-l for more info) SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required Usage: check_nrpe -H [-n] [-u] [-p ] [-t ] [-c ] [-a ] Options: -n = Do no use SSL -u = Make socket timeouts return an UNKNOWN state instead of CRITICAL = The address of the host running the NRPE daemon [port] = The port on which the daemon is running (default=5666) [timeout] = Number of seconds before connection times out (default=10) [command] = The name of the command that the remote daemon should run [arglist] = Optional arguments that should be passed to the command. Multiple arguments should be separated by a space. If provided, this must be the last option supplied on the command line. -h,--help Print this short help. -l,--license Print licensing information. -n,--no-ssl Do not initial an ssl handshake with the server, talk in plaintext. Note: This plugin requires that you have the NRPE daemon running on the remote host. You must also have configured the daemon to associate a specific plugin command with the [command] option you are specifying here. Upon receipt of the [command] argument, the NRPE daemon will run the appropriate plugin command and send the plugin output and return code back to *this* plugin. This allows you to execute plugins on remote hosts and 'fake' the results to make Nagios think the plugin is being run locally. Performance Data: Current Attempt: 4/4 (HARD state) Last Check Time: 2009-11-18 17:54:48 Check Type: ACTIVE Check Latency / Duration: 0.118 / 0.036 seconds Next Scheduled Check: 2009-11-18 17:59:48 Last State Change: 2009-11-18 17:16:48 Last Notification: 2009-11-18 17:19:51 (notification 1) Is This Service Flapping? NO (5.33% state change) In Scheduled Downtime? NO Last Update: 2009-11-18 17:56:41 ( 0d 0h 0m 5s ago)  

Solution:The problem appears to be in the config file for the NRPE command : file : /etc/nagios-plugins/config/check_nrpe.cfg the file has the following in it : # this command runs a program $ARG1$ with arguments $ARG2$ define command { command_name check_nrpe command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ } # this command runs a program $ARG1$ with no arguments define command { command_name check_nrpe_1arg command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } All you need to do is change the 'command_name's to the following : # this command runs a program $ARG1$ with arguments $ARG2$ define command { command_name check_nrpe_2arg command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ } # this command runs a program $ARG1$ with no arguments define command { command_name check_nrpe command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } eg. make the first command _2args and the second command just plain check_nrpe hope this helps some people Matt Lowe ACTweb 

Keywords:no output returned UNKNOWN nrpe