# Search for and replace the "REPLACE ME" fields mode: daemonset # Kubernetes metriklerini etkinleştir presets: kubernetesAttributes: enabled: true kubeletMetrics: enabled: false # Disabled since we're using custom kubeletstats receiver hostMetrics: enabled: true logsCollection: enabled: true image: repository: otel/opentelemetry-collector-contrib tag: "latest" # Re-enabling syslog UDP port for receiving logs ports: otlp: enabled: true containerPort: 4317 servicePort: 4317 hostPort: 4317 protocol: TCP appProtocol: grpc otlp-http: enabled: true containerPort: 4318 servicePort: 4318 hostPort: 4318 protocol: TCP syslog-udp: enabled: true containerPort: 514 servicePort: 514 hostPort: 514 protocol: UDP resources: limits: cpu: 750m memory: 1.5Gi requests: cpu: 300m memory: 512Mi # Add security context to read protected log files securityContext: privileged: true runAsUser: 0 extraVolumes: - name: varlog hostPath: path: /var/log extraVolumeMounts: - name: varlog mountPath: /var/log readOnly: true config: extensions: health_check: endpoint: 0.0.0.0:13133 # basicauth/logsService: # client_auth: # username: '' # REPLACE ME # password: '' # REPLACE ME receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 # Custom kubeletstats receiver with TLS skip verify # kubeletstats: # collection_interval: 20s # auth_type: "serviceAccount" # endpoint: "${env:K8S_NODE_NAME}:10250" # insecure_skip_verify: true # Syslog UDP receiver syslog: udp: listen_address: "0.0.0.0:514" protocol: rfc5424 operators: - type: router id: route-logs routes: - output: k8s-format-router expr: 'attributes["log.file.path"] matches "^/var/log/pods/"' - output: syslog-parser expr: 'attributes["log.file.path"] matches "^/var/log/(syslog|auth\\.log|kern\\.log|messages)"' # Kubernetes log format router - type: router id: k8s-format-router routes: - output: parser-docker expr: 'body matches "^\\{"' - output: parser-crio expr: 'body matches "^[^ Z]+ "' - output: parser-containerd expr: 'body matches "^[^ Z]+Z"' # Syslog zinciri (sadeleştirilmiş) - type: regex_parser id: syslog-parser regex: '^(?P