Problem
I have a machine with logstash on it and another Elasticsearch-Kibana machine that stores logs written using logstash on the first machine. Naturally, I do not want the logs to be stored on the source machine and only be processed in the Elasticsearch cluster.
Unfortunately, logstash creates huge log files on the first computer (where nothing needs to be saved):
Configuration
I have only one file under /etc/logstash
on the source computer, and as far as I can see, the local output is not specified in the configuration:
input {
tcp {
port => 5959
codec => json
}
udp {
port => 5959
}
}
filter{
json{
source => "message"
}
}
filter{
if [@message] == "Incoming Event" {
mutate{
add_field => {
"location" => "%{@fields[location]}"
}
}
}
}
output {
elasticsearch {
host => "some.internal.aws.ip"
}
}
How can I stop logstash from writing local logs by configuration? I know that I can help them, but I think that prevention is less error prone.