Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 1c57380

Browse files
author
Chris Wiechmann
committed
Default variable DROP_TRACE_MESSAGE_LEVELS in pipeline
1 parent 6379270 commit 1c57380

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/logstash.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
env:
5858
API_BUILDER_URL: 'http://localhost:8080'
5959
MEMCACHED: 'localhost:11211'
60-
DROP_TRACE_MESSAGE_LEVELS: DEBUG
60+
DROP_TRACE_MESSAGE_LEVELS: 'DEBUG'
6161
# This is not relevant as we test with HTTP
6262
# But it's required by Logstash to be a valid certificate
6363
API_BUILDER_SSL_CERT: "./config/certificates/apibuilder4elastic.crt"

logstash/pipelines/TraceMessagesPipeline.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ filter {
1313
match => { "message" => "%{LOGLEVEL:level}%{SPACE}(?<loggedDate>\d{2}\/.{3}\/\d{4}:\d{2}:\d{2}:\d{2}\.\d{3})%{SPACE}\[%{WORD:fluff}\:%{WORD:correlationId}\]\s?%{GREEDYDATA:body}" }
1414
}
1515
mutate {
16-
add_field => { "[@metadata][dropLevels]" => "${DROP_TRACE_MESSAGE_LEVELS}" }
16+
add_field => { "[@metadata][dropLevels]" => "${DROP_TRACE_MESSAGE_LEVELS:}" }
1717
}
1818
if( [level] in [@metadata][dropLevels] ) {
1919
drop { id => "Log-Level based drop" }

0 commit comments

Comments
 (0)