gnmic
gnmic copied to clipboard
Support for the gNMI extension field
gNMI extensions (https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-extensions.md) allow for extended features in the gRPC messages sent back. The extension field is present at the top-level of the gNMI RPCs. Juniper as a vendor is registering an extensionID for their telemetry: https://github.com/openconfig/gnmi/pull/76 Right now, their prototext looks like this:
extension: {
registered_ext: {
id: 1
msg: "\n\x0cedge01.lis01\x10\xff\xff\x03\"\x0fsensor_1007_2_1*d/interfaces/interface[name='irb']/subinterfaces/subinterface[index='100']/state/counters/out-octets/2d/interfaces/interface[name='irb']/subinterfaces/subinterface[index='100']/state/counters/out-octets/:\x05mib2d@\x01H\xff\x89\x99\x97\x932P\xff\x89\x99\x97\x932`\x81\x8a\x99\x97\x932p\x01\x80\x01\x02"
}
}
which contains a lot of helpful data, which should be exported as tags on the events.
The ask: Add generic support for the extension field, allowing for arbitrary protobuf files to be used to decode extension IDs (a config map of ID -> protobuf file maybe?). Then use the field in processor to generate tags from it.
The specific reason for this ask: This extension field contains linecard information of the linecard generating the response. This is necessary data to deduplicate certain events (logical interfaces spanning multiple linecards will generate an event per linecard, which will be clobbered, given they look like duplicates right now). If the extension data was exported as tags, it would be a unique event.