SNMP¶
Capabilities¶
Capabilities |
Support version 2c |
Support version 3 |
Comment |
---|---|---|---|
SNMP trap |
N.A. |
N.A. |
See SNMP-TRAP |
Get |
|||
Set |
|||
Authentication - Community based |
|||
Authentication - User & Group based |
Username, password, shared key and client/server (only without TLS) |
||
Data encryption |
TLS is supported, DTLS is not supported |
||
MIB |
No automatic conversion for the MIB |
||
Trap / Inform |
The Trap / Inform are handle by SNMP-TRAP |
What can be done¶
The snmp integration allows OnSphere to communicate with one or multiple SNMP agent to get or set variable.
Get¶
The state of a device can be read at regular interval based on the predefined OID.
Set¶
When a value change, its content can be propagated to a predefined OID.
Usage¶
Monitor the state of snmp compatible devices
Control snmp compatible devices
Examples¶
How it is done¶
Requirements¶
Module osp-snmp
Target¶
A target defines a device on which Set and Get can be done. It also defines the default polling interval for all owner.
Get¶
The get is done periodically as defined by the polling interval.
The get requests are merged together per target and polling interval to decrease the number of request (50 get create only one request instead of 50).
A automatic conversion is done between the SnmpType and the value.
For example, an Integer32 with -5
will give the following:
Boolean : true
Integer : -5
Decimal : -5.0
Text : “-5”
The option binaryData
and charset
(define in owner.snmp) are use when an OctetString is received.
For example, an OctetString with 0x41CD851F
will give the following:
With
binaryData
set to trueBoolean : true
Integer : 1103987999
Decimal : 25.69
Text : “0x41CD851F”
With
binaryData
set to falseBoolean : false
Integer : Error unable to extract an Integer
Decimal : Error unable to extract an Integer
Text : “A” which is the data interpreted as an UTF-8 string. It might by usable on a script, but we don’t give any guaranty.
For example, an OctetString with 0x003100300035
(“105” encoded in UTF_16) will give the following:
With
binaryData
set to false andcharset
toUTF_16
Boolean : false
Integer : 105 (The String is a parsable number so the conversion work)
Decimal : 105.0 (The String is a parsable number so the conversion work)
Text : “105”
Set¶
A set request is triggered when a value changes and must be published. The set are not grouped together as there timing are not predefined.