mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
snmp exec support (#7126)
* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * add support for snmpd exec
This commit is contained in:
@@ -206,6 +206,7 @@ LibreNMS contributors:
|
||||
- Nick Peelman <nick@peelman.us> (peelman)
|
||||
- Patrick Ryon <patrick@slashdoom.com> (slashdoom)
|
||||
- Mike Williams <mike@mgww.net> (network-guy)
|
||||
- Rob J. Epping <librenms@renf.us> (robje)
|
||||
|
||||
Observium was written by:
|
||||
- Adam Armstrong
|
||||
|
@@ -51,9 +51,15 @@ if ($device['os'] == "linux" || $device['os'] == "endian") {
|
||||
if (empty($hw)) {
|
||||
# Try detect using the extended option (dmidecode)
|
||||
$version_dmide = str_replace("\"", "", snmp_get($device, ".1.3.6.1.4.1.2021.7890.2.4.1.2.8.104.97.114.100.119.97.114.101.1", "-Oqv"));
|
||||
if (!$version_dmide) { # No "extend" support, try "exec" support
|
||||
$version_dmide = str_replace("\"", "", snmp_get($device, ".1.3.6.1.4.1.2021.7890.2.101.1", "-Oqv"));
|
||||
}
|
||||
$version_dmide = trim(str_replace("\"", "", $version_dmide));
|
||||
|
||||
$hardware_dmide = str_replace("\"", "", snmp_get($device, ".1.3.6.1.4.1.2021.7890.3.4.1.2.12.109.97.110.117.102.97.99.116.117.114.101.114.1", "-Oqv"));
|
||||
if (!$hardware_dmide) { # No "extend" support, try "exec" support
|
||||
$hardware_dmide = str_replace("\"", "", snmp_get($device, ".1.3.6.1.4.1.2021.7890.3.101.1", "-Oqv"));
|
||||
}
|
||||
$hardware_dmide = trim(str_replace("\"", "", $hardware_dmide));
|
||||
if ($hardware_dmide) {
|
||||
$hardware = $hardware_dmide;
|
||||
|
Reference in New Issue
Block a user