mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Rewrite ups-nut discovery to SnmpQuery:: (#15850)
* modernize and move ups-nut to unix * fix test data (group and invalid runtime) * add Battery Temperature to test data * lnms dev:check style
This commit is contained in:
@@ -191,7 +191,7 @@ class ModuleTestHelper
|
||||
$collection_output = preg_replace('/\033\[[\d;]+m/', '', $collection_output);
|
||||
|
||||
// extract snmp queries
|
||||
$snmp_query_regex = '/^SNMP\[\'.*snmp(?:bulk)?(walk|get|getnext)\' .+\'(udp|tcp|tcp6|udp6):(?:\[[0-9a-f:]+\]|[^:]+):[0-9]+\' \'(.+)\'\]$/m';
|
||||
$snmp_query_regex = '/SNMP\[\'.*snmp(?:bulk)?(walk|get|getnext)\' .+\'(udp|tcp|tcp6|udp6):(?:\[[0-9a-f:]+\]|[^:]+):[0-9]+\' \'(.+)\'\]/m';
|
||||
preg_match_all($snmp_query_regex, $collection_output, $snmp_matches);
|
||||
|
||||
// extract mibs and group with oids
|
||||
|
||||
Reference in New Issue
Block a user