Logstash is running on a K8 pod. I'm trying to save logstash data to a file in a different host.
Can you please let me know how to set host name?
output {
file {
path => "/app/log/path/%{Name}-%{+YYYY-MM-dd}.log"
}
}
Logstash is running on a K8 pod. I'm trying to save logstash data to a file in a different host.
Can you please let me know how to set host name?
output {
file {
path => "/app/log/path/%{Name}-%{+YYYY-MM-dd}.log"
}
}
You can't, the
file
output only writes locally, there is no option to set a host.To use the
file
output to write in another host you would need to export the directory from the target host and mount it in the logstash machine.