-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kubernetes_logs] Logs are not forwarded if pod has "app" label configured #8058
Comments
Hey! This is actually because of how fields with dots ( I've previously used a [transforms.dedot_labels]
type = "lua"
inputs = ["input"]
version = "2"
hooks.process = "process"
source = """
function process(event, emit)
if event.log.kubernetes == nil then
return
end
dedot(event.log.kubernetes.pod_labels)
emit(event)
end
function dedot(map)
if map == nil then
return
end
local new_map = {}
local changed_keys = {}
for k, v in pairs(map) do
local dedotted = string.gsub(k, "%.", "_")
if dedotted ~= k then
new_map[dedotted] = v
changed_keys[k] = true
end
end
for k in pairs(changed_keys) do
map[k] = nil
end
for k, v in pairs(new_map) do
map[k] = v
end
end
""" |
The error is hugely misleading then - because apparently after I changed from using |
It's definitely tricky on the ES side - when you index a document with a label app: {
kubernetes: {
io/name: "my-app",
}
} If this event is received by ES before just Does that make more sense? |
Holy moly |
I'm getting an error when my pod has label called "app". I've found about it when I tried to run https://github.com/opsgenie/kubernetes-event-exporter/blob/master/deploy/02-deployment.yaml this deployment. I think it should be pretty easy to replicate given that.
I've fixed it by changing the
app
label toapp_name
label.Vector Version
Vector Configuration File
I'm using helm setup with following values
Debug Output
I'm not quite sure how to configure the debug output using helm chart, but can provide if it will be really necessary
Expected Behavior
Logs should be forwarded to elasticsearch
Actual Behavior
Logs were dropping, with error in stdout
Example Data
https://github.com/opsgenie/kubernetes-event-exporter/blob/master/deploy/02-deployment.yaml
Deploy this kubernetes cluster alongside vector, configure elasticsearch sink and the logs are not there.
The text was updated successfully, but these errors were encountered: