How to add node ip address as label to metrics? #14530
Unanswered
sfc-gh-aivanou
asked this question in
Q&A
Replies: 1 comment
-
You could use K8s downward api and ressource processor with env detector ? Add the following env in your daemonset - name: NODE_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name : OTEL_RESOURCE_ATTRIBUTES
value: "instance=${NODE_IP}"
And in your otel conf : processors:
resourcedetection:
detectors: [env] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am trying to set up the otel on my k8s cluster to capture host metrics and have a question:
I am setting up otel in a gateway mode and scraping hostmetrics. How do I add node ip address as label to each of the separate metric streams?
The configuration below produces the following metric output:
Where instance is the address of the gateway collector, which is not what I am looking for.
Here is my config:
Beta Was this translation helpful? Give feedback.
All reactions