config like this:
input {
file {
path => "D:/Projects/jzt2/bd/erpxs/logstash/example.json"
codec => json { charset => "UTF-8" }
start_position => beginning
sincedb_path => "./sincedb.txt"
type => "log"
}
tcp {
type => "head"
port => 5040
codec => json { charset => "UTF-8" }
}
}
filter {
if [type] == 'log' {
date {
match => ["Timestamp", "ISO8601"]
target => "@timestamp"
}
mutate {
remove_field => [ "path", "@version", "host", "Timestamp" ]
}
}
}
output {
if [type] == 'log' {
tcp {
host => 'localhost'
port => 5040
mode => 'client'
codec => json { charset => "UTF-8" }
}
} else if [type] == 'head' {
stdout { codec => rubydebug }
}
}
why can't receive anything from localhost:5040 ?