Copy Xml Files from Filebeat to logstash

I just need to copy the file from filebeat to logstash . Please find the below file where i am trying to copy the file to logstash in a folder (/etc/logstash/appscan_reports/xml) and trying to execute some script on it , Please help

input {
    beats {
    port => 5044
output {
    exec {
        command => "sudo cp %{message} /etc/logstash/appscan_reports/xml;sudo powershell -ExecutionPolicy ByPass -File /etc/logstash/ReadXml.ps1 /etc/logstash/appscan_reports/xml /etc/logstash/appscan_reports/json"
        interval => 60
        codec =>rubydebug


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.