Skip to content

Laravel SNMP package wrapper for Nelisys/Snmp class

License

Notifications You must be signed in to change notification settings

onurkose/SNMPWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SNMPWrapper

Laravel SNMP package wrapper for Nelisys/Snmp class

Requirements

Requires: Nelisys/Snmp and net-snmp-utils

Installation

Install via Composer.

$ composer require onurkose/snmp-wrapper

Add to config/app.php.

<?php

return [

    // ...

    'providers' => [
        // ...
        OnurKose\SNMPWrapper\SNMPWrapperServiceProvider::class,
    ],

    // ...

    'aliases' => [
        // ...
        'SNMPWrapper' => OnurKose\SNMPWrapper\Facades\SNMPWrapper::class,
    ],
];

Usage

<?php

namespace App\Http\Controllers;

use OnurKose\SNMPWrapper;

use App\Http\Controllers\Controller;

class SNMPController extends Controller
{

    public function get()
    {
        $snmp = new SNMPWrapper();
        
        $snmp::setHost('192.168.0.1', 'public');
        
        dd($snmp::get('.1.3.6.1.2.1.1.1.0'));
    }
}

Result of the test method get()

Array
(
    [.1.3.6.1.2.1.1.1.0] => LigoDLB 5-20n v7.57.51319
)

License

Laravel SNMPWrapper is open-sourced software licensed under the MIT license.

About

Laravel SNMP package wrapper for Nelisys/Snmp class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages