mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove apc-ats os and merge sensors into apc (#9262)
* remove_apc-ats * add test data * delete apc-ats.snmprec * add apc_ats variant test file * fix os in json * Updated json test files * Updated json test data
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
os: apc-ats
|
||||
text: 'APC Automatic Transfer Switch'
|
||||
type: power
|
||||
icon: apc
|
||||
mib_dir:
|
||||
- apc
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
discovery:
|
||||
- sysObjectID:
|
||||
- .1.3.6.1.4.1.318.1.3.32
|
@@ -1,65 +0,0 @@
|
||||
mib: PowerNet-MIB
|
||||
modules:
|
||||
sensors:
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: atsStatusSourceAStatus
|
||||
value: atsStatusSourceAStatus
|
||||
state_name: atsStatusSourceAStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.12.
|
||||
index: 'atsStatusSourceAStatus.{{ $index }}'
|
||||
descr: Source A Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSourceBStatus
|
||||
value: atsStatusSourceBStatus
|
||||
state_name: atsStatusSourceBStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.13.
|
||||
index: 'atsStatusSourceBStatus.{{ $index }}'
|
||||
descr: Source B Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSwitchStatus
|
||||
value: atsStatusSwitchStatus
|
||||
state_name: atsStatusSwitchStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.10.
|
||||
index: 'atsStatusSwitchStatus.{{ $index }}'
|
||||
descr: Global Switch Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSelectedSource
|
||||
value: atsStatusSelectedSource
|
||||
state_name: atsStatusSelectedSource
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.2.
|
||||
index: 'atsStatusSelectedSource.{{ $index }}'
|
||||
descr: Selected Source
|
||||
states:
|
||||
- { descr: Source A, graph: 0, value: 1, generic: 3 }
|
||||
- { descr: Source B, graph: 0, value: 2, generic: 3 }
|
||||
-
|
||||
oid: atsStatusRedundancyState
|
||||
value: atsStatusRedundancyState
|
||||
state_name: atsStatusRedundancyState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.3.
|
||||
index: 'atsStatusRedundancyState.{{ $index }}'
|
||||
descr: Redundancy State
|
||||
states:
|
||||
- { descr: Redundancy Lost, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: Fully Redundant, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusPhaseSyncStatus
|
||||
value: atsStatusPhaseSyncStatus
|
||||
state_name: atsStatusPhaseSyncStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.14.
|
||||
index: 'atsStatusPhaseSyncStatus.{{ $index }}'
|
||||
descr: Phase Sync Status
|
||||
states:
|
||||
- { descr: In Sync, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: Out Of Sync, graph: 0, value: 2, generic: 2 }
|
@@ -164,6 +164,66 @@ modules:
|
||||
oid: rPDU2SensorTempHumidityStatusHumidityStatus
|
||||
op: '='
|
||||
value: 1
|
||||
-
|
||||
oid: atsStatusSourceAStatus
|
||||
value: atsStatusSourceAStatus
|
||||
state_name: atsStatusSourceAStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.12.
|
||||
index: 'atsStatusSourceAStatus.{{ $index }}'
|
||||
descr: Source A Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSourceBStatus
|
||||
value: atsStatusSourceBStatus
|
||||
state_name: atsStatusSourceBStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.13.
|
||||
index: 'atsStatusSourceBStatus.{{ $index }}'
|
||||
descr: Source B Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSwitchStatus
|
||||
value: atsStatusSwitchStatus
|
||||
state_name: atsStatusSwitchStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.10.
|
||||
index: 'atsStatusSwitchStatus.{{ $index }}'
|
||||
descr: Global Switch Status
|
||||
states:
|
||||
- { descr: Fail, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: OK, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusSelectedSource
|
||||
value: atsStatusSelectedSource
|
||||
state_name: atsStatusSelectedSource
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.2.
|
||||
index: 'atsStatusSelectedSource.{{ $index }}'
|
||||
descr: Selected Source
|
||||
states:
|
||||
- { descr: Source A, graph: 0, value: 1, generic: 3 }
|
||||
- { descr: Source B, graph: 0, value: 2, generic: 3 }
|
||||
-
|
||||
oid: atsStatusRedundancyState
|
||||
value: atsStatusRedundancyState
|
||||
state_name: atsStatusRedundancyState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.3.
|
||||
index: 'atsStatusRedundancyState.{{ $index }}'
|
||||
descr: Redundancy State
|
||||
states:
|
||||
- { descr: Redundancy Lost, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: Fully Redundant, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: atsStatusPhaseSyncStatus
|
||||
value: atsStatusPhaseSyncStatus
|
||||
state_name: atsStatusPhaseSyncStatus
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.8.5.1.14.
|
||||
index: 'atsStatusPhaseSyncStatus.{{ $index }}'
|
||||
descr: Phase Sync Status
|
||||
states:
|
||||
- { descr: In Sync, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: Out Of Sync, graph: 0, value: 2, generic: 2 }
|
||||
|
||||
temperature:
|
||||
data:
|
||||
|
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
$oids = 'atsIdentSerialNumber.0 atsIdentModelNumber.0 atsIdentFirmwareRev.0';
|
||||
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs', 'PowerNet-MIB');
|
||||
d_echo($data);
|
||||
|
||||
$version = $data[0]['atsIdentFirmwareRev'];
|
||||
$hardware = $data[0]['atsIdentModelNumber'];
|
||||
$serial = $data[0]['atsIdentSerialNumber'];
|
40
tests/data/apc.json
Normal file
40
tests/data/apc.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.318.1.3.8.4",
|
||||
"sysDescr": "APC Web/SNMP Management Card (MB:v3.9.2 PF:v3.5.9 PN:apc_hw03_aos_359.bin AF1:v3.5.6 AN1:apc_hw03_nb200_356.bin MN:NBRK0200 HR:05 SN: FFFFFFFFFFFF MD:07/07/2012)",
|
||||
"sysContact": null,
|
||||
"version": null,
|
||||
"hardware": null,
|
||||
"features": null,
|
||||
"location": null,
|
||||
"os": "apc",
|
||||
"type": "power",
|
||||
"serial": null,
|
||||
"icon": "apc.svg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.318.1.3.8.4",
|
||||
"sysDescr": "APC Web/SNMP Management Card (MB:v3.9.2 PF:v3.5.9 PN:apc_hw03_aos_359.bin AF1:v3.5.6 AN1:apc_hw03_nb200_356.bin MN:NBRK0200 HR:05 SN: FFFFFFFFFFFF MD:07/07/2012)",
|
||||
"sysContact": null,
|
||||
"version": null,
|
||||
"hardware": " ",
|
||||
"features": null,
|
||||
"location": null,
|
||||
"os": "apc",
|
||||
"type": "power",
|
||||
"serial": null,
|
||||
"icon": "apc.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -11,7 +11,7 @@
|
||||
"hardware": null,
|
||||
"features": null,
|
||||
"location": null,
|
||||
"os": "apc-ats",
|
||||
"os": "apc",
|
||||
"type": "power",
|
||||
"serial": null,
|
||||
"icon": "apc.svg"
|
||||
@@ -26,10 +26,10 @@
|
||||
"sysDescr": "APC Web/SNMP Management Card (MB:v4.1.0 PF:v6.4.6 PN:apc_hw05_aos_646.bin AF1:v6.4.7 AN1:apc_hw05_ats4g_647.bin MN:AP4423 HR:R01 SN: <private> MD:06/09/2018)",
|
||||
"sysContact": "<private>",
|
||||
"version": "4.1.9",
|
||||
"hardware": "AP4423",
|
||||
"hardware": " R01",
|
||||
"features": null,
|
||||
"location": "<private>",
|
||||
"os": "apc-ats",
|
||||
"os": "apc",
|
||||
"type": "power",
|
||||
"serial": "<private>",
|
||||
"icon": "apc.svg"
|
Reference in New Issue
Block a user