autogenerating NRPE handlers for nrpe.cfg

Roger Roger at NagiosWiki.com
Fri Feb 22 23:58:47 CET 2008


On Fri, Feb 22, 2008 at 9:17 AM, Hari Sekhon <hpsekhon at googlemail.com>
wrote:

> Roger wrote:
> > I have hundreds of hosts, each of which needs an npre.cfg file to
> > reflect the true "fdisk -l" and "df -h" output of each box.
>

> >
> > Anyone have any scripts that they've used? I'm in a bind, otherwise
> > I'd think about writing my own...
> If this is to get a disk check depending on what disks are available,
> look here for a tip:
>
>
> http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg11936.html


I'm having a problem getting this sort of thing to work

on monitored server (with nrpe) i have the following line in nrpe.cfg

command[check_disks_proc_mount]=/usr/lib/nagios/plugins/check_disks_proc_mount

In my check_disk_proc_mount script (which runs ok on its own), I have
something similar to

./check_disk -w 15% -c 20% $(for x in $(/proc/mounts | awk '{print $2}'); do
echo -n " -p $x "; done)

I run this from the command line, and I get my expected "DISK OK" return
value.

However, I get "NRPE: Unable to read output" when I run the following
command from the plugins directory from my Nagios server

./check_nrpe -H (ipOfMonitoredBox) -c check_disks_proc_mount

What do I need to do for this to work across NRPE like it does when I'm
shelled in the box?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080222/009f6ad6/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list