github.com/observiq/carbon@v0.9.11-0.20200820160507-1b872e368a5e/examples/tomcat/config.yaml (about) 1 --- 2 pipeline: 3 4 # Read lines from Apache Tomcat access logs 5 # Example input line: 6 # 10.66.2.46 - - [13/Mar/2019:10:43:00 -0400] "GET / HTTP/1.1" 404 - 7 - type: file_input 8 start_at: beginning 9 include: 10 - ./access.log 11 labels: 12 log_type: tomcat 13 14 # Parse the logs into labeled fields 15 # Example input: 16 # { 17 # "timestamp": "2020-06-13T11:00:53-04:00", 18 # "record": "10.66.2.46 - - [13/Mar/2019:10:43:00 -0400] "GET / HTTP/1.1" 404 -" 19 # } 20 - type: regex_parser 21 regex: >- 22 (?P<remote_host>[^\s]+) 23 - 24 (?P<remote_user>[^\s]+) 25 \[(?P<timestamp>[^\]]+)\] 26 "(?P<http_method>[A-Z]+) 27 (?P<url_path>[^\s]+)[^"]*" 28 (?P<http_status>\d+) 29 (?P<bytes_sent>[\d-]+) 30 timestamp: 31 parse_from: timestamp 32 layout: '%d/%b/%Y:%H:%M:%S %z' 33 severity: 34 parse_from: http_status 35 preserve: true 36 mapping: 37 error: "4xx" 38 info: 39 - min: 300 40 max: 399 41 debug: 200 42 43 # Write the log to stdout 44 # Example input: 45 # { 46 # "timestamp": "2019-03-13T11:00:53-04:00", 47 # "severity": 60, 48 # "record": { 49 # "bytes_sent": "19698", 50 # "http_method": "GET", 51 # "http_status": "200", 52 # "remote_host": "10.66.2.46", 53 # "remote_user": "-", 54 # "url_path": "/manager/images/asf-logo.svg" 55 # } 56 # } 57 - type: stdout