摄取、转换、充实和输出 dfs.namenode.http-address 页面 dfshealth 数据 Logstash 配置文件模板

#${logstash_dir}/config/dfs_health.sh.template
#摄取、转换、充实和输出 dfs.namenode.http-address 页面 dfshealth 数据 Logstash 配置文件模板

input {
  file { path => "${logstash_input_file}" }
}
filter {
  grok {
    match => { "message" => "%{NUMBER:configured_capacity_tb:float} %{NUMBER:dfs_used_tb:float} %{NUMBER:non_dfs_used_tb:float} %{NUMBER:capacity_free_tb:float} %{NUMBER:capacity_used_tb:float} %{NUMBER:capacity_used_percent:float} %{NUMBER:dfs_used_percent:float} %{NUMBER:dfs_remaining_percent:float} %{NUMBER:node_usage_max:float} %{NUMBER:num_live_datenodes:int} %{NUMBER:num_dead_datenodes:int} %{NUMBER:num_total_datenodes:int}" }
    remove_field => ['message']
  }
}
output {
  elasticsearch { 
    hosts => ["${elasticsearch_hosts}"]
    index => "${elasticsearch_index}"
  }
}

猜你喜欢

转载自blog.csdn.net/qq_16592497/article/details/81334003