lnms snmp:fetch command and new SNMP code (#13303)

* SNMP WIP

* cleanup, more types

* Include my snmp:fetch command

* Fix Facade name conflict

* Command WIP
remove mib

* Ignore exit code
cleanups

* Doc blocks and style fixes

* forgot to use parseOid

* Hopefully final fixes

* missed on (:

* small changes
deviates from existing code, hopefully doesn't re-add too many corner cases.

* add some simple tests, will make it easier to add more in the future when we find corner cases.

* test numeric

* API refinements, try to avoid setting textual net-snmp options directly

* change numeric to a toggle makes for nicer usage

* make ci happy

* Some errors happen only in stderr, pass that to SnmpResponse for parsing.
Add error message access

* More consistent naming
This commit is contained in:
Tony Murray
2021-10-01 18:58:12 -05:00
committed by GitHub
parent d63656c1e0
commit a828bb00c3
7 changed files with 804 additions and 1 deletions

View File

@@ -244,7 +244,8 @@ return [
// LibreNMS
'Permissions' => \App\Facades\Permissions::class,
'DeviceCache' => \App\Facades\DeviceCache::class,
'Rrd' => App\Facades\Rrd::class,
'Rrd' => \App\Facades\Rrd::class,
'NetSnmp' => \App\Facades\FacadeAccessorSnmp::class,
],
'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'),