Writing SNMP MIBs from C Structs?
darthtuttle asks: "So I'm working on collecting some stats from the Solaris kernel via the kstat interface and a few others, and I'm going to advertise them via SNMP and graph them with MRTG, however...writing the MIB is going to take forever, not to mention handling three versions of Solaris and different information based on what class of machine. My questions is, does anyone know of a way to take a C structure, mix some additional info (like where in the MIB it goes) and output a MIB definition? I swear, writing the MIB definition is harder then writing the C code to compile in to net-snmp!"
Decisions, decisions. Post at +2 or not? It's an extra click to post at +1, so +2 it is. Taco should change the default to +1.
If the original message was a waste of electrons, then your threads are a waste too. Have you considered that all electrons are actually recycled, and thus you can't really waste them?
If tits were wings it'd be flying around.
From http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query =mib&action=Search
Management Information Base
(MIB) A database of managed objects acessed by network management protocols. An SNMP MIB is a set of parameters which an SNMP management station can query or set in the SNMP agent of a network device (e.g. router).
SNMP has two standard MIBs. The first, MIB I, was established in RFC 1156, was defined to manage TCP/IP-based internets. MIB II, defined in RFC 1213, is basically an update to MIB I.
Standard minimal MIBs have been defined, and many hardware (and certain software, e.g. DBMS) providers have developed private MIBs in ASN.1 format allowing them to be compiled for use in a Nework Management System. In theory, any SNMP manager can talk to any SNMP agent with a properly defined MIB.
See also client-server model.
(1994-11-14)
Once the data is exposed via SNMP he can use standard SNMP tools (like MTRG) to get and analyze the data.
The problem that he's having is in exposing the data.
I took a quick peek at yahoo for info on how to write a MIB... go to http://google.yahoo.com/bin/query?p=how+to+write+a +MIB&hc=0&hs=0
I think that your best bet is to search for examples on the net.
I suggest that you read The Simple Book (and check out this listing).
(The tools that I work on use MIBs for network discovery)
I suggest that if you don't know about a topic in Ask Slashdot that you go do a little web searching rather than simply post statements like "I don't get it."
Try helping yourself. I was able to find tons of information by just doing a 5 second search.
I still don't have the faintest idea what he wants to do, though, but I'd like to get enlightened
If you want to know more about SNMP, check out this PDF.
One could also check out my friend's homepage, where he offers SNMP walks of his badass Olicom Switch. Node 2 is interesting.
Bo