Convert logstash filter to fluentd

573 views Asked by At

I'm really new to fluentd configurations and need help to convert this logstash config to fluentd to get started

filter {
  if [syslog5424_host] =~ /apilog/ {
    if [syslog5424_msg] =~ /\"ApplicationType\"\:\"API\"/ {
      json {
        source => "syslog5424_msg"
        # Remove syslog5424_msg field only if json filter is successful
        remove_field => ["syslog5424_msg", "syslog5424_sd", "syslog5424_proc", "syslog5424_pri", "syslog5424_ver", "syslog_facility", "syslog_facility_code"]
      }

      mutate {
        add_tag => ["API"]
        replace => { "type" => "api-dev" }
      }
    }
    else {
      mutate {
        add_tag => ["API"]
      }
    }
  }
}
0

There are 0 answers