Skip to content

Commit 6e15afb

Browse files
committed
Filter by component_id and skip the check
1 parent 1ab2a02 commit 6e15afb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

vector/node/namespaced/resources/metrics.lua

-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ function on_timer(emit)
2121
end
2222

2323
function process_event(event, emit)
24-
-- ensure that we don't mess with custom kube sources like "kubernetes_events"
25-
if event.metric.tags.component_id ~= "kubernetes_logs" then
26-
error()
27-
end
28-
2924
local name = event.metric.name
3025
local ns = event.metric.tags.pod_namespace
3126
local pod = event.metric.tags.pod_name

vector/node/namespaced/resources/metrics.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ transforms:
99
inputs:
1010
- vector_metrics
1111
route:
12-
received_bytes: .tags.component_type == "kubernetes_logs" && .name == "component_received_event_bytes_total"
13-
received_events: .tags.component_type == "kubernetes_logs" && .name == "component_received_events_total"
12+
received_bytes: .tags.component_id == "kubernetes_logs" && .name == "component_received_event_bytes_total"
13+
received_events: .tags.component_id == "kubernetes_logs" && .name == "component_received_events_total"
1414

1515
# Agreggate metrics by removing pod_name and pod_namespace labels
1616
expensive_metrics_aggregator:

0 commit comments

Comments
 (0)