Skip to content

Instantly share code, notes, and snippets.

@pheaver
Created November 2, 2012 00:47
Show Gist options
  • Save pheaver/3997900 to your computer and use it in GitHub Desktop.
Save pheaver/3997900 to your computer and use it in GitHub Desktop.
input { stdin { type => "test"}}
filter {
grok {
type => "test"
pattern => [ "%{NUMBER:number}" ]
add_field => [ "x", "%{number}" ]
}
}
output { stdout { debug => true debug_format => "json"}}
@pheaver
Copy link
Author

pheaver commented Nov 2, 2012

123
{"@source":"stdin://max.local/","@fields":{"x":["%{number}"]},"@timestamp":"2012-11-02T00:44:09.173Z","@source_host":"max.local","@source_path":"/","@message":"123","@type":"test"}

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