Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.49 KB | None | 0 0
  1.  
  2.         stdin {
  3.  
  4.         }
  5. #       beats {
  6. #               port => 5044
  7. #       }
  8. }
  9.  
  10. filter {
  11.         if [type] == "apache-access" {
  12.                 grok {
  13.                         match => { "message" => "\[%{DATA:LogID}\]\s%{COMBINEDAPACHELOG}" }
  14.                 }
  15.                 date {
  16.                         match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ]
  17.                 }
  18.         }
  19.  
  20.         if [type] == "apache-ssl" {
  21.                 grok {
  22.                         match => { "message" => "\[%{DATA:LogID}\]\s%{COMBINEDAPACHELOG}" }
  23.                 }
  24.                 date {
  25.                         match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ]
  26.                         }
  27.                 }
  28.         if [type] == "apache-error" {
  29.                 grok {
  30.                         match => { "message" => "\[%{DATA:LogID}\]\s\[%{TIMESTAMP_ISO8601:timestamp}\]\s\[.*: %{LOGLEVEL:loglevel}\]\s\[\w+: %{NUMBER:pid}\]\s\[%{IPORHOST:client}\:%{POSINT:port}\]\s\[%{DATA:src filename}\]\s(\[%{DATA:errorstatus}\])?%{GREEDYDATA:message}" }
  31.                 date {
  32.                         match => [ "timestamp", "[TIMESTAMP_ISO8601]"]
  33.                         #match => [ "timestamp", "YYYY-MM-dd HH:mm:ss.SSSSSS" ]
  34.                         }
  35.             }
  36.         }
  37. }
  38. output {
  39.  
  40.         stdout { codec => rubydebug }
  41.         elasticsearch {
  42.                 hosts => "localhost:9200"
  43.                 user => "jobvector"
  44.                 password => "244850_Kibana"
  45.                 }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement