<div class="gmail_quote">On Fri, Feb 22, 2008 at 9:17 AM, Hari Sekhon <<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="Wj3C7c">Roger wrote:<br>
> I have hundreds of hosts, each of which needs an npre.cfg file to<br>
> reflect the true "fdisk -l" and "df -h" output of each box. </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="Wj3C7c">
<br>
><br>
> Anyone have any scripts that they've used? I'm in a bind, otherwise<br>
> I'd think about writing my own...<br>
</div></div>If this is to get a disk check depending on what disks are available,<br>
look here for a tip:<br>
<br>
<a href="http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg11936.html" target="_blank">http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg11936.html</a></blockquote><div><br class="webkit-block-placeholder">
</div><div>I'm having a problem getting this sort of thing to work</div><div><br class="webkit-block-placeholder"></div><div>on monitored server (with nrpe) i have the following line in nrpe.cfg</div><div><br class="webkit-block-placeholder">
</div><div>command[check_disks_proc_mount]=/usr/lib/nagios/plugins/check_disks_proc_mount</div><div><br class="webkit-block-placeholder"></div><div>In my check_disk_proc_mount script (which runs ok on its own), I have something similar to </div>
<div><br class="webkit-block-placeholder"></div><div>./check_disk -w 15% -c 20% $(for x in $(/proc/mounts | awk '{print $2}'); do echo -n " -p $x "; done)</div><div><br class="webkit-block-placeholder"></div>
<div>I run this from the command line, and I get my expected "DISK OK" return value.</div><div><br class="webkit-block-placeholder"></div><div>However, I get "NRPE: Unable to read output" when I run the following command from the plugins directory from my Nagios server</div>
<div><br class="webkit-block-placeholder"></div><div>./check_nrpe -H (ipOfMonitoredBox) -c check_disks_proc_mount</div><div><br class="webkit-block-placeholder"></div><div>What do I need to do for this to work across NRPE like it does when I'm shelled in the box?</div>
</div>