daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Apr 30th, 2015 204 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Config:
  2.  
  3. input {
  4.             file {
  5.                         path => "c:\logstash\main.log "                    
  6.                         start_position => "beginning"
  7.             }
  8. }
  9. filter {
  10.     if [path] =~ "main" {
  11.             mutate { { replace => { type => "main_log" } } }
  12.       grok {
  13.             patterns_dir => "c:\logstash\patterns"
  14.                 match => [ "message", "%{TIMESTAMP_ISO8601:logtimestamp}" ]
  15.       }
  16.       date {
  17.             match => [ "logtimestamp", "ISO8601" ]    
  18.             #target => "@timestamp"
  19.       }
  20.     } else {
  21.             mutate { { replace => { type => "RANDOM" } } }
  22.             }
  23. }
  24. output {
  25.     elasticsearch {
  26.          host => localhost
  27.             }
  28.             stdout { codec => rubydebug }
  29. }
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. OK, I Understand
 
Top