Link to home
Start Free TrialLog in
Avatar of Mi-Jack
Mi-Jack

asked on

Simple MIB and how to use it from sending application

Hi all,

I'm new to SNMP, and
I need to create a very simple MIB file, with maybe 3-4 OIDs, and then send a trap that would contain one of them.
I tried to do my homework, but I'm baffled with complexity and incoherence of presentation, so please help.
An extremely simple example of an MIB and an example of how to send it (from C#, C++, a utility that does that - anything, as long as the list of parameters is intelligible or explained) will be perfect.
Kinda taking an easy way out here, but it doesn't hurt to try ;-)
Any help is appreciated,
Gene
Avatar of Steve Jennings
Steve Jennings

Creating your own MIB is non-trivial. You dont want to write your own code to do it. You need to get a C SNMP library and call it from your code. You should be able to google for sample C code and a library. No offense, but if you are having trouble at this stage you may be way in over your head. Look at PERL and snmp lib for some examples.

Good liuck,
Steve
Avatar of Mi-Jack

ASKER

I can send and receive in both C++ and C#, I just don't know how utilize an MIB, thats all.
Meaning: if I have an MIB that is specific to a company or product, how do I send a trap to reference that specific information? I can reference an OID defined in that MIB, but what else? How?

Sorry if I didn't make myself clear.
So you C code is acting as thr agent? I see. Sorry. Then you need the conf files to be able to map the mib to. EG, "threshold reached" might be OID 1.2.3.4.5. So you find that oid in the MIB and send the variables associated with it. That is. 1.2 might be the company, 3 might be the entity (CPU) 4 might be five minute rate and 5 might be exceeded.

Good luck,
Steve
Avatar of Mi-Jack

ASKER

Exactly, but how?
I need a one-line example of an MIB entry, then, but this is making more sense already.
Avatar of Mi-Jack

ASKER

not sure what to do with this question. no input, close it please.
ASKER CERTIFIED SOLUTION
Avatar of Steve Jennings
Steve Jennings

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mi-Jack

ASKER

This gives me sufficient help to get where I need it to be, thank you.