mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -102,6 +102,22 @@ return [
|
||||
'compat' => '[deprecated] Mimic the behaviour of gen_smokeping.php',
|
||||
],
|
||||
],
|
||||
'snmp:fetch' => [
|
||||
'description' => 'Run snmp query against a device',
|
||||
'arguments' => [
|
||||
'device spec' => 'Device to query: device_id or hostname/ip',
|
||||
'oid' => 'SNMP OID to fetch. Should be either MIB::oid or a numeric oid',
|
||||
],
|
||||
'failed' => 'SNMP command failed!',
|
||||
'oid' => 'OID',
|
||||
'options' => [
|
||||
'type' => 'The type of snmp query to perform :types',
|
||||
'output' => 'Specify the output format :formats',
|
||||
'numeric' => 'Numeric OIDs',
|
||||
],
|
||||
'not_found' => 'Device not found',
|
||||
'value' => 'Value',
|
||||
],
|
||||
'translation:generate' => [
|
||||
'description' => 'Generate updated json language files for use in the web frontend',
|
||||
],
|
||||
|
Reference in New Issue
Block a user