Skip to main content

SNMP MIB Implementation clarification in RI 1.2.1

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
9 replies [Last post]
krushna
Offline
Joined: 2010-09-21
Points: 0

Hi,

I have gone through the document saying RI_Platfrom SNMP Support from Wiki.

I have few queries.

1. When RI boots up Agent will be running in the seperate thread with all the MIBS hosted by it from RI_Platform/src/snmp/orig, The MIB filesare generated from MIB2c utility.

I don't think they will provide default values for the OID'S of those MIBS.

Let's take an example of hrStorage.c file under "RI_Platform/src/snmp/orig"

If some one queries for the OID 1,3,6,1,2,1,25,2,2 then the implementation

case MODE_GET:

snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,

(u_char *) /* XXX: a pointer to the scalar's data */,

/* XXX: the length of the data in bytes */);

Won't retun any thing.

Please comment on this.

2. If MIB2c Utility registers for all the OID's where some are part of RI_Stack like Application information table, Since the registration for the OID happened from the platform the registration for the same OID never succeed and we never get the values when some one queries for the OID.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
smaynard
Offline
Joined: 2009-01-27
Points: 0

1): The .c files found in "orig" have not had patches applied, it is only after the .patch files are applied that the .c files have default values and can be built...

Are you able to "make mibtest"?

If you are trying to update the MIBs, are you able to "make mibsourceupdate"?

2): OIDs you like to "own" can be removed by using the IGNORE_MIBS list within the Makefile. I will also look into why they can't be overridden. Maybe an interface to remove a handler is missing.

krushna
Offline
Joined: 2010-09-21
Points: 0

Hi Thanks for the information.

Fee more clarifications.

Once i build the RI code i can see all the patch files, let's take an exampe of hrStorage.c, hrStorage.h and hrStorage.patch.

When the patch will be applied to the actual file, is it a manual process ? Then how it should be done.

Next step := Let's say the patch applied successfully can i query the default value fromt the MIBManager.queryMIBS(hrStorage.OID) assuming all the ports are configured properly ?

Where( under which path) and when can i run the make mibtest ?

For IGNORE_MIBS currently the Application information table is not part of IGNORE MIBS. So we can add to IGNORE_MIBS and check weather the MIB part of the stack is overridden.

Please provide the information.

smaynard
Offline
Joined: 2009-01-27
Points: 0

You should look at the Makefile in $PLATFORMROOT/src/snmp - this is where the patches are applied automatically during make under the mibsource target which is run by the default build target.

You should be able to query the OID if your configuration is correct. I tested it from a SNMP manager (iReasoning).

The path for building the agent in the RI platform is: $PLATFORMROOT/src/snmp.

you can modify the IGNORE_MIBS in the aforementioned makefile to prevent the platform from installing handlers for that respective MIB.

If this is not working for you, please provide information about your environment (OS, SNMP tools that are installed, etc.)

krushna
Offline
Joined: 2010-09-21
Points: 0

Hi,

I can see the patch applied during the build proicess.

I have run the make mibtets under the RI_platform/src/snmp it listed all the supported MIBS.

Now i am trying to retrieve the default values from platform MIBS : I have build the RI and run the RI, Agent should be running as part of RI and listening for the requests.

then i am querying from the MIBBrowser(iReasoning)

Configuration of iReasoning is : Address : 127.0.0.1

port : 10161

SNMP vaersion : 2

when i query for the OID : 1.3.6.1.2.1.25.2.2 ( hrStorage) i am getting the error pop up saying that snmp request timed out. With possible errors like :

SNMPVersion Number is not supported OR Agent is down or not reachable OR community name is not right

DO i need to change any other configuration. to get it work ?

How can i know the agent is really running as part of RI ?

I think 1.3.6.1.2.1.25.2.2 is a leaf MIB then why it is not ending with 0 ? I guess it should be 1.3.6.1.2.1.25.2.2 .0, But MIB2c Utility generated code is not adding the zero, please clarify

smaynard
Offline
Joined: 2009-01-27
Points: 0

The read community string should be set to: public

The write community string should be set to: private

The ending .0 is handled by the Net-SNMP agent router and mib2c generates code to be installed without it.

krushna
Offline
Joined: 2010-09-21
Points: 0

Hi

I have added the read and write community to the configuration, but still i am not getting the values.

I tried from MIBBrowser as well as from command prompt

I am getting No response from the localhost.

I can see the agent running from the logs, but why the request is not processed.

Please see the logs attached when i query for the SystemDescription (.1.3.6.1.2.1.1.1.0) from MIBBroser.

smaynard
Offline
Joined: 2009-01-27
Points: 0

Please send the full log using -capall on the command line

krushna
Offline
Joined: 2010-09-21
Points: 0

Here I am attaching the full logs with -capall.

smaynard
Offline
Joined: 2009-01-27
Points: 0

from the "no com2sec entries" log, it looks like you're missing the platformAgent.conf file...

Do you have one in $RICOMMONROOT/snmp/ ?