After updating to filebeat to 8.6.2 I observe an increase in cpu usage. also tested on 8.6.1 same thing, went back to 8.0.0 and could also observe an increase there, however less than in 8.6.2 and 8.6.1. Is there anything that can explain that?
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
hints.default_config:
type: container
paths:
- /var/log/containers/*${data.kubernetes.container.id}.log
add_resource_metadata:
cronjob: false
deployment: false
namespace:
enabled: true
fields_under_root: true
fields:
kubernetes.cluster: {{ .Values.name }}
kubernetes.stage: {{ (split "-" .Values.name)._1 }}
processors:
- add_host_metadata:
netinfo.enabled: false
when.not.equals.kubernetes.namespace_labels.namespace-type: application
- drop_fields:
fields: ['ecs.version', 'kubernetes.namespace_uid']
when.not.equals.kubernetes.namespace_labels.namespace-type: application
- drop_fields:
fields: ['kubernetes.node.uid', 'kubernetes.pod.ip', '/^kubernetes.node.labels.*/']
# the "index-name" field is used by ELK to determine the effective index
# the effective index is "index-name" suffixed by the current day
- copy_fields:
fields:
- from: kubernetes.labels.logging_acc_k8s_zone/index-name
to: index-name
fail_on_error: false
ignore_missing: true
when.not.has_fields: ['index-name']
# all applications in our namespaces will use the acccps-k8s-logs index, if not overwritten by a label
- add_fields:
target: ''
fields:
index-name: acccps-k8s-logs
when:
and:
- not.has_fields: ['index-name']
- or:
- equals.kubernetes.namespace_labels.namespace-type: shared
- equals.kubernetes.namespace_labels.namespace-type: helper
- add_fields:
fields:
agent.hostname: ${HOSTNAME}
target: ""
- copy_fields:
fields:
- from: container.image.name
to: kubernetes.container.image
target: "kubernetes"
- decode_json_fields:
fields: ['message']
overwrite_keys: true
target: ""
# the "tenant" field is just for convinience
- copy_fields:
fields:
- from: kubernetes.namespace_labels.tenant
to: tenant
fail_on_error: false
ignore_missing: true
when.not.has_fields: ['tenant']
# drop events without index-name, because ELK can't handle them anyway
- drop_event:
when.not.has_fields: ['index-name']
output.logstash:
hosts:
- {{ printf "%s:%d" .Values.log_sink.address (.Values.log_sink.port | int) }}
ssl:
certificate_authorities:
- "/etc/puki-certs/pukirootca1.pem"
above is my config file, when updating to 8.6.2, I drop some fields, add some and copied some see changes below
- drop_fields:
fields: ['kubernetes.node.uid', 'kubernetes.pod.ip', '/^kubernetes.node.labels.*/']
- add_fields:
fields:
agent.hostname: ${HOSTNAME}
- copy_fields:
fields:
- from: container.image.name
to: kubernetes.container.image
target: "kubernetes"
Tried to comment out those changes to see if they are root cause, but it did not help since the cpu usage was still high.
Any idea why this is happening?