-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathfluent.conf
More file actions
81 lines (75 loc) · 2.06 KB
/
Copy pathfluent.conf
File metadata and controls
81 lines (75 loc) · 2.06 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
##
## Fluentd configurations
## for New Relic Logs
## and Salesforce Commerce Cloud (aka Demandware)
##
<system>
<log>
time_format fluentd: %Y-%m-%d %H:%M:%S -
</log>
</system>
<source>
@type forward
@id input_forward
</source>
<label @FLUENT_LOG>
<match fluent.*>
@type null
</match>
</label>
<filter sfcc.*>
@type record_transformer
<record>
service_name ${tag}
</record>
</filter>
<filter sfcc.codeprofiler>
@type parser
inject_key_prefix codeprofiler.
key_name message
reserve_time true
reserve_data true
<parse>
@type csv
delimiter ;
keys type,name,count,totalTime,ownTime,totalWaitTime,ownWaitTime
types type:string, name:string, count:integer, totalTime:integer, ownTime:integer, totalWaitTime:integer, ownWaitTime:integer
</parse>
</filter>
<filter sfcc.api>
@type parser
inject_key_prefix api.
key_name message
reserve_time true
reserve_data true
<parse>
@type grok
<grok>
pattern \s*SCRIPT_METHOD:%{DATA:scriptMethod} in request\/site %{DATA:site} pipeline %{DATA:pipeline} %{DATA:script}, %{NUMBER:invocations} time
</grok>
<grok>
pattern \s*%{DATA:message} in request\/site %{DATA:site} pipeline %{DATA:pipeline} %{DATA:script}, %{NUMBER:invocations} time
</grok>
<grok>
pattern \s*%{WORD:class} usage violation: TEMPLATE:%{DATA:template} KEY:\s*%{GREEDYDATA:key}
</grok>
<grok>
pattern \s*%{WORD:class} usage violation: %{DATA:details} TEMPLATE:\s*%{DATA:template} SITE:\s*%{GREEDYDATA:site}
</grok>
<grok>
pattern \s*%{WORD:class} usage violation: %{DATA:details} PIPELINE:\s*%{DATA:pipeline} SITE:\s*%{GREEDYDATA:site}
</grok>
<grok>
pattern \s*%{WORD:class} usage violation: %{DATA:details} PIPELET:\s*%{DATA:pipelet} KEY:\s*%{GREEDYDATA:key}
</grok>
<grok>
pattern %{GREEDYDATA:message}
</grok>
</parse>
</filter>
<match **>
@type newrelic
license_key "#{ENV['NEWRELIC_API_KEY']}"
## Uncomment to forward all events to New Relic EU Endpoint
## base_uri https://log-api.eu.newrelic.com/log/v1
</match>