mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Query the distro script at SNMP OID .1.3.6.1.4.1.2021.7890.1 for FreeBSD systems (like it is already done for Linux systems)
This commit is contained in:
@@ -78,7 +78,19 @@ elseif ($device['os'] == "freebsd") {
|
||||
else {
|
||||
$hardware = "i386";
|
||||
}
|
||||
$features = "GENERIC";
|
||||
|
||||
# Distro "extend" support
|
||||
$features = snmp_get($device, ".1.3.6.1.4.1.2021.7890.1.3.1.1.6.100.105.115.116.114.111", "-Oqv", "UCD-SNMP-MIB");
|
||||
$features = str_replace("\"", "", $features);
|
||||
|
||||
if (!$features) { # No "extend" support, try "exec" support
|
||||
$features = snmp_get($device, ".1.3.6.1.4.1.2021.7890.1.101.1", "-Oqv", "UCD-SNMP-MIB");
|
||||
$features = str_replace("\"", "", $features);
|
||||
}
|
||||
|
||||
if (!$features) {
|
||||
$features = 'GENERIC';
|
||||
}
|
||||
}
|
||||
elseif ($device['os'] == "dragonfly") {
|
||||
list(,,$version,,,$features,,$hardware) = explode (" ", $poll_device['sysDescr']);
|
||||
|
Reference in New Issue
Block a user