mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added detection for Hirschmann Railswitch * Update AUTHORS.md I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes (old states and temperatures directories removal) * fix for PR 6207 : state fileupdated
32 lines
963 B
PHP
32 lines
963 B
PHP
<?php
|
|
|
|
if ($device['os'] == 'hirschmann') {
|
|
echo 'Hirschmann Device: ';
|
|
|
|
$descr = 'Temperature';
|
|
$temperature = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmTemperature.0', '-Oqv');
|
|
$temperature_high = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmTempUprLimit.0', '-Oqv');
|
|
$temperature_low = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmTempLwrLimit.0', '-Oqv');
|
|
$temperature_low_warn = $temperature_low + 10;
|
|
$temperature_high_warn = $temperature_high - 10;
|
|
|
|
if ($descr != '' && is_numeric($temperature)) {
|
|
discover_sensor(
|
|
$valid['sensor'],
|
|
'temperature',
|
|
$device,
|
|
'HMPRIV-MGMT-SNMP-MIB::hmTemperature.0',
|
|
'1',
|
|
'hirschmann',
|
|
$descr,
|
|
'1',
|
|
'1',
|
|
$temperature_low,
|
|
$temperature_low_warn,
|
|
$temperature_high_warn,
|
|
$temperature_high,
|
|
$temperature
|
|
);
|
|
}
|
|
}
|