monm_snmp - SNMP checker for App::MonM
Version 1.01
monm_snmp [-ST] [-v VERSION-SNMP] [ --mibs=ALL ] [-t MICROSECS] [-s HOST] [-c COMMUNITY] OBJECT monm_snmp -s 192.168.1.1 -c test .1.3.6.1.2.1.1.1 monm_snmp -s 192.168.1.1 -c test -S .1.3.6.1.2.1.1.1.0 monm_snmp -s 192.168.1.1 -c test -M IF-MIB -T ifTable monm_snmp -s 192.168.1.1 -c test -T IF-MIB::ifTable
Community name
Default: public
Show short help information and quit
Show long help information and quit
Set MIBS value
Host of SNMP
Default: localhost
Enable strict mode. All OIDs must be only as is long-format strings
monm_snmp -S .1.3.6.1.2.1.1.1.0
Timeout of SNMP requests in microseconds
Default: 1000000
Enable table mode
monm_snmp -T ifTable monm_snmp -T IF-MIB::ifTable
Version of SNMP (default = 2c)
SNMP checker for App::MonM
Returns memory size
Returns memory free
Returns swap size
Returns swap free
Returns cpu user usage
Returns cpu system usage
{ '1' => { 'ifAdminStatus' => 'up', 'ifDescr' => 'lo', 'ifInDiscards' => '0', 'ifInErrors' => '0', 'ifInNUcastPkts' => '0', 'ifInOctets' => '131152886', 'ifInUcastPkts' => '9442417', 'ifInUnknownProtos' => '0', 'ifIndex' => '1', 'ifLastChange' => '0:0:00:00.00', 'ifMtu' => '65536', 'ifOperStatus' => 'up', 'ifOutDiscards' => '0', 'ifOutErrors' => '0', 'ifOutNUcastPkts' => '0', 'ifOutOctets' => '131152886', 'ifOutQLen' => '0', 'ifOutUcastPkts' => '9442417', 'ifPhysAddress' => '', 'ifSpecific' => '.0.0', 'ifSpeed' => '10000000', 'ifType' => 'softwareLoopback' }, }
Returns interface list
{ '1' => { 'hrStorageAllocationUnits' => '1024 Bytes', 'hrStorageDescr' => 'Physical memory', 'hrStorageIndex' => '1', 'hrStorageSize' => '1015016', 'hrStorageType' => '.1.3.6.1.2.1.25.2.1.2', 'hrStorageUsed' => '618296' }, }
Returns storage table
SNMP as Net-SNMP (see down)
To use this module, you must have Net-SNMP installed on your system. More specifically you need the Perl modules that come with it.
DO NOT INSTALL SNMP or Net::SNMP from CPAN!
The SNMP module is matched to an install of net-snmp, and must be installed from the net-snmp source tree.
The Perl module SNMP is found inside the net-snmp distribution. Go to the perl/ directory of the distribution to install it, or run ./configure --with-perl-modules from the top directory of the net-snmp distribution.
SNMP
./configure --with-perl-modules
Net-SNMP can be found at http://net-snmp.sourceforge.net
Version 5.3.2 or greater is recommended.
Redhat Users: Some versions that come with certain versions of Redhat/Fedora don't have the Perl library installed. Uninstall the RPM and install by hand.
Ubuntu Users: sudo apt-get install snmp snmp-mibs-downloader libsnmp-perl
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See https://dev.perl.org/licenses/
To install App::MonM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MonM
CPAN shell
perl -MCPAN -e shell install App::MonM
For more information on module installation, please visit the detailed CPAN module installation guide.