logstash-plugins / logstash-filter-metrics

Apache License 2.0
15 stars 29 forks source link

Metrics plugin causes full halt in pipeline #25

Closed xrl closed 7 years ago

xrl commented 9 years ago

I have been dockerizing my logstash config and using the docker-library's 1.5.4 image. My pipeline stopped completely at the first message, requiring a hard reset, and I had to track down the issue by commenting out config until the pipeline worked again.

I found the culprit and it's the metrics filter:

filter {
  metrics {
    meter => ["events"]
    add_tag => ["metric"]
    flush_interval => 60
    rates => [1]
  }
  if [loghost] == "10.65.248.9" {
    if [cisco-tag] =~ /106015|106023|106100|302013|302014|302015|302016|302020|305011|609001/ {
      mutate {
        add_field => { "host_label" => "%{loghost}"}
      }
      mutate {
        gsub => ["host_label", "\.", "_"]
      }
      metrics {
        meter => ["%{host_label}.%{cisco-tag}"]
        add_tag => ["metric"]
        flush_interval => 60
        rates => [1]
      }
    }
  } # end if
} # end filter

what can I do to get my pipeline working again with the metrics filter?

hp197 commented 9 years ago

The config you quoted should be a working config.

Is there any other indication about what is going wrong in the log files? (look in: /var/log/logstash/)

P.S. Logstash can get blocked if the output doesn't work. You should check that too.