mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 10:58:42 +00:00
fix: function snmp_get delete quotes in snmp query (#7467)
* fix: ups-nut delete quotes in snmp query * fix: ups-nut delete quotes in snmp query * Update snmp.inc.php * Update snmp.inc.php * Update snmp.inc.php * Update snmp.inc.php * Update snmp.inc.php
This commit is contained in:
parent
b2c5d069a7
commit
1dfcde3060
@ -254,6 +254,7 @@ function snmp_get($device, $oid, $options = null, $mib = null, $mibdir = null)
|
||||
|
||||
$cmd = gen_snmpget_cmd($device, $oid, $options, $mib, $mibdir);
|
||||
$data = trim(external_exec($cmd));
|
||||
$data = trim($data, "\" \n\r");
|
||||
|
||||
recordSnmpStatistic('snmpget', $time_start);
|
||||
if (is_string($data) && (preg_match('/(No Such Instance|No Such Object|No more variables left|Authentication failure)/i', $data))) {
|
||||
|
Loading…
Reference in New Issue
Block a user