Logstash file output to different host

366 views Asked by At

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"
    }
}
1

There are 1 answers

0
leandrojmp On

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.