This is a discussion on Re: extend script to gather host data - SNMP ; On 18/02/2008, Joey Officer wrote: > I know I need to if this is the best way to provide output, and whether or > not I should include the individual field name within the result (ie cpu: > 0.0 or ...
On 18/02/2008, Joey Officer
> I know I need to if this is the best way to provide output, and whether or
> not I should include the individual field name within the result (ie cpu:
> 0.0 or just 0.0 ).
That's up to you.
What are you going to do with the output?
If your client-side processing would be easier without the internal field names,
then omit them. If you feel it would be easier to understand the output with
them included (and doing so woudn't impact on any automated processing)
then leave them in.
> UCD-SNMP-MIB::ucdavis.18.104.22.168.22.214.171.124.126.96.36.199 .116
> = INTEGER: 30 -- I assume this means I have 30 lines to output.
This is effectively the MIB object "NET-SNMP-EXTEND-MIB::nsExtendOutNumLines"
(relocated relative to the root OID you specified).
> Is there a way to provide either an index,
See the final block of results - which display the same information one line
at a time.
You might find this easier to follow if you used the config directive:
extend showstat /bin/sh /tmp/var-snmp.sh agetty
and then walked "NET-SNMP-EXTEND-MIB::nsExtendObjects"
This will then display meaningful names and indexes.
> Once I get this part completed, what is the best way to build an MIB for
> release so that others could use this.
The "extend" mechanism is intended to support the output of arbitrary
scripts, formatted in a fixed manner. It's probably the easiest way to make
information available quickly.
But if you want to implement a particular MIB (either pre-defined or one
you've written yourself), then this is not the best approach. You might
need to look at implementing the MIB "properly" using either a C-based
MIB module, or the "pass" script.
In both these latter cases, you're moving the complexity from the client
side (handling arbitrary data presented within a fixed structure), to the
agent/MIB side (presenting the same data in a more tailored format).
We can't really advise as to which is the best approach for you to adopt.
You would need to consider the requirements/expectations/etc of your user base.
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: