daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Nov 28th, 2013 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input {
  2.     redis {
  3.         key  => "logstash"
  4.         data_type => "list"
  5.         host => "127.0.0.1"
  6.         port => 6379
  7.   }
  8. }
  9.  
  10. filter {
  11.  
  12.   if [type] == "maillog"
  13.    {
  14.       grok {
  15.  
  16.         match => [ "message", "(?<log_timestamp>%{MONTH:Month} %{MONTHDAY:Day} %{TIME:time}) %{HOST:sourcehost} %{SYSLOGPROG}: (?<queue_id>[0-9A-F]{10,15}): to=<(?<reciepient_id>%{GREEDYDATA:receipient_name}@%{JAVACLASS:receipient_domain})>, relay=%{GREEDYDATA:relay}, delay=%{NUMBER:delay}, delays=%{GREEDYDATA:delays}, dsn=%{NOTSPACE:dsn} status=%{WORD:status} %{GREEDYDATA}" ]
  17.  
  18.         match => [ "message", "(?<log_timestamp>%{MONTH:Month} %{MONTHDAY:Day} %{TIME:time}) %{HOST:sourcehost} %{SYSLOGPROG}: (?<queue_id>[0-9A-F]{10,15}): from=<%{GREEDYDATA:sent_to}>, status=%{WORD:status}, %{GREEDYDATA}" ]
  19.  
  20.         match => [ "message", "(?<log_timestamp>%{MONTH:Month} %{MONTHDAY:Day} %{TIME:time}) %{HOST:sourcehost} %{SYSLOGPROG}: %{GREEDYDATA}" ]
  21.         named_captures_only => true
  22.  
  23.       }
  24.       multiline {
  25.         pattern => "^\/"
  26.         what => "previous"
  27.      }
  28.      date {
  29.         match => [ "log_timestamp", "MMM dd HH:mm:ss", "MMM  d YYY HH:mm:ss", "ISO8601" ]
  30.      }
  31.   }
  32.  
  33.   if [type] == "puppet"
  34.     {
  35.        drop {}
  36.     }
  37. }
  38. output {
  39.      stdout {}
  40.      elasticsearch {
  41.            embedded => true
  42.      }
  43. }
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