Using exec and file inputs together

Curious if it's possible to use both these inputs in a single pipeline to have a script executed (that saves a file) and then the file input picks up the file? Something like below.

input {
  exec {
    command => "d:/script/hulksmash.ps1"
    interval => 300
  }
  file {
    id => "Hulk Smash Data"
    path => "d:/Ingest/HulkSmash/*.txt"
    stat_interval => 60
    start_position => beginning
    close_older => 400
  }
}

You can do it with https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html.

The file inpu should not care how a matching file is created so you should be able to use a script called by the exec input plugin to create it.

1 Like

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