25 lines
502 B
YAML
25 lines
502 B
YAML
|
|
# Filebeat 日志收集配置
|
||
|
|
# 将 FastAPI、Celery 日志发送到 Elasticsearch
|
||
|
|
filebeat.inputs:
|
||
|
|
- type: log
|
||
|
|
enabled: true
|
||
|
|
paths:
|
||
|
|
- /app/logs/*.log
|
||
|
|
fields:
|
||
|
|
service: aiagent-backend
|
||
|
|
multiline:
|
||
|
|
pattern: '^\d{4}-\d{2}-\d{2}'
|
||
|
|
negate: true
|
||
|
|
match: after
|
||
|
|
|
||
|
|
- type: log
|
||
|
|
enabled: true
|
||
|
|
paths:
|
||
|
|
- /var/log/nginx/*.log
|
||
|
|
fields:
|
||
|
|
service: aiagent-nginx
|
||
|
|
|
||
|
|
output.elasticsearch:
|
||
|
|
hosts: ["elasticsearch:9200"]
|
||
|
|
index: "aiagent-%{+yyyy.MM.dd}"
|