snmp.unescape setting (#13590)

* snmp.unescape setting
Works around issue with (I think net-snmp < 5.8.0) where it adds backslashes.

* Updated test data
This commit is contained in:
Tony Murray
2021-11-30 21:33:18 -06:00
committed by GitHub
parent d69674b36e
commit 5ce7a5ad0e
5 changed files with 38 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ use Illuminate\Support\Str;
use LibreNMS\Data\Store\Rrd;
use LibreNMS\DB\Eloquent;
use LibreNMS\Util\Debug;
use LibreNMS\Util\Version;
use Log;
class Config
@@ -473,6 +474,9 @@ class Config
if (! self::has('rrdtool_version')) {
self::persist('rrdtool_version', Rrd::version());
}
if (! self::has('snmp.unescape')) {
self::persist('snmp.unescape', version_compare(Version::get()->netSnmp(), '5.8.0', '<'));
}
self::populateTime();