Tags removed in 2.0.0.beta2?


(Craig Foote) #1

Am I reading this right, https://www.elastic.co/blog/logstash-2-0-0-beta2-released?

Until the introduction of conditionals, the only way to selectively apply filters and outputs to some events was to set the type, tags and exclude_tags options. These configuration options have been deprecated for some time now and this release either removes them, or they are marked with the new obsolete tag. You will not be able to use them in your configuration file without a resulting error.

I make heavy use of tags to coordinate input, filter and output blocks and index names in config files. Am I going to have to rewrite them all? We run Logstash with a folder containing numerous configs - multiple inputs each with a tag identifying the stream - then multiple outputs naming the index to create based on those tags. I'm not sure how to do that with just conditional... Help!


(Magnus B├Ąck) #2

Tags aren't being deprecated completely (and even if they were tags are not really different from any other field), just the mechanism for selecting filters and output via the type, tags, and exclude_tags options, i.e. instead of

filter {
  foo {
    ...
    type => "blah"
  }
}

you need this:

filter {
  if [type] == "blah" {
    foo {
      ...
    }
  }
}

(Craig Foote) #3

Whew! Thanks Magnus.


(system) #4