Monitoring the rpc.statd processes

Marcin Wasilewski marcinwasilewski at poczta.onet.pl
Tue May 31 16:37:59 CEST 2005


Hi,

In my opinion You could use SNMP to check that process is running.
I'm using it to check bacula process

#! /bin/sh
#

ECHO="/bin/echo -e"
GREP="/bin/grep"
CAT="/bin/cat"

STATE_UNKNOWN="-1"
STATE_OK="0"
STATE_CRITICAL="2"

print_usage() {
    echo "Usage: check_bacula_procs host community process_name"
}

# Make sure the correct number of command line
# arguments have been supplied

if [ $# -lt 1 ]; then
    print_usage
    exit $STATE_UNKNOWN
fi

PROCESS=`/usr/bin/snmpwalk -v1 $1 -c $2 HOST-RESOURCES-MIB::hrSWRunName|$GREP $3`

if [ "$?" = "0" ]; then # exit with no error
    $ECHO "OK - proces $3 dziala\n"
    exitstatus=$STATE_OK
else # error
    $ECHO "ERROR - proces $3 nie dziala\n"
    exitstatus=$STATE_CRITICAL
fi

exit $exitstatus

Best regards
Marcin

  ----- Original Message ----- 
  From: Kaplan, Andrew H. 
  To: nagios-users at lists.sourceforge.net 
  Sent: Tuesday, May 31, 2005 4:18 PM
  Subject: [Nagios-users] Monitoring the rpc.statd processes


  Hi there -

   

  I want to monitor the rpc.statd process and be notified if it isn't running. The process is started via the /etc/init.d/nfslock 

  script. What plugin can I use to accomplish this? Thanks.   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050531/f5cad4e7/attachment.html>


More information about the Users mailing list