New Device: ATS - Automatic Transfer Switch (#9889)

* New Device: ATS - Automatic Transfer Switch

* Small fixes

* Fixed test data

* More fixes, again

* Moved temp to php to retrieve limits from device

* Fixed perms again...

* Final test file. Or I hope so...
This commit is contained in:
TheGreatDoc
2019-03-25 00:48:55 +01:00
committed by Tony Murray
parent 546849f326
commit 5535768d25
9 changed files with 2304 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
echo 'ATS Temperature: ';
$descr = 'System';
$oids = [
'atsMiscellaneousGroupAtsSystemTemperture.0',
'emdConfigTempHighSetPoint.0',
'emdConfigTempLowSetPoint.0',
];
$temperature = snmp_get_multi($device, $oids, '-OteQUs', 'ATS-MIB');
if (is_numeric($temperature['0']['atsMiscellaneousGroupAtsSystemTemperture'])) {
$temperature['0']['high_warn'] = $temperature['0']['emdConfigTempHighSetPoint'] - 5;
$temperature['0']['low_warn'] = $temperature['0']['emdConfigTempLowSetPoint'] + 5;
$temperature['0']['oid'] = '.1.3.6.1.4.1.37662.1.2.2.1.1.5.1.0';
discover_sensor($valid['sensor'], 'temperature', $device, $temperature['0']['oid'], 'atsMiscellaneousGroupAtsSystemTemperture', 'ats', 'System', '1', '1', $temperature['0']['emdConfigTempLowSetPoint'], $temperature['0']['low_warn'], $temperature['0']['high_warn'], $temperature['0']['emdConfigTempHighSetPoint'], $temperature['0']['atsMiscellaneousGroupAtsSystemTemperture']);
}