mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add support for memory, power status and transceiver monitoring to Fiberstore S3900 series switches (#16225)
This commit is contained in:
committed by
GitHub
parent
090611f6c1
commit
23965cee49
@@ -31,6 +31,26 @@ use LibreNMS\OS;
|
||||
|
||||
class FsSwitch extends OS implements ProcessorDiscovery
|
||||
{
|
||||
public static function normalizeTransceiverValues($value): float
|
||||
{
|
||||
// Convert fixed-point integer thresholds to float
|
||||
$type = gettype($value);
|
||||
if ($type === 'integer') {
|
||||
// Thresholds are integers
|
||||
$value /= 100.0;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function normalizeTransceiverValuesCurrent($value): float
|
||||
{
|
||||
$value = FsSwitch::normalizeTransceiverValues($value);
|
||||
$value *= 0.001; // mA to A
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Discover processors.
|
||||
* Returns an array of LibreNMS\Device\Processor objects that have been discovered
|
||||
|
Reference in New Issue
Block a user