[Nagiosplug-help] check_disk over NRPE executing fine locally, but returns 'not mounted' error in nagios

Eli Stair eli at chpc.utah.edu
Sun Oct 31 14:47:33 CET 2004


Kevin, thanks for the look over my shoulder ;)

You're right, it was of course a simple matter of exec perms for the
check_disk plugin.  Kinda strange, not sure exactly how it works... I know
the plugin executes a df -Pk and parses it somehow, and then does another
df on the devices specified with '-p | --partition=PARTTION'.  It then
execs another df on that device, which will fail if the nrpe user doesn't
have read access to the device.

Two solutions:

1)  Set check_disk SUID/SGID root and the user defined to run it can
return proper status back to Nagios.  Now you can still just have -m and
report the mountpoint... simple.

# chmod 4755 check_disk

2)  Specify in nrpe.cfg the '-p, --path=PATH' syntax instead of the
device.  This is a pain if you're monitoring ALOT of servers, as you've
got to go into each nrpe.cfg file and insert the proper mountpoint which
is likely different for each.  But it works, as the nrpe noperms user can
likely run a df on that directory, depending on your permissions.

As a note, I haven't yet figured out how to pass cmdline options properly
to the check_disk plugin with nrpe.  I've tried passing them in the normal
check_disk!ARG1!ARG2!ARG3 syntax, as well as rewriting the cmd and just
passing it check_disk!"-w {n} -c {n} -p {n}", and it either bails parsing
the command or doesn't return any status to nagios (weird).

Thanks,

/eli



> Eli,
>
> Check the permission of the locally mounted filesystem.  Make sure that
> whatever
> user you are using to run the plugins from nrpe has read access to that
> filesystem.  The symptoms you describe sound exactly like a problem I
> had about
> two weeks ago.  Command ran fine locally but failed through NRPE.  Turns
> out I
> was testing it locally with root but remotely, the user was an
> unpriveleged
> account that did not have read-access to the three filesystems that I was
> having trouble monitoring.
>
> Kevin
>

-- 
Eli Stair
University of Utah
Center for High Performance Computing
155 South 1452 East RM 405-17
SLC, UT 84112
Tel: 801-





More information about the Help mailing list