-
Notifications
You must be signed in to change notification settings - Fork 466
Expand file tree
/
Copy pathconfig-unstructured-logs-with-processor.yaml
More file actions
43 lines (42 loc) · 1.15 KB
/
config-unstructured-logs-with-processor.yaml
File metadata and controls
43 lines (42 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
receivers:
filelog:
include:
- /opt/data/logs/access-unstructured.log
start_at: beginning
operators:
- type: regex_parser
regex: '^(?P<ip>[\d.]+)\s+-\s+-\s+\[(?P<timestamp>[^\]]+)\]\s+"(?P<method>[A-Z]+)\s+(?P<url>[^\s]+)\s+HTTP/[^\s]+"\s+(?P<status>\d+)\s+(?P<size>\d+)\s+"(?P<referrer>[^"]*)"\s+"(?P<user_agent>[^"]*)"'
timestamp:
parse_from: attributes.timestamp
layout: '%d/%b/%Y:%H:%M:%S %z'
#22/Jan/2019:03:56:14 +0330
processors:
batch:
timeout: 1s
send_batch_size: 10000
memory_limiter:
check_interval: 1s
limit_mib: 2048
spike_limit_mib: 256
exporters:
# HTTP setup
otlphttp/hdx:
endpoint: 'http://localhost:4318'
headers:
authorization: <YOUR_INGESTION_API_KEY>
compression: gzip
# gRPC setup (alternative)
otlp/hdx:
endpoint: 'localhost:4317'
headers:
authorization: <YOUR_API_INGESTION_KEY>
compression: gzip
service:
telemetry:
metrics:
address: 0.0.0.0:9888 # Modified as 2 collectors running on same host
pipelines:
logs:
receivers: [filelog]
processors: [batch]
exporters: [otlphttp/hdx]