mrcnpdlk / snmp
Snmp utils
1.2.1
2021-09-16 12:08 UTC
Requires
- php: >=7.2
- ext-snmp: *
- mrcnpdlk/lib-configuration: ^0
- mrcnpdlk/lib-exception: ^0
- myclabs/php-enum: ^1
Requires (Dev)
Suggests
- monolog/monolog: ^1|^2
- phpfastcache/phpfastcache: ~6.0
README
This bundle is based on main class of opensolutions/OSS_SNMP project. Is a lightweight fork for simple get() and set() things.
Installation
Install the latest version with composer
composer require mrcnpdlk/snmp
Basic usage
use Mrcnpdlk\Lib\Snmp\Agent; use Mrcnpdlk\Lib\Snmp\Config; use Mrcnpdlk\Lib\Snmp\Enum\Version; require __DIR__ . '/../vendor/autoload.php'; $oConfig = new Config([ 'host' => '10.0.10.10', 'community' => 'some_community', 'version' => Version::VER_1, 'mibFiles' => [__DIR__ . '/some_mib_file.MIB'], ]); $oSnmp = new Agent($oConfig); var_dump($oSnmp->get('masterVoltageL2.0'));