doc: Updated sensor state doc (#7822)

This commit is contained in:
Neil Lathwood
2017-11-29 21:34:10 +00:00
committed by GitHub
parent e75e675b32
commit d00cb228bb

View File

@@ -16,7 +16,7 @@ For sensor state monitoring, we have 4 DB tables we need to concentrate about.
We will just briefly tie a comment to each one of them. We will just briefly tie a comment to each one of them.
#### sensors #### Sensors
*Each time a sensor needs to be polled, the system needs to know which sensor is it that it need to poll, at what oid is this sensor located and what class the sensor is etc. *Each time a sensor needs to be polled, the system needs to know which sensor is it that it need to poll, at what oid is this sensor located and what class the sensor is etc.
This information is fetched from the sensors table.* This information is fetched from the sensors table.*
@@ -31,15 +31,12 @@ This information is fetched from the sensors table.*
We also map these values to the actual state sensor(state_index) where these values are actually returned from.* We also map these values to the actual state sensor(state_index) where these values are actually returned from.*
*The LibreNMS generic states is derived from Nagios:* *The LibreNMS generic states are derived from Nagios:*
``` ```
0 = OK 0 = OK
1 = Warning 1 = Warning
2 = Critical 2 = Critical
3 = Unknown 3 = Unknown
``` ```
@@ -56,6 +53,7 @@ mib: NETBOTZV2-MIB
modules: modules:
sensors: sensors:
state: state:
data:
- -
oid: dryContactSensorTable oid: dryContactSensorTable
value: dryContactSensorValue value: dryContactSensorValue
@@ -64,9 +62,9 @@ modules:
index: 'dryContactSensor.{{ $index }}' index: 'dryContactSensor.{{ $index }}'
state_name: dryContactSensor state_name: dryContactSensor
states: states:
- { descr: 'null', graph: 0, value: -1, generic: 3 } - { value: -1, generic: 3, graph: 0, descr: 'null' }
- { descr: open, graph: 0, value: 0, generic: 0 } - { value: 0, generic: 0, graph: 0, descr: open }
- { descr: closed, graph: 0, value: 1, generic: 2 } - { value: 1, generic: 2, graph: 0, descr: closed }
- -
oid: doorSwitchSensorTable oid: doorSwitchSensorTable
value: doorSwitchSensorValue value: doorSwitchSensorValue
@@ -75,9 +73,9 @@ modules:
index: 'doorSwitchSensor.{{ $index }}' index: 'doorSwitchSensor.{{ $index }}'
state_name: doorSwitchSensor state_name: doorSwitchSensor
states: states:
- { descr: 'null', graph: 0, value: -1, generic: 3 } - { value: -1, generic: 3, graph: 0, descr: 'null' }
- { descr: open, graph: 0, value: 0, generic: 0 } - { value: 0, generic: 0, graph: 0, descr: open }
- { descr: closed, graph: 0, value: 1, generic: 2 } - { value: 1, generic: 2, graph: 0, descr: closed }
- -
oid: cameraMotionSensorTable oid: cameraMotionSensorTable
value: cameraMotionSensorValue value: cameraMotionSensorValue
@@ -86,9 +84,9 @@ modules:
index: 'cameraMotionSensor.{{ $index }}' index: 'cameraMotionSensor.{{ $index }}'
state_name: cameraMotionSensor state_name: cameraMotionSensor
states: states:
- { descr: 'null', graph: 0, value: -1, generic: 3 } - { value: -1, generic: 3, graph: 0, descr: 'null' }
- { descr: noMotion, graph: 0, value: 0, generic: 0 } - { value: 0, generic: 0, graph: 0, descr: noMotion }
- { descr: motionDetected, graph: 0, value: 1, generic: 2 } - { value: 1, generic: 2, graph: 0, descr: motionDetected }
- -
oid: otherStateSensorTable oid: otherStateSensorTable
value: otherStateSensorErrorStatus value: otherStateSensorErrorStatus
@@ -103,9 +101,9 @@ modules:
- { value: 3, generic: 2, graph: 0, descr: error } - { value: 3, generic: 2, graph: 0, descr: error }
- { value: 4, generic: 2, graph: 0, descr: critical } - { value: 4, generic: 2, graph: 0, descr: critical }
- { value: 5, generic: 2, graph: 0, descr: failure } - { value: 5, generic: 2, graph: 0, descr: failure }
``` ```
### Advanced Example
For advanced state discovery: For advanced state discovery:
This example will be based on a Cisco power supply sensor and is all it takes to have sensor state support for Cisco power supplys in Cisco switches. This example will be based on a Cisco power supply sensor and is all it takes to have sensor state support for Cisco power supplys in Cisco switches.