Re: can i generate a table from an exec in snmpd.conf?

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 12/10/2007, repudi8or repudi8or <[email protected]> wrote:
> I would like to extend net-snmp to use some perl scripts producing output in
> a tabular format

> Ideally I want my snmp agent (in my case the Sun SMA Agent - net-snmp
> v5.0.9) to exec this script when polled and return the values in a tabular
> format (similar to the load average table OID .1.3.6.1.4.1.2021.10 ).

Have a look at the 'pass' directive.
That would give you control over the MIB structure generated by your
extension script.
   Or possible use the 'perl' directive to embed perl code directly within
the agent.   See the Wiki page Tut:Extending_snmpd_using_perl for
a provisional description of how to do this.


>  First thing I tried was adding this to my snmpd.conf :-
>  exec .1.3.6.1.4.1.9876.13.13.1 prstatByZoneTable
>      /usr/local/bin/prstatByZone

That's not appropriate for MIB-structured output.
This directive (and the later "extend" directive)  are designed as
simple mechanisms for reporting the output of an arbitrary command.
This output is reported exactly as is - the agent does not attempt to
mangle it into a table form.

If you want a specific MIB structure, then you need to code your
module accordingly.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.