- Config:
- input {
- file {
- path => "c:\logstash\main.log "
- start_position => "beginning"
- type => "main_log"
- }
- }
- filter {
- if [type] == "main_log" {
- grok {
- patterns_dir => "c:\logstash\patterns"
- match => [ "message", "%{TIMESTAMP_ISO8601:logtimestamp}" ]
- }
- date {
- match => [ "logtimestamp", "ISO8601" ]
- #target => "@timestamp"
- }
- }
- else {
- mutate { { replace => { type => "RANDOM" } } }
- }
- }
- output {
- elasticsearch {
- host => localhost
- }
- stdout { codec => rubydebug }
- }
SHARE
TWEET
corrected syntax
a guest
Apr 30th, 2015
224
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
