Added state sensor support to Cisco UCS (#9335)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

WIP - @papatango71 please test.
This commit is contained in:
Søren Rosiak
2018-10-30 22:50:30 +01:00
committed by Neil Lathwood
parent 6e4edbaed8
commit 7a422e9b8b
4 changed files with 35282 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
mib: CISCO-UNIFIED-COMPUTING-EQUIPMENT-MIB
modules:
sensors:
pre-cache:
data:
- oid:
- cucsEquipmentChassisDn
- cucsEquipmentFanModuleDn
- cucsEquipmentPsuDn
state:
data:
-
oid: cucsEquipmentChassisOperState
value: cucsEquipmentChassisOperState
num_oid: .1.3.6.1.4.1.9.9.719.1.15.7.1.27.
descr: 'Chassis - {{ $cucsEquipmentChassisDn }}'
index: '{{ $index }}'
states:
- { value: 0, descr: unknown, graph: 1, generic: 3 }
- { value: 1, descr: operable, graph: 1, generic: 0 }
- { value: 2, descr: inoperable, graph: 1, generic: 2 }
- { value: 3, descr: degraded, graph: 1, generic: 2 }
- { value: 4, descr: powered off, graph: 1, generic: 3 }
- { value: 5, descr: power problem, graph: 1, generic: 2 }
- { value: 6, descr: removed, graph: 1, generic: 3 }
- { value: 7, descr: voltage problem, graph: 1, generic: 2 }
- { value: 8, descr: thermal problem, graph: 1, generic: 2 }
- { value: 9, descr: performance problem, graph: 1, generic: 2 }
- { value: 10, descr: accessibility problem, graph: 1, generic: 2 }
- { value: 11, descr: identity unestablishable, graph: 1, generic: 2 }
- { value: 12, descr: BIOS POST timeout, graph: 1, generic: 2 }
- { value: 13, descr: disabled, graph: 1, generic: 3 }
- { value: 14, descr: malformed FRU, graph: 1, generic: 1 }
- { value: 51, descr: fabric connectivity problem, graph: 1, generic: 2 }
- { value: 52, descr: fabric unsupported connection, graph: 1, generic: 2 }
- { value: 81, descr: config, graph: 1, generic: 1 }
- { value: 82, descr: equipment problem, graph: 1, generic: 2 }
- { value: 83, descr: decomissioning, graph: 1, generic: 1 }
- { value: 84, descr: chassis limit exceeded, graph: 1, generic: 1 }
- { value: 100, descr: not supported, graph: 1, generic: 1 }
- { value: 101, descr: discovery, graph: 1, generic: 3 }
- { value: 102, descr: discovery failed, graph: 1, generic: 1 }
- { value: 103, descr: identify, graph: 1, generic: 3 }
- { value: 104, descr: post failure, graph: 1, generic: 2 }
- { value: 105, descr: upgrade problem, graph: 1, generic: 2 }
- { value: 106, descr: peer communication problem, graph: 1, generic: 2 }
- { value: 107, descr: auto upgrade, graph: 1, generic: 3 }
-
oid: cucsEquipmentFanModuleOperState
value: cucsEquipmentFanModuleOperState
num_oid: .1.3.6.1.4.1.9.9.719.1.15.13.1.7.
descr: 'Fan Module - {{ $cucsEquipmentFanModuleDn }}'
index: '{{ $index }}'
states:
- { value: 0, descr: unknown, graph: 1, generic: 3 }
- { value: 1, descr: ok, graph: 1, generic: 0 }
- { value: 2, descr: upper non-recoverable, graph: 1, generic: 2 }
- { value: 3, descr: upper critical, graph: 1, generic: 2 }
- { value: 4, descr: upper non-critical, graph: 1, generic: 1 }
- { value: 5, descr: lower non-critical, graph: 1, generic: 1 }
- { value: 6, descr: lower critical, graph: 1, generic: 2 }
- { value: 7, descr: lower non-recoverable, graph: 1, generic: 2 }
- { value: 100, descr: not supported, graph: 1, generic: 3 }
-
oid: cucsEquipmentPsuPower
value: cucsEquipmentPsuPower
num_oid: .1.3.6.1.4.1.9.9.719.1.15.56.1.10.
descr: 'PSU - {{ $cucsEquipmentPsuDn }}'
index: '{{ $index }}'
states:
- { value: 0, descr: unknown, graph: 1, generic: 3 }
- { value: 1, descr: on, graph: 1, generic: 0 }
- { value: 2, descr: test, graph: 1, generic: 3 }
- { value: 3, descr: off, graph: 1, generic: 0 }
- { value: 4, descr: online, graph: 1, generic: 0 }
- { value: 5, descr: offline, graph: 1, generic: 3 }
- { value: 6, descr: off duty, graph: 1, generic: 3 }
- { value: 7, descr: degraded, graph: 1, generic: 2 }
- { value: 8, descr: power save, graph: 1, generic: 0 }
- { value: 9, descr: error, graph: 1, generic: 2 }
- { value: 10, descr: ok, graph: 1, generic: 0 }
- { value: 11, descr: failed, graph: 1, generic: 2 }
- { value: 100, descr: not supported, graph: 1, generic: 3 }

View File

File diff suppressed because it is too large Load Diff

2367
tests/data/nxos_2.json Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,175 @@
1.3.6.1.2.1.1.1.0|4|Cisco NX-OS(tm) ucs, Software (ucs-6100-k9-system), Version 5.0(3)N2(3.13b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 6/28/2017 0:00:00
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.9.12.3.1.3.1062
1.3.6.1.2.1.1.3.0|67|3458976866
1.3.6.1.4.1.9.9.719.1.15.7.1.2.183885|4|sys/chassis-1
1.3.6.1.4.1.9.9.719.1.15.7.1.2.184107|4|sys/chassis-2
1.3.6.1.4.1.9.9.719.1.15.7.1.2.184314|4|sys/chassis-3
1.3.6.1.4.1.9.9.719.1.15.7.1.2.184511|4|sys/chassis-4
1.3.6.1.4.1.9.9.719.1.15.7.1.2.184787|4|sys/chassis-5
1.3.6.1.4.1.9.9.719.1.15.7.1.2.184946|4|sys/chassis-6
1.3.6.1.4.1.9.9.719.1.15.7.1.27.183885|2|1
1.3.6.1.4.1.9.9.719.1.15.7.1.27.184107|2|1
1.3.6.1.4.1.9.9.719.1.15.7.1.27.184314|2|1
1.3.6.1.4.1.9.9.719.1.15.7.1.27.184511|2|1
1.3.6.1.4.1.9.9.719.1.15.7.1.27.184787|2|1
1.3.6.1.4.1.9.9.719.1.15.7.1.27.184946|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.94743|4|sys/switch-A/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.94744|4|sys/switch-A/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.95038|4|sys/switch-B/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.95039|4|sys/switch-B/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187115|4|sys/chassis-1/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187118|4|sys/chassis-1/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187121|4|sys/chassis-1/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187124|4|sys/chassis-1/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187127|4|sys/chassis-1/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187130|4|sys/chassis-1/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187133|4|sys/chassis-1/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.187136|4|sys/chassis-1/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189490|4|sys/chassis-4/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189493|4|sys/chassis-4/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189496|4|sys/chassis-4/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189499|4|sys/chassis-4/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189502|4|sys/chassis-4/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189505|4|sys/chassis-4/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189508|4|sys/chassis-4/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189511|4|sys/chassis-4/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189633|4|sys/chassis-3/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189636|4|sys/chassis-3/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189639|4|sys/chassis-3/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189642|4|sys/chassis-3/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189645|4|sys/chassis-3/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189648|4|sys/chassis-3/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189651|4|sys/chassis-3/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.189654|4|sys/chassis-3/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191311|4|sys/chassis-2/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191314|4|sys/chassis-2/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191317|4|sys/chassis-2/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191320|4|sys/chassis-2/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191323|4|sys/chassis-2/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191326|4|sys/chassis-2/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191329|4|sys/chassis-2/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.191332|4|sys/chassis-2/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196842|4|sys/chassis-5/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196845|4|sys/chassis-5/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196848|4|sys/chassis-5/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196851|4|sys/chassis-5/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196854|4|sys/chassis-5/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196857|4|sys/chassis-5/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196860|4|sys/chassis-5/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.196863|4|sys/chassis-5/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.2.197988|4|sys/chassis-6/fan-module-1-1
1.3.6.1.4.1.9.9.719.1.15.13.1.2.197991|4|sys/chassis-6/fan-module-1-2
1.3.6.1.4.1.9.9.719.1.15.13.1.2.197994|4|sys/chassis-6/fan-module-1-3
1.3.6.1.4.1.9.9.719.1.15.13.1.2.197997|4|sys/chassis-6/fan-module-1-4
1.3.6.1.4.1.9.9.719.1.15.13.1.2.198000|4|sys/chassis-6/fan-module-1-5
1.3.6.1.4.1.9.9.719.1.15.13.1.2.198003|4|sys/chassis-6/fan-module-1-6
1.3.6.1.4.1.9.9.719.1.15.13.1.2.198006|4|sys/chassis-6/fan-module-1-7
1.3.6.1.4.1.9.9.719.1.15.13.1.2.198009|4|sys/chassis-6/fan-module-1-8
1.3.6.1.4.1.9.9.719.1.15.13.1.7.94743|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.94744|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.95038|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.95039|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187115|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187118|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187121|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187124|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187127|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187130|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187133|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.187136|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189490|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189493|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189496|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189499|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189502|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189505|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189508|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189511|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189633|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189636|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189639|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189642|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189645|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189648|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189651|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.189654|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191311|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191314|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191317|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191320|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191323|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191326|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191329|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.191332|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196842|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196845|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196848|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196851|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196854|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196857|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196860|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.196863|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.197988|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.197991|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.197994|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.197997|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.198000|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.198003|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.198006|2|1
1.3.6.1.4.1.9.9.719.1.15.13.1.7.198009|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.94756|4|sys/switch-A/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.94758|4|sys/switch-A/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.95051|4|sys/switch-B/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.95053|4|sys/switch-B/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.187107|4|sys/chassis-1/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.187109|4|sys/chassis-1/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.187111|4|sys/chassis-1/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.187113|4|sys/chassis-1/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189482|4|sys/chassis-4/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189484|4|sys/chassis-4/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189486|4|sys/chassis-4/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189488|4|sys/chassis-4/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189625|4|sys/chassis-3/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189627|4|sys/chassis-3/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189629|4|sys/chassis-3/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.189631|4|sys/chassis-3/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.2.191287|4|sys/chassis-2/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.191293|4|sys/chassis-2/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.191299|4|sys/chassis-2/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.191305|4|sys/chassis-2/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.2.196818|4|sys/chassis-5/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.196824|4|sys/chassis-5/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.196830|4|sys/chassis-5/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.196836|4|sys/chassis-5/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.2.197964|4|sys/chassis-6/psu-1
1.3.6.1.4.1.9.9.719.1.15.56.1.2.197970|4|sys/chassis-6/psu-2
1.3.6.1.4.1.9.9.719.1.15.56.1.2.197976|4|sys/chassis-6/psu-3
1.3.6.1.4.1.9.9.719.1.15.56.1.2.197982|4|sys/chassis-6/psu-4
1.3.6.1.4.1.9.9.719.1.15.56.1.10.94756|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.94758|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.95051|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.95053|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.187107|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.187109|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.187111|2|8
1.3.6.1.4.1.9.9.719.1.15.56.1.10.187113|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189482|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189484|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189486|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189488|2|8
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189625|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189627|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189629|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.189631|2|8
1.3.6.1.4.1.9.9.719.1.15.56.1.10.191287|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.191293|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.191299|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.191305|2|8
1.3.6.1.4.1.9.9.719.1.15.56.1.10.196818|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.196824|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.196830|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.196836|2|8
1.3.6.1.4.1.9.9.719.1.15.56.1.10.197964|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.197970|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.197976|2|1
1.3.6.1.4.1.9.9.719.1.15.56.1.10.197982|2|8