Skip to content

Adding fields to metrics doesnt work, only updating existing one. #22133

Answered by robinpecha
robinpecha asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, problem solved:

  host_metrics_local_remap:
    inputs: [ "hostmetrics_local" ]
    type: "remap"
    source: |
      .namespace = "namespace"
      .tags.environment = "environment"
      .tags.datacenter = "datacenter"
      .labels.maintainer = "maintainer"
      .labels.service = "service"

Tags works, Labels not. Tags are enough for now .)

{"name":"network_transmit_packets_drop_total","namespace":"namespace","tags":{"collector":"network","datacenter":"datacenter","device":"eth0","environment":"environment","host":"be7de7baa9db"}, "timestamp":"2025-01-07T15:14:40.902959633Z","kind":"absolute","counter":{"value":0.0}}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jszwedko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants