Skip to content

Commit

Permalink
Merge pull request #46 from solarwinds/feature/NH-9821-k8sNodeDedupli…
Browse files Browse the repository at this point in the history
…cation

NH-9821: k8s Node deduplication
  • Loading branch information
gantrior authored Jun 28, 2022
2 parents 48c5441 + 44788b7 commit df416e7
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion build/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ processors:
experimental_match_labels: { "condition": "DiskPressure", "status": "true" }
action: insert
new_name: k8s.node.status.condition.diskpressure
# Add dummy `host.id` so that we can update it (and only for this metric) later in Resource Attributes processor
- include: k8s.kube_node_info
action: update
operations:
- action: add_label
new_label: host.id
new_value: _

# Cluster metrics
- include: k8s.kube_pod_info
Expand Down Expand Up @@ -329,6 +336,7 @@ processors:
- sw.k8s.pod.status
- sw.k8s.namespace.status
- sw.k8s.node.status
- host.id
resource:
attributes:
# Remove useless attributes
Expand All @@ -344,6 +352,11 @@ processors:
- key: scheme
action: delete

# Collector and Manifest version
- key: sw.k8s.agent.manifest.version
value: "1.0"
action: insert

# Cluster
- key: sw.k8s.cluster.uid
value: ${CLUSTER_UID}
Expand Down Expand Up @@ -374,7 +387,17 @@ processors:

- key: host.id
from_attribute: k8s.node.name
action: insert
action: update

- key: provider_id
pattern: ^aws.*/(?P<awsInstanceId>[^/]+)$
action: extract

- key: host.id
from_attribute: awsInstanceId
action: update
- key: awsInstanceId
action: delete

- key: sw.k8s.node.version
from_attribute: kubelet_version
Expand Down

0 comments on commit df416e7

Please sign in to comment.