Sledge::Plugin::SNMP - Object oriented interface to SNMP
package Foo::Pages::Bar; use Sledge::Plugin::SNMP; sub dispatch_baz { my $self = shift; $self->snmp->laLoad1; $self->snmp->addfunc( disk => '.1.3.6.1.4.1.2021.9.1.9.1' ); $self->snmp->disk; }
Sledge::Plugin::SNMP provide the function which acquires a server resource by using SNMP. you can add new method or overwrite method by using the addfunc( method => MIS ).
this plugin have the following method by the default.
ssCpuUser() ssCpuSystem() ssCpuIdle() laLoad1() laLoad2() laLoad3() memTotalSwap() memAvailSwap() memTotalReal() memAvailReal() memTotalFree() memShared() memBuffer() memCached() addfunc( method = MIS )
you must write config in Config/_common.pm, like this.
$C{SNMP} = { -hostname => 'localhost', -community => 'public', -port => 161 };
TSUNODA Kazuya <drk@drk7.jp>
Net::SNMP
To install Sledge::Plugin::SNMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sledge::Plugin::SNMP
CPAN shell
perl -MCPAN -e shell install Sledge::Plugin::SNMP
For more information on module installation, please visit the detailed CPAN module installation guide.