input { file { path => "/var/log/httpd/error_log" start_position => "beginning" type => "logs" } } filter { grok { match => [ "message", "(?\[%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}\]) \[%{GREEDYDATA:loglevel}\] \[%{GREEDYDATA:pid}\] %{GREEDYDATA:errormsg} %{GREEDYDATA:path}" ] } } output { elasticsearch { hosts => [ "localhost:9200" ] index => "apache_errorlog" } }