LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to override one OID in SNMP? (https://www.linuxquestions.org/questions/linux-general-1/how-to-override-one-oid-in-snmp-572825/)

clacour 07-27-2007 04:42 PM

How to override one OID in SNMP?
 
My company is using a product called Orion from Solar Winds, and I've been tasked with making it work.

It's trying to get ssCpuIdle (OID 1.3.6.1.4.1.2021.11.11.0 ), which net-snmp (version 5.1.2, as provided in Red Hat EL 4) doesn't provide. (They provide the OID, but the value never changes.)

I want to override that OID - and ONLY that OID - with my own stuff.

I can't use sh, because it puts the results in a different OID.

I can kinda sorta use pass, but pass hands control over to my routine for the rest of the query, and my script isn't designed to come up with all the rest of the values. Also, I can't have more than one "pass" statement in my config file that way - it would hand things over to the first one it came to, expecting it to handle everything after, and I expect to have to do this for several OIDs.

I could use "override", but it doesn't seem set up for dynamic data, only for fixed stuff.

SNMP proxies and AgentX stuff looks to be beyond my skills. I can probably figure it out eventually, but I have better things to do with the next two or three months than pick apart the innards of SNMP.

In case the above wasn't entirely clear, I want to:

1) Write a simple script to provide a value that Orion is looking for, and net-snmp doesn't provide.
2) Tell net-snmp to ignore its own stuff for that one specific OID, and to use my script instead.
3) Then, net-snmp should go back to handling everything else itself.

Any light you can shed on this problem will be appreciated.

dwhitney67 07-28-2007 02:22 PM

Consider developing your own snmp client (that your company can use). This client will serve as a front-end to net-snmp.

Any requests sent to your client are forwarded to net-snmp, and then after you receive the response, replace the value for the ssCpuIdle OID with your specific value. It's actually quite easy, however you will need SNMP header files and libraries. I think Agent++ will suit your needs (go here: http://www.agentpp.com/).

It's been awhile since I have dealt with SNMP (at least 4 years). I would normally recommend that someone take a peak at Frank Fock's site (http://www.fock.de/frank/english/), but it appears that his links to SNMP and Agent++ are missing. Maybe it is only a temporary thing.


All times are GMT -5. The time now is 02:58 PM.