No output returned from plugin

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ch3mic4l
Posts: 5
Joined: Thu Feb 16, 2012 2:08 pm

No output returned from plugin

Post by ch3mic4l »

Hello Everyone,

I am having some trouble with my new Nagios server.

Let me start by saying I have an old Nagios server that works just fine (everything shows as green and OK on the web interface) on a Centos 5.7 box, but whoever set it up before I got here set it up poorly and didn't plan out anything.

So in an attempt to clean it up I created a new Nagios server on an Ubuntu 11.04 box, with the same Nagios version (Nagios Core 3.2.3).

I got everything all set up and cleaned up the config files, but on this new server I am getting an (No output returned from plugin) in the web interface. (SSH check goes through OK)

I disabled the ubuntu firewall, and I ran these commands from the server command line and they work just fine.

/usr/lib/nagios/plugins/check_nrpe -H <SERVER IP>
NRPE v2.12

/usr/lib/nagios/plugins/check_nrpe -H <SERVER IP> -c check_disk_root
DISK OK - free space: / 5509 MB (79% inode=87%);| /=1407MB;5829;6558;0;7287

So all that works great, just in the web interface I am getting (No output returned from plugin).

But since my other Nagios server picks it up just fine, I have no idea what it could be.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: No output returned from plugin

Post by jsmurphy »

Are you able to post the command definition and an example service definition related to a failing service... can you also check the permissions on the check_nrpe file and confirm that nagios is the owner.
ch3mic4l
Posts: 5
Joined: Thu Feb 16, 2012 2:08 pm

Re: No output returned from plugin

Post by ch3mic4l »

define service{
use generic-service ; Name of service template to use
host_name <SERVER IP>
service_description Disk /root
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups it
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe!check_disk_root
}


command[check_disk_root]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol00

check_nrpe file from the server:
ls -la | grep check_nrpe
-rwxr-xr-x 1 root root 19208 2011-10-17 16:16 check_nrpe
ch3mic4l
Posts: 5
Joined: Thu Feb 16, 2012 2:08 pm

Re: No output returned from plugin

Post by ch3mic4l »

I just changed the owner/group on the check_nrpe to nagios, restarted the nagios and apache services and I still have the same issue.
hotriver
Posts: 8
Joined: Fri Feb 17, 2012 3:58 pm

Re: No output returned from plugin

Post by hotriver »

I have same problem for my shell script plugin. It read a counter from oracle to check if it is in the limit. I define local variable in the script and the limit is $ARG$. If I run it in terminal, it works. but when I run it in the Nagios, it does not display the result.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: No output returned from plugin

Post by jsmurphy »

Sorry when I said command definition I meant the check_nrpe command definition in Nagios, the no output returned from plugin is pretty much always the symptom of either a. not being able to locate the file to execute or b. not having permissions to execute the file... so we are looking for clues as to why it can't either locate or execute those files.
ch3mic4l
Posts: 5
Joined: Thu Feb 16, 2012 2:08 pm

Re: No output returned from plugin

Post by ch3mic4l »

The check_nrpe file was owned by root, I changed it to be owned by nagios but I still have the same issue
-rwxr-xr-x 1 nagios nagios 19208 2011-10-17 16:16 check_nrpe

In my resource.cfg file I have this, the path is correct
$USER1$=/usr/lib/nagios/plugins

I went through all the config files looking at everything it was loading and changed everything to be owned by nagios by still no luck
ch3mic4l
Posts: 5
Joined: Thu Feb 16, 2012 2:08 pm

Re: No output returned from plugin

Post by ch3mic4l »

Well I took a long break from working on Nagios, but I came back today and I got it fixed (with a little help from a friend).

I have to say back in February when JSmurphy first told me to look at the check_nrpe command definition I had no idea what he was talking about, I have a friend who is good with nagios explain to me what JS was talking about.

vim /etc/nagios-plugins/config/check_nrpe.cfg

and sure enough

# 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$

Instead of changing all my config files on every server to use "check_nrpe_1arg" I removed the "-a $ARG2$" off the end of the check_nrpe command.

All is well and everything is returning correctly.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: No output returned from plugin

Post by jsmurphy »

Glad you got it working and thanks for following it up!
Locked