[Nagiosplug-help] odd nrpe and check_disk issue

Tom Luong TLuong at responsys.com
Wed Jan 19 12:41:43 CET 2005


Rudy,
 
I have tried using your recommendation below with no success.  Here's what I
have in my configuration files now.
 
Hostb(running Nagios)
Services.cfg: check_command                   check_nrpe!check_disk1
Checkcommands.cfg: command_line    $USER1$/check_nrpe $HOSTADDRESS$ -c
$ARG1$
 
Hosta(running NRPE)
Nrpe.cfg: command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c
10 -p /var
 
I can manually make a call from hostb to hosta using the correct UID/GID and
get an answer. 
/usr/local/nagios/libexec/check_nrpe hosta -c check_disk1
DISK OK [6322784 kB (75%) free on /dev/sdb1]
 
It's only when the Nagios daemon does the monitoring that's when it shows
"Unable to read output."  Please let me know if you have any other thoughts.
 
Thanks,
Tom
 
 
 
 
-----Original Message-----
From: Rudy Montemayor [mailto:RMontemayor at huntoil.com] 
Sent: Tuesday, January 18, 2005 8:03 AM
To: Tom Luong; nagiosplug-help at lists.sourceforge.net
Subject: RE: [Nagiosplug-help] odd nrpe and check_disk issue
 
Tom,
 
I not sure if you have gotten any feedback on your problem/question, but try
doing "/usr/local/nagios/libexec/check_disk --help"; this will maybe show
you where you may be going wrong. Also what does your "check_command" in the
service definition look like for checking /var on hosta in your services.cfg
file and then verify that command name in your checkcommands.cfg file.
 
If I'm reading your email correctly it appears that you have hard coded the
"80 90 /var" into the nrpe.cfg file in hosta, usually these are arguments
that are passed to it so that the same command can be used for other
filesystems (/opt, /usr, etc.). 
 
Usage: check_disk -w limit -c limit [-p path]
 
The "limit" can be either in kilobytes or in percentage (%). So if you want
Warning at 80% full and Critical at 90% full the command would look like:
 
check_disk -w 20% -c 10% -p /var
 
I hope some of this helps.
 
Rudy
 
 
 
  _____  

From: nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of Tom Luong
Sent: Friday, January 14, 2005 8:09 PM
To: 'nagiosplug-help at lists.sourceforge.net'
Subject: [Nagiosplug-help] odd nrpe and check_disk issue
Hello,
 
I have a really odd one here.  I can't get the status of a check_disk from a
remote host. The commands seem to work with I run them manually but Nagios
can't seem to make out that response from the remote host.
 
Facts:
1.       I can manually run check_disk on my client box(hosta) to get an
answer 
[root at hosta]# /usr/local/nagios/libexec/check_disk 80 90 /var
DISK OK - [6142028 kB (73%) free on /dev/sdb1]
2.       manually run check_nrpe on my Nagios server(hostb) as Nagios user
and successfully retrieve a responsys from hosta 
[nagios at hostb]# /usr/local/nagios/libexec/check_nrpe hosta -c check_disk1
DISK OK [4490880 kB (53%) free on /dev/sdb1]
3.       both my check_nrpe and nrpe are: 
Version: 1.5
Last Modified: 06-03-2002
License: GPL
4.       command in my nrpe.cfg:
command[check_disk1]=/usr/local/nagios/libexec/check_disk 80 90 /var 
 
Issue:
1.       Nagios Service Details page shows "Unable to read output" 
2.       I want Nagios to be able to check disk space on the remote hosts 
 
 
What I have done so far to try to resolve this without success:
1.       I have tried changing the syntax of the check_disk command to 
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p
/var
2.       check permission of user on server and remote host running
check_nrpe and nrpe 
 
 
Has anymore experience with this?  
 
Thanks in advance for your help.
Tom
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20050119/1f15795a/attachment.html>


More information about the Help mailing list