Problem getting exit code from plugin

debby_ar at yahoo.com debby_ar at yahoo.com
Wed Feb 11 19:42:17 CET 2004


I'm having a problem with a plugin that seems to work perfectly when I call it, but mostly fails when called by nagios.  (Version 1.2).
 
The service definition is:
 
define command{
        command_name    check_ssh_procdar
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -C 'check_procdar sleep'  -i $USER3$/moni_dsa_key -l nagios
        }

define service{
  name                          MSshSleepSvc; Check if sleep process is running remotely
  use                           MSvc
  service_description           Sleep process
  check_command                 check_ssh_procdar!sleep
  max_check_attempts            2
  normal_check_interval         1
  retry_check_interval          1
  notification_interval         60   ; Renotify hourly unless overridden
  register                      0       ;
  }
#
define service{
        use                     MSshSleepSvc   ; Template name to use
        host_name               host1
        contact_groups          Adm
        }

When I call the plugin as follows, I get the expected output message and return code:
/usr/nagios/libexec/check_by_ssh -H 10.110.250.50 -C 'check_procdar sleep'  -i /usr/nagios/etc/moni_dsa_key -l nagios
 
But when nagios calls the plugin, the status Usually indicates UNKNOWN.
 
Occasionally however, the plugin starts to work and I get the expected OK or CRITICAL status, but a minute later it reverts to UNKNOWN.
 
Any ideas why I am seeing this UNKNOWN status?  I would suspect the plugin, but running the plugin directly is consistently returning what I expect



---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040211/40ed473e/attachment.html>


More information about the Users mailing list