From edcb6399dfd75cc0a80097d89520065d81673f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 16 Sep 2022 08:20:15 +0300 Subject: [PATCH] elastic-system: Fixes and cleanups --- elastic-system/application.yml | 55 +++++++++++----------------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/elastic-system/application.yml b/elastic-system/application.yml index e9f24c8..ac9de10 100644 --- a/elastic-system/application.yml +++ b/elastic-system/application.yml @@ -24,50 +24,12 @@ spec: type: container paths: - /var/log/containers/*${data.kubernetes.container.id}.log - processors: - - drop_fields: - fields: - - stream - - target - - host - ignore_missing: true - - rename: - fields: - - from: "kubernetes.node.name" - to: "host" - - from: "kubernetes.pod.name" - to: "pod" - - from: "kubernetes.labels.app" - to: "app" - - from: "kubernetes.namespace" - to: "namespace" - ignore_missing: true - - drop_fields: - fields: - - input - - agent - - container - - ecs - - host - - kubernetes - - log - - "@metadata" - ignore_missing: true - - decode_json_fields: - fields: - - message - max_depth: 2 - expand_keys: true - target: "" - add_error_key: true daemonSet: podTemplate: spec: serviceAccountName: filebeat automountServiceAccountToken: true terminationGracePeriodSeconds: 30 - dnsPolicy: ClusterFirstWithHostNet - hostNetwork: true # Allows to provide richer host metadata containers: - name: filebeat securityContext: @@ -84,6 +46,12 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + resources: + limits: + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi - name: exporter image: sepa/beats-exporter args: @@ -224,3 +192,14 @@ spec: - hosts: - kibana.k-space.ee secretName: kibana-tls +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: filebeat +spec: + selector: + matchLabels: + beat.k8s.elastic.co/name: filebeat + podMetricsEndpoints: + - port: exporter