-
Notifications
You must be signed in to change notification settings - Fork 56
Component: Measurements
Measurements are the basic Influxdb structure let us group series of the same type/origin.
When data are gathered from SNMP devices we can group them together as we wish when snmp data are scalar objects but is mandatory group snmp tabular objects in the same measurement.
These are the main configuration parameters
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 measurement recommended use the MIB Name prefixed/suffixed with some other string data we can easily identify (as manufacturer or model) that will help us to look in the Measurement config section, should be unique in the database |
Name | This will be the Measurement name created in the Database when sending data, will let us to query data with "SELECT * from ..." |
GetMode |
|
IndexOID | (only required for SNMP Table based data) The OID will be queried to get row Tag Values of the table. |
TagOID | (only required for SNMP indirect Tag based data) the OID will be queried to get TAG value names from other table. |
IndexTAG | (only required for SNMP Table based data) the tag name will be sent to distinguish among different rows. |
IndexTAGFormat | (only required for SNMP Table based data) enable custom format for TAGS based on parameters from values and indexes from IndexOID ( parameters as $IDX1 and $VAL1) or TagOID when measurement is defined as indirect indexes defined ( parameters $IDX2 and $VAL2). Default format is $VAL1 for direct indexed tables and $VAL2 for indirect indexed. example: [$IDX1]-$VAL1 will be sent as tag a "[2]-eth2" |
IndexAsValue | (only required for SNMP Table based data) if true we will send TagValue direct from the numeric Index (useful with tables without string names -- Some IBM disk arrays has this kind of tables--) |
Fields | A list of metricID which will be part of this measurement and what to do with the value.
|
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 |