0

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"
    }
}
Kapila
  • 85
  • 2
  • 6

1 Answers1

0

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.

leandrojmp
  • 7,082
  • 2
  • 19
  • 24