-
Notifications
You must be signed in to change notification settings - Fork 56
Component: SNMP Metrics
This component allows the user define core metrics to be collected from the device.
Configured SNMP Metrics are shown as table. This will appear every time you navigate from menu.
-
Add: In the OID Conditions list click on new button
-
Edit: Click on OID Condition edit's button
The Create/Modify form will show up:
Config Parameter | Description |
---|---|
ID | Text String that uniquely identify the metric recommended use the MIB Name, should be unique in the database |
FieldName | Set the "field" name inside a Influx measurement, could be the same of id or not, should be unique inside the measurement where the metric will be sent. |
IsTag | If true data will be sent as a Influxdb "TAG". (default is false) |
BaseOID | Snmp OID for this metric ( could be the base OID when it belongs to a snmp indexed table), could not be set only if datasrctype is of type "String Eval". |
DataSrcType | Origin data type could be one of these:
|
ExtraData | data needed to special data types as String Eval(evaluated expression needed) or String Parser(regex needed) |
GetRate | Only useful on counter types , if true value sent will be the computed difference and after divided by the number of elapsed seconds between snmp calls |
Scale | if set (as a floating point value) computed data will be scaled before sent. |
Shift | if set (as a floating point value) computed data will be shifted before sent. |
Description | any useful discretion to understand data gathered for this metric ( recommended place here units of the measurement). |
Notes: The SnmpCollector Metric engine computes all its data and sent them as floating point values to the database, except for tags that will be sent as text strings
Let's create a SNMP Metric that computes the TotalOctets
on each port. The formula follows as:
TotalOctets = (ifHCInOctets + ifHCOutOctets)
ID | FieldName | BaseOID | DataSrcType | ExtraData | GetRate | Scale | Shift | IsTag |
---|---|---|---|---|---|---|---|---|
ifHCInUcastPkts | In.packets | .1.3.6.1.2.1.31.1.1.1.7 | COUNTER64 | false | 0 | 0 | false | |
ifHCInOctets | In.bytes | .1.3.6.1.2.1.31.1.1.1.6 | COUNTER64 | false | 0 | 0 | false |
ID | FieldName | BaseOID | DataSrcType | ExtraData | GetRate | Scale | Shift | IsTag |
---|---|---|---|---|---|---|---|---|
TotalOctets | TotalOctets | STRINGEVAL | ifHCInOctets + ifHCOutOctets | 0 | 0 | false |
The SNMP Metric list must be like:
ID | FieldName | BaseOID | DataSrcType | ExtraData | GetRate | Scale | Shift | IsTag |
---|---|---|---|---|---|---|---|---|
ifHCInUcastPkts | In.packets | .1.3.6.1.2.1.31.1.1.1.7 | COUNTER64 | false | 0 | 0 | false | |
ifHCInOctets | In.bytes | .1.3.6.1.2.1.31.1.1.1.6 | COUNTER64 | false | 0 | 0 | false | |
TotalOctets | TotalOctets | STRINGEVAL | ifHCInOctets + ifHCOutOctets | 0 | 0 | false |
Some OIDs results are full strings that contains on some part of its texts the value that we wants to capture.
In this example we will work with an Infoblox device and the following OID that gives us Fan1 RPM: .1.3.6.1.4.1.7779.3.1.1.2.1.10.1.3.28
, with an output as: FAN 1: 8725 RPM
We need to capture the RPM speed, so we define the capture group as: .*: *([0-9]*)* *RPM
ID | FieldName | BaseOID | DataSrcType | ExtraData | GetRate | Scale | Shift | IsTag |
---|---|---|---|---|---|---|---|---|
Infoblox_FanState1 | fanState1 | STRINGPARSER | .*: *([0-9]*)* *RPM |
0 | 0 | false |