update prod filebeat

main
ycz008 2024-01-17 16:50:27 +08:00
parent 0fb789fba1
commit c01d71beaf
2 changed files with 7 additions and 3 deletions

View File

@ -29,13 +29,13 @@ data:
filebeat.inputs:
- type: log
paths:
- /data/app_logs/*/logstash/*.log
- /data/app_logs/*/*/logstash/*.log
json.keys_under_root: true
tags: ['json']
#All data to indexed to Elasticsearch
output.logstash:
hosts: ["logstash.base.svc:5044"]
hosts: ["log-app.beaconfireinc.com:30012"]
---
apiVersion: apps/v1

View File

@ -18,12 +18,16 @@ data:
source => "message"
}
}
mutate {
split => { "[log][file][path]" => "/" }
add_field => { "env" => "%{[log][file][path][3]}" }
}
}
output {
elasticsearch {
hosts => ["http://10.2.0.12:30019"]
index => "prod-logback-beaconfire-%{+YYYY.MM.dd}"
index => "%{[env]}-logback-beaconfire-%{+YYYY.MM.dd}"
}
}
logstash.yml: |-