PHPackages                             ocolin/easysnmp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ocolin/easysnmp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ocolin/easysnmp
===============

Bare bones SNMP library

2.3(7mo ago)1243MITPHPPHP &gt;=8.2

Since May 18Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/ocolin/EasySNMP)[ Packagist](https://packagist.org/packages/ocolin/easysnmp)[ RSS](/packages/ocolin-easysnmp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (11)Used By (3)

EasySNMP
========

[](#easysnmp)

About
-----

[](#about)

A bare-bones basic SNMP client. It can be configured either by usein constructor arguments, or using environment variables.

Constructor Arguments
---------------------

[](#constructor-arguments)

- $ip - IP address of device to query.
- $community - Community string of device to query.
- $version - SNMP version of device. Defaults to 2. 3 is not yet supported.
- $prefix - Environment variable prefix. Used when you may be using multiple devices with different environment variable.

Environment Variables
---------------------

[](#environment-variables)

### Default Variables

[](#default-variables)

- SNMP\_IP - IP address of device to query.
- SNMP\_COMMUNITY - Community string of device to query.
- SNMP\_VERSION - SNMP version of device. Defaults to 2. 3 is not yet supported.

### Prefixed Variables

[](#prefixed-variables)

Example with the prefix value 'PREFIX':

- PREFIX\_SNMP\_IP - IP address of device to query.
- PREFIX\_SNMP\_COMMUNITY - Community string of device to query.
- PREFIX\_SNMP\_VERSION - SNMP version of device. Defaults to 2. 3 is not yet supported.

Examples
--------

[](#examples)

### Basic Constructor Arguments

[](#basic-constructor-arguments)

```
$snmp = new \Ocolin\EasySNMP\SNMP(
           ip: '192.168.1.1',
    community: 'public',
      version: 2
);
```

### Environment Constructor

[](#environment-constructor)

```
$_ENV['SNMP_IP'] = '192.168.1.1';
$_ENV['SNMP_COMMUNITY'] = 'public';
$_ENV['SNMP_VERSION'] = 2;

$snmp = new \Ocolin\EasySNMP\SNMP();
```

### Environment Prefix Constructor

[](#environment-prefix-constructor)

```
$_ENV['MY_SNMP_IP'] = '192.168.1.1';
$_ENV['MY_SNMP_COMMUNITY'] = 'public';
$_ENV['MY_SNMP_VERSION'] = 2;

$snmp = new \Ocolin\EasySNMP\SNMP( prefix: 'MY_' );
```

### SNMP Get

[](#snmp-get)

```
$output = $snmp->get(
        oid: '.1.3.6.1.2.1.1.1.0',
    numeric: false
);
```

### SNMP Get Next

[](#snmp-get-next)

```
$output = $snmp->getnext(
        oid: '.1.3.6.1.2.1.1.1.0',
);
```

### SNMP Walk

[](#snmp-walk)

```
$output = $snmp->walk();
```

### SNMP Bulk Walk

[](#snmp-bulk-walk)

```
$output = $snmp->walk(
              oid: '.1.3.6.1.2.1.1.1.0',
             bulk: true,
        enumerate: true
);
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance64

Regular maintenance activity

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~56 days

Recently: every ~41 days

Total

10

Last Release

220d ago

Major Versions

1.5 → 2.02025-05-09

PHP version history (2 changes)v1.4PHP &gt;=8.0

2.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97ac0aa452b872ddc3f7f4c56c83852574a27bb74622f8c054d11ca20008fc9?d=identicon)[Ocolin](/maintainers/Ocolin)

---

Top Contributors

[![ocolin](https://avatars.githubusercontent.com/u/8870196?v=4)](https://github.com/ocolin "ocolin (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ocolin-easysnmp/health.svg)

```
[![Health](https://phpackages.com/badges/ocolin-easysnmp/health.svg)](https://phpackages.com/packages/ocolin-easysnmp)
```

###  Alternatives

[bueltge/wordpress-admin-style

Shows the WordPress admin styles on one page to help you to develop WordPress compliant

98316.4k1](/packages/bueltge-wordpress-admin-style)[bagisto/pwa

Progressive Web Application transforms your website to a mobile application

1134.4k](/packages/bagisto-pwa)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
