Maybe you could use exec input to type your file to stdout like :
command => "type E:\myFile"
interval => 1
In this way you'll be reciving logstash events every second with the content of your file into the message field (Monitoring)..... However this is just a event per file and your file content will be just in one line like : This\n\is\na\n\multiline\nmessage or something like that, what I did to fix this was to modify my exec.rb to split the line like:
start = Time.now
@logger.info? && @logger.info("Running exec", :command => @command)
out = IO.popen(@command)
@pipe = IO.popen(@command, mode = "r")
@pipe.each do |line|
line = line.chomp
# out.read will block until the process finishes.
@codec.decode(line) do |event|
event["host"] = hostname
event["command"] = @command
queue << event
duration = Time.now - start
@logger.info? && @logger.info("Command completed", :command => @command,
:duration => duration)
# Sleep for the remainder of the interval, or 0 if the duration ran
# longer than the interval.
sleeptime = [0, @interval - duration].max
if sleeptime == 0
@logger.warn("Execution ran longer than the interval. Skipping sleep.",
:command => @command, :duration => duration,
:interval => @interval)
end # loop
taking the idea from pipe input plugin ;). This will split your message and will send an event per every line in your file...
Not sure how could this affect in your performance however.
Hope this help