Sambhav Sharma
Sambhav Sharma

Reputation: 5860

How to send selected logs to a logstash output

I am upgrading from logstash-1.1.3 to logstash-1.3.3. The problem is, that tags and fields configuration that were there in 1.1.3 are deprecated in version 1.3.3. These allowed to send only those events to the output which had given tags or contained given fields.

I just want to know what replaces these in logstash-1.3.3. How do I get the same functionality of sending selected events to an output. I don't want to send all the events to an output.

Upvotes: 3

Views: 767

Answers (1)

Ban-Chuan Lim
Ban-Chuan Lim

Reputation: 7890

You can use if statement to do this.

output {
    if [type] == "tech" {
         stdout{}
    }
}

This page has the introduction about how to configure.

Upvotes: 3

Related Questions