daily pastebin goal
23%
SHARE
TWEET

corrected syntax

a guest Apr 30th, 2015 224 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.     type => "main_log"
  8.   }
  9. }
  10.  
  11. filter {
  12.   if [type] == "main_log" {
  13.     grok {
  14.       patterns_dir => "c:\logstash\patterns"
  15.       match => [ "message", "%{TIMESTAMP_ISO8601:logtimestamp}" ]
  16.     }
  17.     date {
  18.       match => [ "logtimestamp", "ISO8601" ]    
  19.       #target => "@timestamp"
  20.     }
  21.   }
  22.   else {
  23.     mutate { { replace => { type => "RANDOM" } } }
  24.   }
  25. }
  26.  
  27. output {
  28.   elasticsearch {
  29.     host => localhost
  30.   }
  31.   stdout { codec => rubydebug }
  32. }
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