Caching SNMP Info

Steve Bonds r1p6os402 at sneakemail.com
Fri Jan 31 22:10:52 CET 2003


On Fri, 31 Jan 2003, [iso-8859-1] Fredrik Wänglund Fredrik.Wanglund-at-datavis.se |Nagios| wrote:

> I changed the line 
> #define DEFAULT_MIBLIST "ALL"
> to
> #define DEFAULT_MIBLIST "NONE"
> in check_snmp.c (the normal plugin) and recompiled. Now no mibs are
> loaded by default.
> 
> The load on my server dropped from around 5-6 to 0-0.5!

I believe it!  Defaulting to "ALL" is unwise, particularly on a
system which might have many MIBs in that directory.  With all the MIBs I
have loaded an "snmpwalk -m all <host> public sysdescr" takes about 15-20s
of CPU-pegged time.

The plugin I'm using (a hacked-up version of the contrib script
check_snmp_disk_monitor.pl by Al Tobey) wisely only loads the two MIBs it
needs.  (Al's original only loaded the one MIB it needed.)

My concern with caching has less to do with Nagios-side usage than with
spamming my WAN with unnecessary SNMP traffic.  (I.e. why should I re-send
an SNMP request when I just made the same request 30s ago?)

It's looking a lot like I just need to persistently cache the data
received (and when) and only re-fetch if the data is stale.

  -- Steve



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list