elastic / elastic/logstash

Unwanted extra lines added by filter to overall output

Open
#7,286 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Logtsah is adding extra lines to the output.

It seems to be used by the metric filter. Wehre every 5 seconds an event is added to the output that looks like this:
2017-06-01T19:28:24.258Z %{host} _actual_name_of_host_

I removed the filter and the lines are not there any longer when testing with stdout{}

These lines should not be added to the overall output as it invalidates the data you are actually trying to use logstash for.

below is the overall setup of the config.

For all general issues, please provide the following details for fast resolution:

- Version: logstash-5.4.0
- Operating System: RHEL 6.7
- Config File (if you have sensitive info, please remove it): default
- Sample Data: regular text line
- Steps to Reproduce:
input {
kafka consumer
}
filter {
if [type] == "consumer_type_1" {
metrics {
meter => "events1"
add_tag => "metric1"
}
}
Output
{
Syslog {}

if "metric1" in [tags] {
file {
path => "/var/log/logstash/logstash_metrics_1st_instance.log"
codec => line { format => "1m rate: %{[events1][rate_1m]} 5m rate: %{[events1][rate_5m]} Count: ( %{[events1][count]} ) "}
}
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.