0

我有一个问题,logstash 没有获取日志文件并将事物日志推送到 Kibana。每次在它被拾取之前,我都必须重新启动 logstash 进程。

查看 logstash conf 文件的示例

input {
  # one entry per topic file
  file {
    path => "/tmp/log-completed-backups.log"
    start_position => beginning
    type => "checkingfiles"
  }
}

filter {
  if "checkingfiles" in [type] {
    csv {
      separator => " "
      columns => ['cdate', 'ctime', 'bmonth', 'bday']
      add_tag => ["idam_filtered"]
    }
    mutate {
      rename => { "cdate" => "cdate" }
      rename => { "ctime" => "ctime" }
      rename => { "bmonth" => "bmonth" }
      rename => { "bday" => "bday" }

      add_field => {
        "namespace" => "${LB_SITE_NAME}"
      }
    }
  }
}
4

0 回答 0