# Exporter file format

This is generated by the generator, so only those doing development should
have to care about how this works.

```
auths:
  public_v2:
    version: 2
    # There's various auth/version options here too. See the main README.
    community: public
modules:
  module_name:
    walk:
      # List of OID subtrees to walk.
      - 1.3.6.1.2.1.2
      - 1.3.6.1.2.1.31.1.1
    get:
      # List of OIDs to get directly.
      - 1.3.6.1.2.1.1.3
    metrics:      # List of metrics to extract.
       # A simple metric with no labels.
     - name:  sysUpTime
       oid:   1.3.6.1.2.1.1.3
       type:  gauge
       # The HELP text included with the scrape metrics.
       help: The value of sysUpTime on the most recent occasion at which any one or
         more of this entry's counters suffered a discontinuity - 1.3.6.1.4.1.30065.3.1.1.1.1.46
       # See README.md type override for a list of valid types
       # Non-numeric types are represented as a gauge with value 1, and the rendered value
       # as a label value on that gauge.
  
       # A metric that's part of a table, and thus has labels.
     - name:  ifMtu
       oid:   1.3.6.1.2.1.2.2.1.4
       type:  gauge
       # A list of the table indexes and their types. All indexes become labels.
       indexes:
        - labelname: ifIndex
          type: gauge
        - labelname: someString
          type: OctetString
          fixed_size: 8   # Only possible for OctetString/DisplayString types.
                          # If only one length is possible this is it. Otherwise
                          # this will be 0 or missing.
        - labelname: someOtherString
          type: OctetString
          implied: true   # Only possible for OctetString/DisplayString types.
                          # Must be the last index. See RFC2578 section 7.7.
     - name:  ifSpeed
       oid:   1.3.6.1.2.1.2.2.1.5
       type:  gauge
       indexes:
        - labelname: ifDescr
          type: gauge
       # Lookups take original indexes, look them up in another part of the
       # oid tree and overwrite the given output label.
       lookups:
         - labels: [ifDescr]         # Input label name(s). Empty means delete the output label.
           oid: 1.3.6.1.2.1.2.2.1.2  # OID to look under.
           labelname: ifDescr        # Output label name.
           type: OctetString         # Type of output object.
       # Creates new metrics based on the regex and the metric value.
       regex_extracts:
         Temp: # A new metric will be created appending this to the metricName to become metricNameTemp.
           - regex: '(.*)' # Regex to extract a value from the returned SNMP walks's value.
             value: '$1' # Parsed as float64, defaults to $1.
       offset: 0.0  # Adds the value to the sample. Applied after scale.
       scale: 0.125 # Scale the sample by this value, for example bits to bytes.
       enum_values: # Enum for this metric. Only used with the enum types.
          0: true
          1: false
```
