feat: Add dynamic tagging to gnmi plugin#7484
Conversation
|
If anyone wants to do integration testing against non-Arista hardware, it would be appreciated. |
|
Switched back to /, since grafana claims to have resolved the issue with slashes in tags. |
9b44dc9 to
b2e43eb
Compare
|
Updated for new plugin name |
|
Am I missing any data/information needed to merge this feature? What are the next steps from my side? |
Given that Granfana has resolved their issue with slashes, does it make sense to switch back to using slashes as separators in this plugin? |
b2e43eb to
4c977bd
Compare
|
Hola, just curious why this wasn't merged in? |
266ca12 to
54708f6
Compare
|
Hello @bewing, Tested this with IOS-XR and the OpenConfig model Here is the configuration: [...]
[[inputs.gnmi.subscription]]
origin = "openconfig-interfaces"
path = "/interfaces/interface/state/counters"
subscription_mode = "sample"
sample_interval = "60s"
[[inputs.gnmi.subscription]]
name = "descr"
origin = "openconfig-interfaces"
path = "/interfaces/interface/state/description"
subscription_mode = "on_change"
tag_only = true
[...]The output is as follows: telegraf git:(7484) ✗ ./telegraf --config telegraf-7484-gnmi-embedded-tags.conf
2021-03-18T17:58:17Z I! Starting Telegraf
[...]
2021-03-18T17:58:19Z E! [inputs.gnmi] Subscribe error (3), "openconfig-interfaces:interfaces/interface/state/description:ERR:No sysdb paths found for yang path openconfig-interfaces:interfaces/interface/state/description\x00"
counters,host=telegraf,name=GigabitEthernet0/0/0/0,path=openconfig-interfaces:/interfaces/interface/state/counters,source=x.f.g.h in_octets=0i,out_octets=0i,in_multicast_pkts=0i,in_broadcast_pkts=0i,out_multicast_pkts=0i,out_broadcast_pkts=0i,in_unknown_protos=0i,in_errors=0i,out_errors=0i,last_clear="2021-03-18T15:10:02Z",in_unicast_pkts=0i,in_discards=0i,out_unicast_pkts=0i,out_discards=0i 1616089682978000000
counters,host=telegraf,name=GigabitEthernet0/0/0/1,path=openconfig-interfaces:/interfaces/interface/state/counters,source=x.f.g.h in_octets=0i,out_octets=0i,in_multicast_pkts=0i,in_broadcast_pkts=0i,out_multicast_pkts=0i,out_broadcast_pkts=0i,in_unknown_protos=0i,in_errors=0i,out_errors=0i,last_clear="2021-03-18T15:10:02Z",in_unicast_pkts=0i,in_discards=0i,out_unicast_pkts=0i,out_discards=0i 1616089682978000000
[...] |
|
Thanks so much for the pull request! |
|
Rebased for merge conflict |
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
srebhan
left a comment
There was a problem hiding this comment.
@bewing thanks for submitting this PR. I have some comments similar to the previous comments by Steven. Beside some smaller comments in the code I propose a way to save at least one level in the map. While I'm not 100% satisfied with three nested maps, it's a beginning. Maybe we can boil it further down?
|
Thanks so much for the pull request! |
7a5803b to
8671378
Compare
|
Thanks so much for the pull request! |
8671378 to
951667d
Compare
|
Thanks so much for the pull request! |
951667d to
f6b4492
Compare
|
Thanks so much for the pull request! |
f6b4492 to
566e7e1
Compare
|
Thanks so much for the pull request! |
566e7e1 to
f83a10c
Compare
|
Thanks so much for the pull request! |
|
Thanks so much for the pull request! |
|
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
|
Individual CLA signed. Working on corporate CLA now. |
|
!signed-cla |
|
Thank you @bewing! |
* master: (117 commits) fix: bump github.com/nats-io/nats-server/v2 from 2.6.5 to 2.7.2 (influxdata#10638) chore: add -race flag to go tests (influxdata#10629) feat: update etc/telegraf.conf and etc/telegraf_windows.conf (influxdata#10631) fix: license doc outdated causing CI failure (influxdata#10630) fix: bump k8s.io/client-go from 0.22.2 to 0.23.3 (influxdata#10589) feat: Implemented support for reading raw values, added tests and doc (influxdata#6501) fix: Improve parser tests by using go-cmp/cmp (influxdata#10497) feat(mongodb): add FsTotalSize and FsUsedSize informations (influxdata#10625) docs: update quay docs for auth (influxdata#10612) chore: allow downgrade of go version in windows script (influxdata#10614) chore: update CI go to 1.17.6 (influxdata#10611) feat: update etc/telegraf.conf and etc/telegraf_windows.conf (influxdata#10600) fix(inputs.opcua): add more data to error log (influxdata#10465) fix: bump github.com/aws/aws-sdk-go-v2/service/kinesis from 1.6.0 to 1.13.0 (influxdata#10601) refactor: use early return pattern (influxdata#10591) fix: bump github.com/benbjohnson/clock from 1.1.0 to 1.3.0 (influxdata#10588) feat: add dynamic tagging to gnmi plugin (influxdata#7484) fix: bump github.com/Azure/azure-kusto-go from 0.5.0 to 0.5.2 (influxdata#10598) feat: update etc/telegraf.conf and etc/telegraf_windows.conf (influxdata#10584) fix(parsers.json_v2): allow optional paths and handle wrong paths correctly (influxdata#10468) ... # Conflicts: # plugins/outputs/elasticsearch/elasticsearch.go # plugins/outputs/elasticsearch/elasticsearch_test.go
Required for all PRs:
Closes #7462
Add the ability to specify gNMI subscriptions to be tag-only, storing them for application to other subscriptions with the exact same tagged "name". The primary application of the author is to apply interface description tags to all other interface metrics, to ease search in Influx.
I am extremely open to suggestion on improvement for either the memory storage of the tags, or alternatives for additional aliasing of the dynamic tag naming.