Skip to content

Commit

Permalink
Filter by component_id and skip the check
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorhuertas committed Dec 13, 2024
1 parent 1ab2a02 commit 6e15afb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions vector/node/namespaced/resources/metrics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ function on_timer(emit)
end

function process_event(event, emit)
-- ensure that we don't mess with custom kube sources like "kubernetes_events"
if event.metric.tags.component_id ~= "kubernetes_logs" then
error()
end

local name = event.metric.name
local ns = event.metric.tags.pod_namespace
local pod = event.metric.tags.pod_name
Expand Down
4 changes: 2 additions & 2 deletions vector/node/namespaced/resources/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ transforms:
inputs:
- vector_metrics
route:
received_bytes: .tags.component_type == "kubernetes_logs" && .name == "component_received_event_bytes_total"
received_events: .tags.component_type == "kubernetes_logs" && .name == "component_received_events_total"
received_bytes: .tags.component_id == "kubernetes_logs" && .name == "component_received_event_bytes_total"
received_events: .tags.component_id == "kubernetes_logs" && .name == "component_received_events_total"

# Agreggate metrics by removing pod_name and pod_namespace labels
expensive_metrics_aggregator:
Expand Down

0 comments on commit 6e15afb

Please sign in to comment.