Skip to content

Component: Measurements

sbengo edited this page Mar 20, 2017 · 22 revisions

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

Measurement edit

View

Configured SNMP Metrics are shown as table. This will appear every time you navigate from menu.

SNMP Metric List

Add/Edit OID Conditions

  • Add: In the OID Conditions list click on new button New Button

  • Edit: Click on OID Condition edit's button Edit Button

The Create/Modify form will show up:

Create/Modify SNMP Metrics

Configuration Parameters

2- Defining Metrics

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
  • value: in this mode you will be able to group arbitrary scalar metrics.
  • (snmp Table) Direct Indexed Tag: in this mode you will be able to group tabular based data and the specified BaseIndex will give us the TAG name to identify any table row.
  • (snmp Table) Indirect Indexed Tag : in this mode you will be able to group tabular based data but we need get TAG name from other table so will need 2 different OID's de IndexOID and de TagOID ( from other table)
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.

  • always send:in this mode the vale gathered for this Metric by the agent will be sent to the output db
  • never send:in this mode the value gathered for this metric will not be sent, it has sense when we need this value as a input parameter for computed metrics (metrics of type String-Eval)

    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

    Example: Creating new StringEval Metric

    Let's create a SNMP Metric that computes the TotalOctets on each port. The formula follows as:

    TotalOctets = (ifHCInOctets + ifHCOutOctets)
    

    1. Add needed metrics to get our new string eval metric:

    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

    2. Add TotalOctets metric:

    ID FieldName BaseOID DataSrcType ExtraData GetRate Scale Shift IsTag
    TotalOctets TotalOctets STRINGEVAL ifHCInOctets + ifHCOutOctets 0 0 false

    3. Result

    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

    Example: Creating new StringParser Metric

    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

    1. Define the regex that would capture the group:

    We need to capture the RPM speed, so we define the capture group as: .*: *([0-9]*)* *RPM

    2. Add new StringParser metric

    ID FieldName BaseOID DataSrcType ExtraData GetRate Scale Shift IsTag
    Infoblox_FanState1 fanState1 STRINGPARSER .*: *([0-9]*)* *RPM 0 0 false
    Clone this wiki locally