Last active
January 28, 2019 18:04
-
-
Save Leen15/b219a583634e2d5c6ec824254c5869ab to your computer and use it in GitHub Desktop.
Patterns for sematext agent
This file contains 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
patterns: | |
- sourceName: !!js/regexp /docker-nginx-loadbalancer/ | |
match: | |
- type: nginxbalancer | |
regex: !!js/regexp /^(\[(.+?)\]\s-\sclient_ip=(.+?)\slb=(.+?)\scontainer=(.+?)\sresponse_status=(.+?)\spath="(.+?)"\sresponse=(.+?)\scontainer_status=(.+?)\stotal_time=(.+?)\sbytes=(.+?)\suser_agent="(.+?)"\shost=(.+?)\sbody=(.+))/i | |
fields: | |
- message | |
- ts | |
- client_ip:string | |
- lb:string | |
- container:string | |
- response_status:number | |
- path:string | |
- response_time:number | |
- container_status:number | |
- total_time:number | |
- bytes:number | |
- user_agent:string | |
- host_name:string | |
- body:string | |
dateFormat: DD/MMM/YYYY:HH:mm:ss ZZ | |
# drop messages with the text "debug" | |
inputDrop: !!js/regexp /debug/i | |
- sourceName: !!js/regexp /uala-backend/ | |
match: | |
- type: backend | |
regex: !!js/regexp /(^\s{0,1}method=(.+?)\spath=(\S+)\sformat=(\S+)\scontroller=(.+?)\saction=(.+?)\sstatus=(.+)\sduration=(.+?)\sview=(.+?)\sdb=([\d|\.]+))/i | |
fields: | |
- message | |
- method:string | |
- path:string | |
- format:string | |
- controller:string | |
- action:string | |
- status:number | |
- duration:number | |
- view:number | |
- db:number | |
dateFormat: DD/MMM/YYYY:HH:mm:ss ZZ | |
# drop messages with the text "debug" | |
inputDrop: !!js/regexp /debug/i | |
- sourceName: !!js/regexp /web.uala.it/ | |
match: | |
- type: nginxdefault | |
regex: !!js/regexp /((.+?)\s-\s-\s\[(.+?)\]\s"(.+?)"\s(.+?)\s(.+?)\s"(.+?)"\s"(.+?)"\s"(.+?)")/i | |
fields: | |
- message | |
- lb:string | |
- ts | |
- path:string | |
- response_status:number | |
- size:number | |
- referer:string | |
- user_agent:string | |
- client_ip:string | |
dateFormat: DD/MMM/YYYY:HH:mm:ss ZZ | |
# drop messages with the text "debug" | |
inputDrop: !!js/regexp /debug/i | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment