I changed recently my custom MIB file to include tables and not only scalars, it validates, I can create sub-agent etc. but if I try to read it, it says no entries:
snmptable -v1 -c public hostname:10161 myMibName::myTable
myMibName::myTable: No entries
Well, I didn't add any default/sample rows to that table in my agent code.
If I try to set some values of the table with snmpset similar to how I did it on scalars, it always fails so table requires its own syntax.
How can I add a row to a table with snmpset or similar?
For example, sample table could look as simple as this one, where 'myString' is index:
MyTableEntrySequence::= SEQUENCE {
myString
OCTET STRING,
test1
Integer32,
test2
Integer32
}
EDIT: I didn't used RowStatus in my table. Am I required to use RowStatus to be able to add new rows?
EDIT2: I've compiled data_set.c agent from net-snmp samples, which populates a sample table with some data and can query its content with snmptable:
snmpwalk -v 1 -c public hostname:10161 netSnmpIETFWGTable
NET-SNMP-EXAMPLES-MIB::nsIETFWGChair1."snmpv3" = STRING: "Russ Mundy"
NET-SNMP-EXAMPLES-MIB::nsIETFWGChair2."snmpv3" = STRING: "David Harrington"