Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Conversation

@jhujhiti
Copy link
Contributor

@jhujhiti jhujhiti commented May 5, 2022

These tags are a map whose key/value will be added to event metadata on every subscribe response for the target.

My use-case is to enrich all Prometheus metrics with a "site" label. For example, the config

targets:
  switch1:
    event-tags:
      site: sitea
  switch2:
    event-tags:
      site: siteb

will result in events and ultimately Prometheus metrics (in my case) with an extra label site=sitea/siteb.

I would have preferred to call the field simply tags, but it's already in use by the clustering function and I didn't want to overload its meaning.

These tags are a map whose key/value will be added to event metadata
on every subscribe response for the target.
@karimra
Copy link
Owner

karimra commented May 6, 2022

Thanks for this contribution, although the same result can be achieved using the event-add-tag processor, this way is more simple for static tags per target.

@karimra karimra merged commit 59ea776 into karimra:main May 6, 2022
@jhujhiti
Copy link
Contributor Author

jhujhiti commented May 6, 2022

I had tried to use event-add-tag to accomplish it, actually, but in my case, I had no value to pull out of an existing tag (like source) nor any consistent way to match another tag or value to identify unique groupings to assign a static tag to. Basically, the one I was trying to add was unknowable based on the gNMI stream or existing metadata.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants