Skip to content

mrcnpdlk/snmp

Repository files navigation

SNMP Utils

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'));