#${logstash_dir}/config/job_history.conf.template
#摄取、转换、充实和输出 mapreduce.jobhistory.webapp.address 页面 Job History 数据 Logstash 配置文件模板
input {
file { path => "${logstash_input_file}" }
}
filter {
grok {
match => { "message" => "%{WORD:job} %{USER:user_name} %{USER:queue} %{WORD:state} %{DATESTAMP_OTHER:submit_time} %{DATESTAMP_OTHER:start_time} %{DATESTAMP_OTHER:finish_time} %{NUMBER:waitting_time_s:int} %{NUMBER:execution_time_s:int} %{NUMBER:map_total:int} %{NUMBER:reduce_total:int} %{NUMBER:map_failed:int} %{NUMBER:reduce_failed:int} %{GREEDYDATA:sql}" }
remove_field => ['message']
}
}
output {
elasticsearch {
hosts => ["${elasticsearch_hosts}"]
index => "${elasticsearch_index}"
}
}