LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2007, 04:42 PM   #1
clacour
Member
 
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98

Rep: Reputation: 16
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.
 
Old 07-28-2007, 02:22 PM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMP OID for slackware linux coolrock Slackware 2 09-27-2006 03:23 AM
snmp set my oid alaios Linux - Networking 2 06-02-2005 10:57 PM
printing oid ? jinx@king Linux - Networking 1 06-01-2005 01:07 AM
Why cannot I get the OID?? davyzhang Programming 1 05-09-2005 07:16 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration