NRPE: Command 'check_disk' not defined

Sebastian Ganame sganame at yahoo.com.ar
Thu May 31 16:40:12 CEST 2007


Hi John,
       Your problem is that you're trying to invoke a service that is not local, thus it shouldn be defined not only in your Nagios server configuration files, but also in the nrpe.cfg file used when the nrpe daemon starts on the target machine. 
       I'll try to explain just a little bit what I did since I suffered the same situation:
   
       1) Define a new service in Nagios Engine for monitoring non-local disks, as follows:
   
  define service{
      use                           local-service ;Name of service template to use
      host_name                [the servers in which you have nrpe installed]
      service_description     Remote check disk
      check_command        check_nrpe!check_hda1!20%!10%!/
  }

       2) I used check_hda1 instead of check_disk to identify the way I use this in the target machines. Then you need to include this type of call in your target machine's nrpe.cfg file, as follows (at the very end):
   
  # The following examples use hardcoded command arguments...
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1

       This way, nrpe tells the target machine to call it's /usr/local/nagios/libexec/check_disk command when the Nagios core engine calls check_nrpe!check_hda1 on this target machine.
   
       Hope it helps, and most important that you understand what I tried to tell you ;-)
       Regards,
   
   
  Sebastian Ganame
   
   
  -----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Jonathan Murray
Sent: Miércoles, 30 de Mayo de 2007 07:49 p.m.
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] NRPE: Command 'check_disk' not defined
   
  I've been staring at this for a long time, likely pilot error, but maybe 
  someone has suggestions or sees something I don't...thanks.
   
  Nagios server version 2.8, (OS debian)
  Nagios plugin version 1.4.7 (Red Hat Enterprise Linux WS release 4)
  NRPE version 2.7.1
   
  other plugins work (check_swap, check_load)
   
  On nagios server:
   
  /usr/local/nagios/etc/checkcommands.cfg
   
  <-snip->
   
  # check_disk
  define command{
            command_name    check_disk
           command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk
           }
   
  <-snip->
   
  On the machine I'm trying to monitor, the one running nrpe 2.7.1 with 
  the Nagios plugin version 1.4.7 (Red Hat Enterprise Linux WS release 4), 
  in /usr/local/nagios/libexec/etc/nrpe.cfg:
   
  [root at paleo etc]# ls -la
  total 28
  drwxr-xr-x  2 nagios nagios 4096 May 30 17:03 .
  drwxr-xr-x  6 nagios nagios 4096 May 30 17:13 ..
  -rwxr-xr-x  1 nagios nagios 7536 May 30 17:03 nrpe.cfg
   
  <-snip->
   
  command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p 
  /dev/sda5
   
  <-snip->
   
  when I test it from the server "nagios" it works fine:
   
  root at nagios:/usr/local/nagios/libexec# ./check_nrpe -H paleo -c check_disk
  DISK OK - free space: / 201921 MB (93% inode=99%);| 
  /=14918MB;228424;228434;0;22 8444
   
  on the system running nrpe "paleo":
   
  [root at paleo etc]# /usr/local/nagios/libexec/check_disk -w 20 -c 10 -p 
  /dev/sda5
  DISK OK - free space: / 201921 MB (93% inode=99%);| 
  /=14918MB;228424;228434;0;228444
   
  If NRPE, Command 'check_disk' not defined as the web interface reports, 
  then where should it be defined? I thought I needed to define the 
  command in the checkcommands.cfg on the server, then define the command 
  on the client that is running nrpe daemon.
   
  thanks for any ideas,
   
  Jonathan Murray
   
   
   
   
   
   
  -------------------------------------------------------------------------
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  _______________________________________________
  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
   

 		
---------------------------------
 Preguntá. Respondé. Descubrí.
 Todo lo que querías saber, y lo que ni imaginabas,
 está en Yahoo! Respuestas (Beta).
 Probalo ya! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070531/f382f74b/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- 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