mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added support to new device Controlbox TH-332B (#12940)
* Addet support to new device Controlbox TH-332B * Rename CONTROLBOX-TH-332-MIB to CONTROLBOX-TH332-MIB * Create controlbox_controlbox.snmprec * Update controlbox_controlbox.snmprec * Merge branch 'master' into community-16076 * Update controlbox.yaml
This commit is contained in:
13
includes/definitions/controlbox.yaml
Normal file
13
includes/definitions/controlbox.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
os: controlbox
|
||||||
|
text: 'Controlbox TH-332B'
|
||||||
|
icon: hwg
|
||||||
|
type: environment
|
||||||
|
mib_dir: controlbox
|
||||||
|
over:
|
||||||
|
- { graph: device_temperature, text: 'Current measured temperature' }
|
||||||
|
- { graph: device_humidity, text: 'Current measured humidity' }
|
||||||
|
- { graph: device_pressure, text: 'Calculated dew point' }
|
||||||
|
discovery:
|
||||||
|
-
|
||||||
|
sysObjectID:
|
||||||
|
- .1.3.6.1.4.1.17095.2
|
40
includes/definitions/discovery/controlbox.yaml
Normal file
40
includes/definitions/discovery/controlbox.yaml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
mib: CONTROLBOX-TH332-MIB
|
||||||
|
modules:
|
||||||
|
sensors:
|
||||||
|
temperature:
|
||||||
|
data:
|
||||||
|
-
|
||||||
|
oid: temperature
|
||||||
|
#value: sensValue
|
||||||
|
num_oid: '.1.3.6.1.4.1.17095.2.1.3.{{ $index }}'
|
||||||
|
descr: Temperature
|
||||||
|
index: '{{ $index }}'
|
||||||
|
#divisor:
|
||||||
|
humidity:
|
||||||
|
data:
|
||||||
|
-
|
||||||
|
oid: humidity
|
||||||
|
#value: sensValue
|
||||||
|
num_oid: '.1.3.6.1.4.1.17095.2.1.4.{{ $index }}'
|
||||||
|
descr: Humidity
|
||||||
|
index: '{{ $index }}'
|
||||||
|
#divisor: 10
|
||||||
|
pressure:
|
||||||
|
data:
|
||||||
|
-
|
||||||
|
oid: dewpoint
|
||||||
|
num_oid: '.1.3.6.1.4.1.17095.2.1.5.{{ $index }}'
|
||||||
|
descr: DewPoint
|
||||||
|
index: '{{ $index }}'
|
||||||
|
state:
|
||||||
|
data:
|
||||||
|
-
|
||||||
|
oid: temperatureState
|
||||||
|
#value: inpAlarmState
|
||||||
|
num_oid: '.1.3.6.1.4.1.17095.2.1.6.{{ $index }}'
|
||||||
|
descr: Alarm TemperatureState
|
||||||
|
index: '{{ $index }}'
|
||||||
|
state_name: controlbox
|
||||||
|
states:
|
||||||
|
- { descr: normal, graph: 0, value: 0, generic: 0 }
|
||||||
|
- { descr: alarm, graph: 0, value: 1, generic: 2 }
|
109
mibs/controlbox/CONTROLBOX-TH332-MIB
Normal file
109
mibs/controlbox/CONTROLBOX-TH332-MIB
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
-- CONTROLBOX SNMP STACK SMIV2 SPECIFICATION MIB
|
||||||
|
--
|
||||||
|
|
||||||
|
CONTROLBOX-TH332-MIB DEFINITIONS ::= BEGIN
|
||||||
|
|
||||||
|
IMPORTS
|
||||||
|
MODULE-IDENTITY, OBJECT-TYPE,
|
||||||
|
Integer32, enterprises FROM SNMPv2-SMI
|
||||||
|
DisplayString FROM SNMPv2-TC
|
||||||
|
NOTIFICATION-TYPE FROM SNMPv2-SMI;
|
||||||
|
|
||||||
|
th332 MODULE-IDENTITY
|
||||||
|
LAST-UPDATED "201503230000Z"
|
||||||
|
ORGANIZATION "Controlbox"
|
||||||
|
CONTACT-INFO "www.controlbox-bg.com"
|
||||||
|
DESCRIPTION "The MIB for TH-332 SNMP server."
|
||||||
|
REVISION "201503230000Z"
|
||||||
|
DESCRIPTION "The MIB module for SMIv2."
|
||||||
|
::= { controlbox 2 }
|
||||||
|
|
||||||
|
controlbox OBJECT IDENTIFIER ::= { enterprises 17095 }
|
||||||
|
trapNotifications OBJECT IDENTIFIER ::= { th332 0 }
|
||||||
|
control OBJECT IDENTIFIER ::= { th332 1 }
|
||||||
|
|
||||||
|
temperatureTrap NOTIFICATION-TYPE
|
||||||
|
OBJECTS { deviceName, temperature, temperatureState }
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"SMIV2 Trap notification information for the SNMP Manager.
|
||||||
|
The objects used in the demo trap notification are
|
||||||
|
deviceName, temperature and temperatureState."
|
||||||
|
::= { trapNotifications 1 }
|
||||||
|
|
||||||
|
humidityTrap NOTIFICATION-TYPE
|
||||||
|
OBJECTS { deviceName, humidity, humidityState }
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"SMIV2 Trap notification information for the SNMP Manager.
|
||||||
|
The objects used in the demo trap notification are
|
||||||
|
deviceName, humidity and humidityState."
|
||||||
|
::= { trapNotifications 2 }
|
||||||
|
|
||||||
|
dewpointTrap NOTIFICATION-TYPE
|
||||||
|
OBJECTS { deviceName, dewpoint, dewpointState }
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"SMIV2 Trap notification information for the SNMP Manager.
|
||||||
|
The objects used in the demo trap notification are
|
||||||
|
deviceName, dewpoint and dewpointState."
|
||||||
|
::= { trapNotifications 3 }
|
||||||
|
|
||||||
|
deviceID OBJECT-TYPE
|
||||||
|
SYNTAX Integer32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Device ID"
|
||||||
|
::= { control 1 }
|
||||||
|
|
||||||
|
deviceName OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Device name"
|
||||||
|
::= { control 2 }
|
||||||
|
|
||||||
|
temperature OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Current measured temperature"
|
||||||
|
::= { control 3 }
|
||||||
|
|
||||||
|
humidity OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Current measured humidity"
|
||||||
|
::= { control 4 }
|
||||||
|
|
||||||
|
dewpoint OBJECT-TYPE
|
||||||
|
SYNTAX DisplayString
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Calculated dew point"
|
||||||
|
::= { control 5 }
|
||||||
|
|
||||||
|
temperatureState OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER { normal(0),alert(1),warning(2),critical(3) }
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Current temperature state"
|
||||||
|
::= { control 6 }
|
||||||
|
|
||||||
|
humidityState OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER { normal(0),alert(1),warning(2),critical(3) }
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Current himidity state"
|
||||||
|
::= { control 7 }
|
||||||
|
|
||||||
|
dewpointState OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER { normal(0),alert(1) }
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION "Current dew point state"
|
||||||
|
::= { control 8 }
|
||||||
|
|
||||||
|
END
|
||||||
|
|
142
tests/data/controlbox_controlbox.json
Normal file
142
tests/data/controlbox_controlbox.json
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"os": {
|
||||||
|
"discovery": {
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"sysName": "<private>",
|
||||||
|
"sysObjectID": ".1.3.6.1.4.1.17095.2",
|
||||||
|
"sysDescr": "TH-332B",
|
||||||
|
"sysContact": "<private>",
|
||||||
|
"version": null,
|
||||||
|
"hardware": null,
|
||||||
|
"features": null,
|
||||||
|
"os": "controlbox",
|
||||||
|
"type": "environment",
|
||||||
|
"serial": null,
|
||||||
|
"icon": "hwg.svg",
|
||||||
|
"location": "<private>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"poller": "matches discovery"
|
||||||
|
},
|
||||||
|
"sensors": {
|
||||||
|
"discovery": {
|
||||||
|
"sensors": [
|
||||||
|
{
|
||||||
|
"sensor_deleted": 0,
|
||||||
|
"sensor_class": "humidity",
|
||||||
|
"poller_type": "snmp",
|
||||||
|
"sensor_oid": ".1.3.6.1.4.1.17095.2.1.4.0",
|
||||||
|
"sensor_index": "0",
|
||||||
|
"sensor_type": "controlbox",
|
||||||
|
"sensor_descr": "Humidity",
|
||||||
|
"group": null,
|
||||||
|
"sensor_divisor": 1,
|
||||||
|
"sensor_multiplier": 1,
|
||||||
|
"sensor_current": 56.8,
|
||||||
|
"sensor_limit": 70,
|
||||||
|
"sensor_limit_warn": null,
|
||||||
|
"sensor_limit_low": 30,
|
||||||
|
"sensor_limit_low_warn": null,
|
||||||
|
"sensor_alert": 1,
|
||||||
|
"sensor_custom": "No",
|
||||||
|
"entPhysicalIndex": null,
|
||||||
|
"entPhysicalIndex_measured": null,
|
||||||
|
"sensor_prev": null,
|
||||||
|
"user_func": null,
|
||||||
|
"state_name": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sensor_deleted": 0,
|
||||||
|
"sensor_class": "pressure",
|
||||||
|
"poller_type": "snmp",
|
||||||
|
"sensor_oid": ".1.3.6.1.4.1.17095.2.1.5.0",
|
||||||
|
"sensor_index": "0",
|
||||||
|
"sensor_type": "controlbox",
|
||||||
|
"sensor_descr": "DewPoint",
|
||||||
|
"group": null,
|
||||||
|
"sensor_divisor": 1,
|
||||||
|
"sensor_multiplier": 1,
|
||||||
|
"sensor_current": 14.3,
|
||||||
|
"sensor_limit": 15.015,
|
||||||
|
"sensor_limit_warn": null,
|
||||||
|
"sensor_limit_low": 13.585,
|
||||||
|
"sensor_limit_low_warn": null,
|
||||||
|
"sensor_alert": 1,
|
||||||
|
"sensor_custom": "No",
|
||||||
|
"entPhysicalIndex": null,
|
||||||
|
"entPhysicalIndex_measured": null,
|
||||||
|
"sensor_prev": null,
|
||||||
|
"user_func": null,
|
||||||
|
"state_name": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sensor_deleted": 0,
|
||||||
|
"sensor_class": "state",
|
||||||
|
"poller_type": "snmp",
|
||||||
|
"sensor_oid": ".1.3.6.1.4.1.17095.2.1.6.0",
|
||||||
|
"sensor_index": "0",
|
||||||
|
"sensor_type": "controlbox",
|
||||||
|
"sensor_descr": "Alarm TemperatureState",
|
||||||
|
"group": null,
|
||||||
|
"sensor_divisor": 1,
|
||||||
|
"sensor_multiplier": 1,
|
||||||
|
"sensor_current": 0,
|
||||||
|
"sensor_limit": null,
|
||||||
|
"sensor_limit_warn": null,
|
||||||
|
"sensor_limit_low": null,
|
||||||
|
"sensor_limit_low_warn": null,
|
||||||
|
"sensor_alert": 1,
|
||||||
|
"sensor_custom": "No",
|
||||||
|
"entPhysicalIndex": null,
|
||||||
|
"entPhysicalIndex_measured": null,
|
||||||
|
"sensor_prev": null,
|
||||||
|
"user_func": null,
|
||||||
|
"state_name": "controlbox"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sensor_deleted": 0,
|
||||||
|
"sensor_class": "temperature",
|
||||||
|
"poller_type": "snmp",
|
||||||
|
"sensor_oid": ".1.3.6.1.4.1.17095.2.1.3.0",
|
||||||
|
"sensor_index": "0",
|
||||||
|
"sensor_type": "controlbox",
|
||||||
|
"sensor_descr": "Temperature",
|
||||||
|
"group": null,
|
||||||
|
"sensor_divisor": 1,
|
||||||
|
"sensor_multiplier": 1,
|
||||||
|
"sensor_current": 22.9,
|
||||||
|
"sensor_limit": 42.9,
|
||||||
|
"sensor_limit_warn": null,
|
||||||
|
"sensor_limit_low": 12.9,
|
||||||
|
"sensor_limit_low_warn": null,
|
||||||
|
"sensor_alert": 1,
|
||||||
|
"sensor_custom": "No",
|
||||||
|
"entPhysicalIndex": null,
|
||||||
|
"entPhysicalIndex_measured": null,
|
||||||
|
"sensor_prev": null,
|
||||||
|
"user_func": null,
|
||||||
|
"state_name": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"state_indexes": [
|
||||||
|
{
|
||||||
|
"state_name": "controlbox",
|
||||||
|
"state_descr": "normal",
|
||||||
|
"state_draw_graph": 0,
|
||||||
|
"state_value": 0,
|
||||||
|
"state_generic_value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"state_name": "controlbox",
|
||||||
|
"state_descr": "alarm",
|
||||||
|
"state_draw_graph": 0,
|
||||||
|
"state_value": 1,
|
||||||
|
"state_generic_value": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"poller": "matches discovery"
|
||||||
|
}
|
||||||
|
}
|
10
tests/snmpsim/controlbox_controlbox.snmprec
Normal file
10
tests/snmpsim/controlbox_controlbox.snmprec
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
1.3.6.1.2.1.1.1.0|4|TH-332B
|
||||||
|
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.17095.2
|
||||||
|
1.3.6.1.2.1.1.3.0|67|1782198
|
||||||
|
1.3.6.1.2.1.1.4.0|4|<private>
|
||||||
|
1.3.6.1.2.1.1.5.0|4|<private>
|
||||||
|
1.3.6.1.2.1.1.6.0|4|<private>
|
||||||
|
1.3.6.1.4.1.17095.2.1.3.0|4|22.9
|
||||||
|
1.3.6.1.4.1.17095.2.1.4.0|4|56.8
|
||||||
|
1.3.6.1.4.1.17095.2.1.5.0|4|14.3
|
||||||
|
1.3.6.1.4.1.17095.2.1.6.0|2|0
|
Reference in New Issue
Block a user