Skip to content

Instantly share code, notes, and snippets.

@untergeek
Created July 21, 2014 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untergeek/fade55b453520b17c644 to your computer and use it in GitHub Desktop.
Save untergeek/fade55b453520b17c644 to your computer and use it in GitHub Desktop.
conditional output
output {
stdout { debug => true debug_format => "json"}
if [type] == 'collectd' {
elasticsearch {
cluster => "elasticsearch"
}
}
}
@gugansankar
Copy link

Used the above output format in my logstash config , but it shows some error.

Error:
Unknown setting 'debug' for stdout {:level=>:error}
Unknown setting 'debug_format' for stdout {:level=>:error}
Error: Something is wrong with your configuration.

Config:
output {
stdout { debug => true debug_format => "json"}
if [type] == 'collectd' {
elasticsearch {
cluster => "elasticsearch"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment