Skip to content

gNMI: Add support for static and dynamic tag mappings #7462

@bewing

Description

@bewing

Feature Request

Currently, the SNMP input plugin supports adding tags to measurements based on other data - it is common to add the interface description to interface counter readings with the following config

    [[inputs.snmp.table.field]]
      oid = "IF-MIB::ifDescr"
      name = "ifDescr"
      is_tag = true

Ideally, we should be able to do similar with cisco_telemetry_gnmi, via subscribing to openconfig-interfaces:/interfaces/interface/state/description to maintain an up-to-date map, and adding the tag when transmitting measurements

Proposal:

Be able to configure gNMI paths as tag-only, with additional configuration to identify the search key. We should be able to read the current value of those paths, and subscribe to updates to maintain an in-memory map to apply to measurements

Current behavior:

Only global tags are supported?

Desired behavior:

Dynamic tags based on measurement values

Use case:

When using InfluxDB as a backend, tags cannot be added to a measurement post-processing, so they need to be present in the initial reading. Being able to apply dynamic device metadata to each measurement improves the searchability of measurements (show me interface stats for all interfaces whose descriptions start with "TRANSIT", etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions