On 30 March 2010 18:24, PEOPLES, MICHAEL P (ATTSI) <[email protected]> wrote:
> - Insert the following line into your snmpd.conf file (the script
> reference is just an example):
>
> exec .1.3.6.1.4.1.2021.250.1.1 threadCount
> /usr/local/bin/threadCount.ksh
One comment about this.
Depending on the version of the agent that you are using,
the directive
"exec {OID} ..... "
may not work.
(Even if it does, the output that it produces is not strictly legal!)
For the last five years, we have been deprecating this directive
in favour of "extend". The basic functionality is the same,
but it's much more configurable, the output is more flexible
and has the minor advantage of being valid SNMP!
> - From your monitoring system, or any other system that can make an
> snmpget poll to the system, issue the following command:
>
> snmpget -c public -v 2c myhost.me.com
> .1.3.6.1.4.1.2021.250.1.1.101.1
Probably the main disadvantage of the newer form is the output
OIDs are slightly less immediately predictable. The new tables
use the name token ("threadCount") to index the output (and
configuration) tables, rather than relying on the ordering of
entries within the config file.
The simplest way to start is probably to omit the {OID} altogether,
and use
extend threadCount /usr/local/bin/threadCount.ksh
Then issue a walk on "NET-SNMP-EXTEND-MIB::nsExtendOutput1Table"
This will report the output in a meaningful fashion. (There's also
"nsExtendOutput2Table", which reports the output one line at a time).
And see also "nsExtendConfigTable", which allows control of the
command to be run (including command-line parameters, input
text, etc).
Alternatively you could take a copy of that MIB file, change the
name of the module, and update the root OID to match the
"extend {OID}" value.
Then the output of walking that root would be interpreted
correctly - the structure is the same as the bare "extend" directive
(another change from the "exec" form).
Dave
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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