Hi there, I'm trying to extend the snmp daemon. Therefore that the task is just about parsing some output, I decided to use the pass directive with a shell script underneath.
As a starter, just to get confident with the pass directive, I tried to fill a small table with data from the CPQHLTH-MIB [1]. If I do a snmpwalk on that oid, it looks quite ok for me: ##### start Snmpwalk output ########## # snmpwalk -mALL -v2c -c public -Os localhost .1.3.6.1.4.1.232.6.2.7.2 cpqHePostMsgIndex.1 = INTEGER: 1 cpqHePostMsgIndex.2 = INTEGER: 2 cpqHePostMsgIndex.3 = INTEGER: 3 cpqHePostMsgCode.1 = INTEGER: 2 cpqHePostMsgCode.2 = INTEGER: 2 cpqHePostMsgCode.3 = INTEGER: 2 cpqHePostMsgDesc.1 = STRING: "test 1" cpqHePostMsgDesc.2 = STRING: "test 2" cpqHePostMsgDesc.3 = STRING: "test 3" ##### end Snmpwalk output ########## But if i going to to a snmptable, it says 'no entries': ##### start Snmptable output ########## # snmptable -mALL -v2c -c public -Os localhost .1.3.6.1.4.1.232.6.2.7.2 cpqHePostMsgTable: No entries ##### end Snmptable output ########## My next and get mapping in the script looks like following (only short form description, no script) PLACE=".1.3.6.1.4.1.232.6.2.7.2" # table oid ##### next $PLACE|$PLACE.1 -> $PLACE.1.1.1 $PLACE.1.$ROW.$INDEX -> if [ $INDEX -lt $ENTRYCNT ]; then $PLACE.1.$ROW.$INDEX+1; elif [ $ROW -lt $MAXRCNT ]; $PLACE.1.$ROW+1.$INDEX; else exit 0 ##### get Get returns only if request is for $PLACE.1.$ROW.$INDEX And my snmpd.conf pass section looks like this ####### excerpt of snmpd.conf # grep pass /etc/snmp/snmpd.conf | grep -v ^# pass .1.3.6.1.4.1.232.6.2.7.2 /bin/sh /root/snmptest/passtest ####### For me it looks like that there is some index or count information missing?! Or am I doing this stuff in a wrong way? Any help or idea on that would be greatly appreciated. Thanks in advance. Michael [1] Attached table definition from CPQHLTH-MIB: cpqhlth.mib_excerpt -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
cpqhlth.mib_excerpt
Description: Binary data
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users