English 中文(简体)
net-snmp: force table to have xxEntry value of 2 instead of 1
原标题:

Using net-snmp, table code generated by mib2c -c mib2c.iterate.conf fooBarTable and then heavily hacked.

Unfortunately the table is defined with an Entry of 2 instead of the normal 1. (I didn t do this, I m trying to make this fit into an existing situation.) The MIB looks something like this:

fooBarTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF FooBarEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION    "blah"
    ::= { fooMIBObjects 8 }

fooBarEntry OBJECT-TYPE
    SYNTAX          FooBarEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "Stuff."
    INDEX { ifIndex }
    ::= { fooBarTable 2 }

When you register the table with net-snmp, you just give it an OID like "...,1,8" (i.e. up to fooBarTable, but not including the Entry). Net-snmp implicitly tacks the .1 to the table OID and then columns, indices, etc.

Is there a semi-supported way to force that entry value to 2? (I.e. without resorting to hacking the bits out of the objects that are passed in to the handler.)

最佳回答

No, sorry: there is no supported way to do that. In part because the MIB you re staring at is not legal under SMIv2.

To implement it, you d either need to change multiple spots in the agent/helper directory (starting near line 328 of table.c and probably other places) or implement a table entirely from scratch without using the helper modules at all.

But nothing mib2c gives you will solve this for you.

问题回答

暂无回答




相关问题
How do I use SNMP to monitor job status on a printer?

I ve been trying to figure out how to monitor job status via SNMP and I have found a solution on Xerox based printers (using Xerox implemented mibs), but I m looking for something that will work ...

SnmpExtensionTrap has a size limit?

I am working on a problem in SNMP extension agent in windows, which is passing traps to snmp.exe via SnmpExtensionTrap callback. We added a couple of fields to the agent recently, and I am starting ...

SNMP on AIX 5.3

I need to monitor a system with AIX 5.3, but can t find a good source for the OIDs. Does anybody know the OIDs for CPU, Memory and Harddisk values?

opensource network monitoring tools developed in java

i want to know the best opensource network monitoring tool developed in java with very good support via forums and which should have the following features .. Fault and Alert mgmt Performance Poll ...

snmp and platform specific information

I need to come with a strategy to use gather information about the health of my linux platform, hardware health such as high CPU temperature and may be disk space usage, etc... I know my examples are ...

SNMP in Java, specifically to be JMX adapter

I have a few JAVA application that I monitor using JMX. I would like to write an SNMP client for these applications that wraps the JMX interface and by discovery exposes the same attributes that are ...

热门标签