mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
13
includes/definitions/ats.yaml
Executable file
13
includes/definitions/ats.yaml
Executable file
@@ -0,0 +1,13 @@
|
||||
os: ats
|
||||
text: Automatic Transfer Switch
|
||||
type: power
|
||||
icon: ats
|
||||
mib_dir: ats
|
||||
nobulk: true
|
||||
over:
|
||||
- { graph: device_current, text: Current }
|
||||
- { graph: device_voltage, text: Voltage }
|
||||
- { graph: device_load, text: Load }
|
||||
discovery:
|
||||
- sysObjectID:
|
||||
- .1.3.6.1.4.1.37662.1.2.2.1
|
104
includes/definitions/discovery/ats.yaml
Executable file
104
includes/definitions/discovery/ats.yaml
Executable file
@@ -0,0 +1,104 @@
|
||||
mib: ATS-MIB
|
||||
modules:
|
||||
sensors:
|
||||
pre-cache:
|
||||
data:
|
||||
- oid:
|
||||
- atsMiscellaneousGroupSystemMaxCurrent
|
||||
- atsInputGroupSourceAvoltageUpperLimit
|
||||
- atsInputGroupSourceAvoltageLowerLimit
|
||||
- atsInputGroupSourceBvoltageUpperLimit
|
||||
- atsInputGroupSourceBvoltageLowerLimit
|
||||
- atsInputGroupSourceAfrequencyUpperLimit
|
||||
- atsInputGroupSourceAfrequencyLowerLimit
|
||||
- atsInputGroupSourceBfrequencyUpperLimit
|
||||
- atsInputGroupSourceBfrequencyLowerLimit
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: atsOutputGroupOutputCurrent
|
||||
value: atsOutputGroupOutputCurrent
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.3.4.{{ $index }}'
|
||||
divisor: 10
|
||||
descr: 'Output'
|
||||
index: 'atsOutputGroupOutputCurrent.{{ $index }}'
|
||||
high_limit: 'atsMiscellaneousGroupSystemMaxCurrent'
|
||||
load:
|
||||
data:
|
||||
-
|
||||
oid: atsOutputGroupLoad
|
||||
value: atsOutputGroupLoad
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.3.5.{{ $index }}'
|
||||
descr: 'Output'
|
||||
index: 'atsOutputGroupLoad.{{ $index }}'
|
||||
high_limit: 100
|
||||
voltage:
|
||||
data:
|
||||
-
|
||||
oid: atsInputGroupSourceAinputVoltage
|
||||
value: atsInputGroupSourceAinputVoltage
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.3.{{ $index }}'
|
||||
descr: 'Input A'
|
||||
index: 'atsInputGroupSourceAinputVoltage.{{ $index }}'
|
||||
high_limit: 'atsInputGroupSourceAvoltageUpperLimit'
|
||||
low_limit: 'atsInputGroupSourceAvoltageLowerLimit'
|
||||
-
|
||||
oid: atsInputGroupSourceBinputVoltage
|
||||
value: atsInputGroupSourceBinputVoltage
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.6.{{ $index }}'
|
||||
descr: 'Input B'
|
||||
index: 'atsInputGroupSourceBinputVoltage.{{ $index }}'
|
||||
high_limit: 'atsInputGroupSourceBvoltageUpperLimit'
|
||||
low_limit: 'atsInputGroupSourceBvoltageLowerLimit'
|
||||
frequency:
|
||||
data:
|
||||
-
|
||||
oid: atsInputGroupSourceAinputFrequency
|
||||
value: atsInputGroupSourceAinputFrequency
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.4.{{ $index }}'
|
||||
divisor: 10
|
||||
descr: 'Input A'
|
||||
index: 'atsInputGroupSourceAinputFrequency.{{ $index }}'
|
||||
high_limit: 'atsInputGroupSourceAfrequencyUpperLimit'
|
||||
low_limit: 'atsInputGroupSourceAfrequencyLowerLimit'
|
||||
-
|
||||
oid: atsInputGroupSourceBinputFrequency
|
||||
value: atsInputGroupSourceBinputFrequency
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.4.{{ $index }}'
|
||||
divisor: 10
|
||||
descr: 'Input B'
|
||||
index: 'atsInputGroupSourceBinputFrequency.{{ $index }}'
|
||||
high_limit: 'atsInputGroupSourceBfrequencyUpperLimit'
|
||||
low_limit: 'atsInputGroupSourceBfrequencyLowerLimit'
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: atsInputGroupSourceAstatus
|
||||
value: atsInputGroupSourceAstatus
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.2.{{ $index }}'
|
||||
descr: 'Input A'
|
||||
index: 'atsInputGroupSourceAstatus.{{ $index }}'
|
||||
state_name: atsInputGroupSourceAstatus
|
||||
states:
|
||||
- { descr: Ok, graph: 0, value: 2, generic: 0 }
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
-
|
||||
oid: atsInputGroupSourceBstatus
|
||||
value: atsInputGroupSourceBstatus
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.2.5.{{ $index }}'
|
||||
descr: 'Input B'
|
||||
index: 'atsInputGroupSourceBstatus.{{ $index }}'
|
||||
state_name: atsInputGroupSourceBstatus
|
||||
states:
|
||||
- { descr: Ok, graph: 0, value: 2, generic: 0 }
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
-
|
||||
oid: atsHmiSwitchGroupBuzzer
|
||||
value: atsHmiSwitchGroupBuzzer
|
||||
num_oid: '.1.3.6.1.4.1.37662.1.2.2.1.1.4.1.{{ $index }}'
|
||||
descr: 'Buzzer'
|
||||
index: 'atsHmiSwitchGroupBuzzer.{{ $index }}'
|
||||
state_name: atsHmiSwitchGroupBuzzer
|
||||
states:
|
||||
- { descr: Disabled, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: Enabled, graph: 0, value: 2, generic: 0 }
|
18
includes/discovery/sensors/temperature/ats.inc.php
Normal file
18
includes/discovery/sensors/temperature/ats.inc.php
Normal 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']);
|
||||
}
|
3
includes/polling/os/ats.inc.php
Executable file
3
includes/polling/os/ats.inc.php
Executable file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
$hardware = snmp_get($device, 'atsIdentGroupFirmwareRevision.0', '-OQv', 'ATS-MIB');
|
Reference in New Issue
Block a user