12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- input {
- tcp {
- mode => "server"
- host => "0.0.0.0"
- port => 4560
- codec => json_lines
- type => "debug"
- }
- tcp {
- mode => "server"
- host => "0.0.0.0"
- port => 4561
- codec => json_lines
- type => "error"
- }
- tcp {
- mode => "server"
- host => "0.0.0.0"
- port => 4562
- codec => json_lines
- type => "business"
- }
- tcp {
- mode => "server"
- host => "0.0.0.0"
- port => 4563
- codec => json_lines
- type => "record"
- }
- }
- filter{
- if [type] == "record" {
- mutate {
- remove_field => "port"
- remove_field => "host"
- remove_field => "@version"
- }
- json {
- source => "message"
- remove_field => ["message"]
- }
- }
- }
- output {
- elasticsearch {
- hosts => "localhost:9200"
- index => "mall-%{type}-%{+YYYY.MM.dd}"
- }
- }
|