From: Johan S. <joh...@de...> - 2010-06-10 09:06:16
|
Hi. I am creating a test for VMFS utilization in our ESX template. It consists on a client-side script that is executed by snmpd reporting volume label size and free space on three different OID:s. It works fine if I use snmpwalk from the command-line on the devmon server, and it also works fine for 4 out of our 11 ESX hosts. One the other 7 I get the following error: Received SNMP response with error code error status: noSuchName index 1 (OID: 1.3.6.1.4.1.6876.99999.2.3.101) SNMPv2c_Session (remote host: "xxx.xxx.xxx.xxx" [xxx.xxx.xxx.xxx].161) community: "public" request ID: 339225935 PDU bufsize: 8000 bytes timeout: 10s retries: 10 backoff: 1) at /usr/local/devmon/modules/dm_snmp.pm line 546 Does anyone have any idea why devmon gets this error for some of the hosts? All the hosts have the same configuration on the client side, and all of them work if I use snmpwalk. Snmpd.conf: dlmod cmaX /usr/lib64/libcmaX64.so proxy -v 1 -c public udp:127.0.0.1:171 .1.3.6.1.4.1.6876 rocommunity public exec .1.3.6.1.4.1.6876.99999.2.1 vmfslabel /usr/local/delta/vmfs_snmp.sh label exec .1.3.6.1.4.1.6876.99999.2.2 vmfssize /usr/local/delta/vmfs_snmp.sh size exec .1.3.6.1.4.1.6876.99999.2.3 vmfsfree /usr/local/delta/vmfs_snmp.sh free vmfs_snmp.sh: #!/bin/bash OPTION=$1 VOLUMES=`ls /vmfs/volumes/ | grep -v :` if [ $OPTION = "size" ]; then for i in $VOLUMES;do VMFS=`/usr/sbin/vmkfstools -P /vmfs/volumes/$i` SIZE=`echo "$VMFS" | grep Capacity | awk '{print $2}'` echo $SIZE done fi if [ $OPTION = "free" ]; then for i in $VOLUMES;do VMFS=`/usr/sbin/vmkfstools -P /vmfs/volumes/$i` FREE=`echo "$VMFS" | grep Capacity | awk '{print $8}'` echo $FREE done fi if [ $OPTION = "label" ]; then for i in $VOLUMES;do VMFS=`/usr/sbin/vmkfstools -P /vmfs/volumes/$i` LABEL=`echo "$VMFS" | grep label | awk '{print $6}'` echo $LABEL done fi Best Regards, Johan |