Check_Users 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.
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Check_Users no output returned from plugin

Post by kwhogster »

Nagios 4.1.1 on Ubuntu Server 16.04

trying to get this to work

My Command.cfg entry

Code: Select all

define command{
        command_name    check_users
        command_line    $USER1%/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$
}
My Service

Code: Select all

define service {
        host_name                       TGCS025
        service_description             Check All Users
        check_command                   check_nrpe!check_users! -a check_users -w 15 -c 20
        servicegroups                   AllServices
        check_interval                  1
        use                             generic-service
}
from the Nagios server I run this

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.36 -t 30 -c check_users -a 15 20
No handler for command: check_users


What am I missing here

Thanks

Tom




getting this


Check All Users


UNKNOWN 09-02-2016 21:08:50 0d 0h 0m 26s 1/3 (No output returned from plugin)




UPDATE UPDATE

I made this change to my service

Code: Select all

define service {
        host_name                       TGCS025
        service_description             Check All Users
        check_command                   check_nrpe!check_users! -a  '-w 15 -c 20'
        servicegroups                   AllServices
        check_interval                  1
        use                             generic-service
}


Now I get this on Nagios

UNKNOWN 09-03-2016 14:38:30 0d 17h 30m 34s 3/3 No handler for command: check_users


Thoughts
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Check_Users no output returned from plugin

Post by eloyd »

Code: Select all

        command_line    $USER1%/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$
Should be

Code: Select all

        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$
Note $USER1% should be $USER1$
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_Users no output returned from plugin

Post by kwhogster »

I made this change

Code: Select all

define command{
        command_name    check_users
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$
}
Good catch but still get this

UNKNOWN 09-04-2016 22:56:13 2d 1h 47m 48s 3/3 No handler for command: check_users


Thoughts?
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Check_Users no output returned from plugin

Post by eloyd »

That's something in your nrpe.cfg file on the remote host.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_Users no output returned from plugin

Post by kwhogster »

are you talking about the host I am checking?

If so I do not have a nrpe.cfg file on that server.

Just on my Nagios server

I have other commands and services that I use for nrpe against the same tgcs025 and they work fine

Confused here
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Check_Users no output returned from plugin

Post by eloyd »

Whatever host you're checking via NRPE, you need to allow the "check_users" command to be executed. Read up on NRPE documentation (specifically, what goes in nrpe.cfg) and you'll see what I mean.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_Users no output returned from plugin

Post by kwhogster »

what nrpe doc? link please


On My Nagios server

I have this
define service {
host_name TGCS025
service_description Check Disk Usage D:
check_command check_nrpe!CheckDriveSize! -a ShowAll=long MinWarn=20% MinCrit=10% Drive=D: perf-unit=G
check_interval 1
servicegroups DriveSpace
use generic-service
}

It works fine again the same host just a different check
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Check_Users no output returned from plugin

Post by eloyd »

Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_Users no output returned from plugin

Post by kwhogster »

Thanks

I have see that and my NRPE is setup correctly on my Nagios server

From the Nagios server I ran this

root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -H 10.2.8.36
I (0,4,1,73 2012-12-17) seem to be doing fine...

That is TGCS025 HOST ip address

But this fails

root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -H 10.2.8.24 -t 30 -c check_users No handler for command: check_users

This is the nrpe.cfg on my Nagios server just a part of it

Code: Select all

# The following examples use hardcoded command arguments...

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'.  This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.

#command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_Users no output returned from plugin

Post by kwhogster »

The NRPE document only shows how to check Linux hosts

What about Windows Hosts
Locked