mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Adjust code to Best Practice
- More adjustments. Done after the big cleanup PR I’ve gone through discovery and polling folders.
This commit is contained in:
@@ -9,4 +9,3 @@ if (!$os){
|
||||
$os = "fiberhome";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -55,5 +55,3 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
|
||||
discover_sensor($valid['sensor'], 'power', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,5 +2,3 @@
|
||||
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.3854.1.1.6.0", "-OQv", "", ""),'"');
|
||||
$hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.3854.1.1.8.0", "-OQv", "", ""),'" ');
|
||||
|
||||
?>
|
||||
@@ -9,5 +9,3 @@ $hardware .= ' ' . trim(snmp_get($device, "dupsIdentModel.0", "-OQv", "DeltaUPS-
|
||||
$version = trim(snmp_get($device, "dupsIdentUPSSoftwareVersion.0", "-OQv", "DeltaUPS-MIB", ""),'" ');
|
||||
|
||||
# DeltaUPS-MIB::dupsIdentAgentSoftwareVersion.0 = STRING: "2.0h "
|
||||
|
||||
?>
|
||||
@@ -41,4 +41,3 @@ if(is_numeric($mode)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -7,5 +7,3 @@ $hardware .= ' ' . trim(snmp_get($device, "xupsIdentModel.0", "-OQv", "XUPS-MIB"
|
||||
|
||||
# XUPS-MIB::xupsIdentSoftwareVersion.0 = STRING: " FP: 2.01 INV: 2.01 NET: 3.60 "
|
||||
$version = trim(snmp_get($device, "xupsIdentSoftwareVersion.0", "-OQv", "XUPS-MIB", ""),'" ');
|
||||
|
||||
?>
|
||||
@@ -9,5 +9,3 @@ $serial = snmp_get($device, "towerProductSN.1", "-Ovq", "Sentry3-MIB");
|
||||
$version = snmp_get($device, "systemVersion.0", "-Ovq", "Sentry3-MIB");
|
||||
$version = preg_split('/Sentry\ (Switched|Smart)\ CDU\ Version/', $version);
|
||||
$version = $version[1];
|
||||
|
||||
?>
|
||||
|
||||
@@ -125,5 +125,3 @@ elseif ($device['os'] == "pfsense") {
|
||||
$version = $output[2];
|
||||
$hardware = $output[6];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user