FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


fhscripts:check:check_snmp.sh.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
fhscripts:check:check_snmp.sh.html [2018/02/26 11:59]
kurihara
fhscripts:check:check_snmp.sh.html [2018/02/27 02:07]
kurihara
Line 27: Line 27:
 #   check_snmp.sh  x.x.x.x community name #   check_snmp.sh  x.x.x.x community name
 #======================================================= #=======================================================
 +# Note
 +# snmpwalk -v 2c -c public localhost TEXT  #output with Text
 +# snmpwalk -v 2c -c public -O n localhost TEXT  #output with OID
 +# snmptranslate OID # OID to Text
 +# snmptranslate -Td OID # OID's description
 +# /usr/share/snmp/mibs/
  
 VERSION=2c VERSION=2c
Line 69: Line 75:
       ;;       ;;
   linux.cpu) :   linux.cpu) :
-      snmpwalk -v $VERSION -c $COMMUNITY $HOST -O n .1.3.6.1.2.1.25.3.2.1.3 |grep CPU+      echo "## Cpu Type" 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST -O n .1.3.6.1.2.1.25.3.2.1.3 |grep CPU # hrDeviceDescr 
 + 
 +      echo "" ; echo "## Cpu Usage" 
 +      echo "## The average, over the last minute, of the percentage of time that this processor was not idle." 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST .1.3.6.1.2.1.25.3.3.1.2 # hrProcessorLoad 
 + 
 +      echo "" ; echo "## Cpu Load Average" 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST .1.3.6.1.4.1.2021.10.1.2 # laNames 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST .1.3.6.1.4.1.2021.10.1.3 # laLoad 
 +      ;; 
 +  linux.memory) : 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST .1.3.6.1.4.1.2021.4.5 #memTotalReal 
 +      snmpwalk -v $VERSION -c $COMMUNITY $HOST .1.3.6.1.4.1.2021.4.6 # memAvailReal
       ;;       ;;
   *) snmpwalk -v $VERSION -c $COMMUNITY $HOST ${OID} ;;   *) snmpwalk -v $VERSION -c $COMMUNITY $HOST ${OID} ;;


fhscripts/check/check_snmp.sh.html.txt · Last modified: 2018/03/29 00:04 by kurihara