84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
apiVersion: agent.k8s.elastic.co/v1alpha1
|
|
kind: Agent
|
|
metadata:
|
|
name: traefik-access
|
|
namespace: elastic
|
|
labels:
|
|
app.kubernetes.io/name: traefik-access
|
|
app.kubernetes.io/part-of: elastic-stack
|
|
spec:
|
|
version: 9.5.5
|
|
image: docker.elastic.co/elastic-agent/elastic-agent-wolfi:9.5.5
|
|
mode: standalone
|
|
elasticsearchRefs:
|
|
- name: elasticsearch
|
|
config:
|
|
agent:
|
|
monitoring:
|
|
enabled: true
|
|
use_output: default
|
|
logs: true
|
|
metrics: true
|
|
inputs:
|
|
- id: traefik-access
|
|
name: Traefik access logs
|
|
type: filestream
|
|
use_output: default
|
|
data_stream:
|
|
namespace: default
|
|
streams:
|
|
- id: traefik-access-json
|
|
data_stream:
|
|
dataset: traefik.access
|
|
type: logs
|
|
paths:
|
|
- /var/log/containers/traefik-*_default_traefik-*.log
|
|
parsers:
|
|
- container:
|
|
stream: stdout
|
|
format: auto
|
|
prospector.scanner.symlinks: true
|
|
tags:
|
|
- forwarded
|
|
processors:
|
|
- drop_event:
|
|
when:
|
|
not:
|
|
regexp:
|
|
message: '^\{'
|
|
daemonSet:
|
|
podTemplate:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: traefik-access
|
|
app.kubernetes.io/part-of: elastic-stack
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
securityContext:
|
|
runAsUser: 0
|
|
containers:
|
|
- name: agent
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: container-logs
|
|
mountPath: /var/log/containers
|
|
readOnly: true
|
|
- name: pod-logs
|
|
mountPath: /var/log/pods
|
|
readOnly: true
|
|
volumes:
|
|
- name: container-logs
|
|
hostPath:
|
|
path: /var/log/containers
|
|
type: Directory
|
|
- name: pod-logs
|
|
hostPath:
|
|
path: /var/log/pods
|
|
type: Directory
|