kentik / ktranslate

System for pulling and pushing network data.
Apache License 2.0
56 stars 24 forks source link

hardcoded tag names for Interfaces #466

Closed dpajin-kentik closed 1 year ago

dpajin-kentik commented 2 years ago

I am trying to use the alternative names for Interfaces tags and metrics - would that be possible?

The results I am getting on the influxdb output is the following: Metrics names are changes, but tag names are some hardcoded values.


interfaces::statistics,device_name=edge03_iad1,if_Index=515,if_connector-present=2,if_mtu=2147483647,if_name=pfe-0/0/0.16383,if_type=propVirtual,instrumentation.name=juniper-mx-router,tags.dc=iad1,tags.kentik.device_id=31750,tags.kentik.model=JNP204,tags.kentik.vendor=Juniper\ Networks,tags.type=edge out-errors=0i,out-discards=0i,out-multicast-pkts=0i,in-broadcast-pkts=0i,in-octets=0i,out-broadcast-pkts=0i,in-discards=0i,admin-status=1i,oper-status=1i,in-unicast-pkts=0i,out-unicast-pkts=0i,out-octets=0i,in-errors=0i,in-multicast-pkts=0i,admin-status_str="up",oper-status_str="up" 1668008775

Here is my profile below:

# The profile is trying to use normalized names for tags and metrics
# which are compatible with the YANG data models from OpenConfig
#

metrics:
  - MIB: interfaces
    table:
      OID: 1.3.6.1.2.1.2.2
      name: statistics
    symbols:

      - name: ifHCInOctets
        OID: 1.3.6.1.2.1.31.1.1.1.6
        tag: in-octets

      - name: ifHCOutOctets
        OID: 1.3.6.1.2.1.31.1.1.1.10
        tag: out-octets

      - name: ifInErrors
        OID: 1.3.6.1.2.1.2.2.1.14
        tag: in-errors

      - name: ifOutErrors
        OID: 1.3.6.1.2.1.2.2.1.20
        tag: out-errors

      # The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
      - name: ifInDiscards
        OID: 1.3.6.1.2.1.2.2.1.13
        tag: in-discards

      # The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted.
      - name: ifOutDiscards
        OID: 1.3.6.1.2.1.2.2.1.19
        tag: out-discards

      # The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were not addressed to a multicast or broadcast address at this sub-layer. This object is a 64-bit version of ifInUcastPkts.
      - name: ifHCInUcastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.7
        tag: in-unicast-pkts

      # The total number of packets that higher-level protocols requested be transmitted, and which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent. This object is a 64-bit version of ifOutUcastPkts.
      - name: ifHCOutUcastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.11
        tag: out-unicast-pkts

      # The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a multicast address at this sub-layer. For a MAC layer protocol, this includes both Group and Functional addresses. This object is a 64-bit version of ifInMulticastPkts.
      - name: ifHCInMulticastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.8
        tag: in-multicast-pkts

      # The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast address at this sub-layer, including those that were discarded or not sent. For a MAC layer protocol, this includes both Group and Functional addresses. This object is a 64-bit version of ifOutMulticastPkts.
      - name: ifHCOutMulticastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.12
        tag: out-multicast-pkts

      # The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a broadcast address at this sub-layer. This object is a 64-bit version of ifInBroadcastPkts.
      - name: ifHCInBroadcastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.9
        tag: in-broadcast-pkts

      # The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a broadcast address at this sub-layer, including those that were discarded or not sent. This object is a 64-bit version of ifOutBroadcastPkts.
      - name: ifHCOutBroadcastPkts
        OID: 1.3.6.1.2.1.31.1.1.1.13
        tag: out-broadcast-pkts

      # The desired state of the interface.
      - name: ifAdminStatus
        OID: 1.3.6.1.2.1.2.2.1.7
        tag: admin-status
        enum:
          up: 1
          down: 2
          testing: 3

      # The current operational state of the interface. Note this is both a metric and tag.
      - name: ifOperStatus
        OID: 1.3.6.1.2.1.2.2.1.8
        tag: oper-status
        enum:
          up: 1
          down: 2
          testing: 3
          unknown: 4
          dormant: 5
          notPresent: 6
          lowerLayerDown: 7

    metric_tags:
      # A unique value, greater than zero, for each interface.
      - tag: ifindex
        column:
          name: ifIndex
          OID: 1.3.6.1.2.1.2.2.1.1

      # The textual name of the interface.
      - tag: name
        column:
          name: ifName
          OID: 1.3.6.1.2.1.31.1.1.1.1

      # An estimate of the interface's current bandwidth in units of 1,000,000 bits per second.
      - tag: speed
        column:
          name: ifHighSpeed
          OID: 1.3.6.1.2.1.31.1.1.1.15

      # This object is an 'alias' name for the interface as specified by a network manager, and provides a non-volatile 'handle' for the interface.
      - tag: description
        column:
          name: ifAlias
          OID: 1.3.6.1.2.1.31.1.1.1.18

      # MTU of the interface
      - tag: mtu
        column:
          name: ifMtu
          OID: 1.3.6.1.2.1.2.2.1.4

      # physical-address
      - tag: mac-address
        column:
          name: ifPhysAddress
          OID: 1.3.6.1.2.1.2.2.1.6

      # connector-present
      - tag: connector-present
        column:
          tag: connector-present
          name: ifConnectorPresent
          OID: 1.3.6.1.2.1.31.1.1.1.17

      - tag: type
        column:
          tag: type
          name: ifType
          OID: 1.3.6.1.2.1.2.2.1.3
          enum:
            other: 1
            regular1822: 2
            hdh1822: 3
            ddnX25: 4
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.