Using SNMP as an alternative to NRPE

Robert Hajime Lanning lanning at lanning.cc
Mon Jul 17 23:27:36 CEST 2006


For check_swap, I have a perl script plugin (using ePN) that queries
memTotalSwap and memAvailSwap SNMP variables.  No need to install
a seperate script on the client.

I have also added:

   use SNMP 5.0;
   SNMP::loadModules("ALL");

To the top of p1.pl to load the mibs once at Nagios startup.

Converting all my SNMP plugins to perl along with the two lines
above, brought my Nagios server from a load peaking above 3 to
a load peaking just above .3.

I use SNMP almost exclusively.  Checks against other network
services (HTTP, SSH, SMTP...) use their respective plugins.

I try to touch the clients as little as possible.
For Solaris (the majority of my *nix hosts) I use NET-SNMP from
sunfreeware.com.  So, I install two packages, a startup script
and a default config file (locked down to only a ro community.)

<quote who="Joerg Linge">
> Am Montag, 17. Juli 2006 17:26 schrieb jeffrey at hyves.nl:
>> Sorry  :)
>>
>> I'm running snmp version 5.2.2 on nearly 200 machines (some pentium
>> 4,
>> 3ghz machines, others dual opterons 248), all being checked by the
>> Nagios host. I'm using the snmp scripts from
>> http://www.manubulon.com/nagios/ and have them all setup to use v2c.
>> The
>> snmp configs are set-up with just a rocommunity.
>
> I use net-snmp to execute tho local plugins via snmp get method.
>
> In /etc/snmpd.conf every check is defined.
>
> ---
> exec 1.3.6.1.4.1.7411.10 check_swap
> /usr/local/nagios/libexec/check_swap -w
> 20% -c 10%
> ---
>
> If you run an snmpwalk on 1.3.6.1.4.1.7411.10 you will get the result
> for
> check_swap.
>
> snmpwalk -v1 -On -c <comm> localhost .1.3.6.1.4.1.7411.10
> .1.3.6.1.4.1.7411.10.1.1 = INTEGER: 1
> .1.3.6.1.4.1.7411.10.2.1 = STRING: "check_swap"
> .1.3.6.1.4.1.7411.10.3.1 = STRING:
> "/usr/local/nagios/libexec/check_swap -w
> 20% -c 10%"
> .1.3.6.1.4.1.7411.10.100.1 = INTEGER: 0
> .1.3.6.1.4.1.7411.10.101.1 = STRING: "SWAP OK - 100% free (2055 MB out
> of 2055
> MB) |swap=2055MB;411;205;0;2055"
> .1.3.6.1.4.1.7411.10.102.1 = INTEGER: 0
> .1.3.6.1.4.1.7411.10.103.1 = ""
>
> I use SNMP on all Linux Maschines an it works fine for me.
>
> Jörg
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null


-- 
And, did Guloka think the Ulus were too ugly to save?
                                         -Centauri


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list