Skip to content

dcortez/snmp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

snmp

PHP Class for net-snmp commands

Requirements

Requires: net-snmp-utils

For RedHat/CentOS 6, 7

[root@centos ~]# yum install net-snmp-utils

For Debian/Ubuntu

[root@debian ~]# apt-get install snmp

Installation with Composer

$ composer require dcortez/snmp

Usage

Example php file.

// test-snmp.php
require 'vendor/autoload.php';

use dcortez\Snmp;

$snmp = new Snmp('127.0.0.1', 'public', '2c', '5'); // <ip>, <community>, <snmp_version>, <timeout>
print_r($snmp->get('.1.3.6.1.2.1.1.1.0'));

Test run php file.

$ php test-snmp.php
Array
(
    [.1.3.6.1.2.1.1.1.0] => Linux test.example.com
)

About

PHP Class for net-snmp commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%