Hi all,
I have a software package for which I need to report some status /
configuration tables via SNMP/AgentX. Each table has a bunch of
key=value pairs, where the list of keys could change in time (e.g. with
new version), so I prefer not to hardcode them to the MIB directly.
1) My idea is to have some simple tables:
One table should be read only for status reports:
myDevice.tabStatus.varName.0 = STRING: "num_connections"
myDevice.tabStatus.varName.1 = STRING: "mem_used"
myDevice.tabStatus.varValue.0 = STRING: 123
myDevice.tabStatus.varValue.1 = STRING: 98765
The other read-write for setting system variables:
myDevice.tabConfig.varName.0 = STRING: "max_connections"
myDevice.tabConfig.varName.1 = STRING: "max_mem"
myDevice.tabConfig.varValue.0 = STRING: 999
myDevice.tabConfig.varValue.1 = STRING: 99999
So this is the basic. Drawback is it could be a bit of pain to do GET/
SET as I'll need to query the whole list of names from
myDevice.tabStatus.varName, get the index of what I want and only then
in another query get the actual variable.
Or is there a shortcut? like:
snmpget tabStatus.varValue.(tabStatus.varName=="mem_used")
... I doubt so.
Another thing is that I'll need to return all varValue.X as STRINGs even
if some of them are actually integers. Or can I have each index in a
table of a different type?
2) Now I thought it would be nice to have some well known and often used
status and config variables accessible directly through MIB, e.g.
myDevice.statusVar.num_connections = INTEGER: 123
the drawback being that the names are hardcoded in the MIB which may
become obsolete once we add new variables. OTOH I could specify the
variable types (some are STRING, some are INTs).
3) Or perhaps all of them in a similar fashion to what 'extend' does in
snmpd.conf, i.e.
"myDevice.statusVar."num_connections" = INTEGER: 123"
>From the user perspective it looks cool but is it a clean way to do from
the SNMP/MIB point? Plus - can I list all variables in such case? And
again I'll probably have to work without types, i.e. all-STRINGs.
What would you recommend?
Is is OK to have one variable accessible in two ways, i.e. via both #1
and #2 or #3? I'm sure #1 is by far the most flexible while the others
are more convenient. So my preference would be #1 plus either #2 or #3.
BTW How should I assign OID to my MIB? Do I need to apply for an
Enterprise ID with IANA? Is there an OID reserved for testing / development?
I don't know yet much about designing and writing MIBs so I'm seeking
some advices here. Any thoughts and pointers are highly appreciated!
Thanks
Michal
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users