Re: Net-SNMP perl plugin with Nagios

Peter Hicks <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <1290185169.15943.7.camel@angel>
Hi Dave

On Tue, 2010-11-16 at 08:57 +0000, Dave Shield wrote:

> Hmmm... that sounds as if they might be competing with each other
> in some way.  Perhaps some form of locking.

> What sort of response do you see with a single plugin?

Running the plugin on the command-line takes about 0.5s of CPU time, and
I can't get this much lower.

> If this is slow, then I might suggest you try tweaking the
> plugin to use numeric OIDs and results, and suppress the
> loading of the MIB files.

That's a good idea - although I will have to re-code it not to use
gettable, as (when I contributed the code some years ago) it uses
$SNMP::MIB to look up MIB data.

Thanks for your suggestion of just retrieving a single column - which
will actually be a column and the index.  I tried this, retrieving just
a single column, using gettable($table_name, 'columns' =>
[ $element_state ]).  It doesn't speed things up much as there are only
three columns in the table!  However, in the interests of efficiency,
I'll keep it.

> Can you run the scripts manually (rather than via Nagios)?

I can, and they run quickly.  I haven't been able to reproduce the
problem as the scripts all complete within a very short space of time.

Just a thought, does the process of loading MIBs in multiple processes
at once cause any problems?

I think the next task is to try the folks over on the Nagios mailing
list, see if they can shed any light.

Regards,


Peter



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
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.