class LogStash::Outputs::Exec
This output will run a command for any matching event.
Example:
output { exec { type => abuse command => "iptables -A INPUT -s %{clientip} -j DROP" } }
Run subprocesses via system ruby function
WARNING: if you want it non-blocking you should use & or dtach or other such techniques
Public Instance Methods
receive(event)
click to toggle source
# File lib/logstash/outputs/exec.rb, line 34 def receive(event) return unless output?(event) @logger.debug("running exec command", :command => event.sprintf(@command)) system(event.sprintf(@command)) end
register()
click to toggle source
# File lib/logstash/outputs/exec.rb, line 29 def register @logger.debug("exec output registered", :config => @config) end