Created
          March 19, 2015 04:59 
        
      - 
      
- 
        Save chernjie/c3fef17fee15e534463d to your computer and use it in GitHub Desktop. 
    Logstash multiline filter for Magento
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | filter { | |
| if [type] == "magento" { | |
| multiline{ | |
| pattern => "^%{TIMESTAMP_ISO8601:timestamp}" | |
| what => "previous" | |
| negate=> true | |
| } | |
| grok { | |
| match => [ | |
| "message", | |
| "(?m)%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:priority_name} \(%{INT:priority_level}\): %{GREEDYDATA:message}" | |
| ] | |
| add_field => [ "received_at", "%{@timestamp}" ] | |
| add_field => [ "received_from", "%{host}" ] | |
| overwrite => [ "message" ] | |
| } | |
| date { | |
| match => [ "timestamp", "ISO8601" ] | |
| } | |
| json { | |
| source => "message" | |
| target => "json" | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment