-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from anasoid/develop
mutiline
- Loading branch information
Showing
48 changed files
with
1,216 additions
and
376 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ build | |
test | ||
input | ||
.history | ||
.sincedb | ||
.sincedb | ||
.idea |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
filter { | ||
if !([message] =~ /^timeStamp/) { | ||
ruby { | ||
init => "$count_event=0" | ||
code => " | ||
if $count_event < 1 | ||
sleep(5) | ||
$count_event += 1 | ||
end | ||
" | ||
tag_on_exception => "_rubyexception_filtred_sleep" | ||
} | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#start_position => string, one of ["beginning", "end"] | ||
#mode => string, one of ["tail", "read"] | ||
#file_completed_action : delete, log, log_and_delete | ||
input { | ||
file { | ||
id => "jtl-input" | ||
path => ["${INPUT_PATH:/input}/**.jtl","${INPUT_PATH_JTL:/input}/**.jtl"] | ||
mode => "${FILE_READ_MODE:tail}" | ||
start_position => "${FILE_START_POSITION:beginning}" | ||
exit_after_read => "${FILE_EXIT_AFTER_READ:false}" | ||
file_completed_action => "${FILE_COMPLETED_ACTION:log}" | ||
file_completed_log_path => "file_completed_log_path.log" | ||
codec => multiline { | ||
pattern => "^\d{4}" | ||
negate => true | ||
what => "previous" | ||
} | ||
} | ||
|
||
|
||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output { | ||
pipeline { | ||
send_to => ["main-jtl"] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
filter { | ||
|
||
mutate { | ||
add_field => { | ||
"project" => "${PROJECT_NAME:undefined}" | ||
"[@metadata][executionid]" => "${EXECUTION_ID:undefined}" | ||
"[@metadata][environment]" => "${ENVIRONMENT_NAME:undefined}" | ||
"[@metadata][testname]" => "${TEST_NAME:undefined}" | ||
"[@metadata][testtags]" => "${TEST_TAGS:undefined}" | ||
"[@metadata][dropmessage]" => "${PARSE_REMOVE_MESSAGE_FIELD:true}" | ||
"[@metadata][cleanup]" => "${PARSE_CLEANUP_FIELDS:true}" | ||
"[@metadata][transaction_regex]" => "${PARSE_TRANSACTION_REGEX:_.+_}" | ||
"[@metadata][transaction_auto]" => "${PARSE_TRANSACTION_AUTO:true}" | ||
"[@metadata][filter_include_sampler_regex]" => "${PARSE_FILTER_INCLUDE_SAMPLER_REGEX:}" | ||
"[@metadata][filter_exclude_sampler_regex]" => "${PARSE_FILTER_EXCLUDE_SAMPLER_REGEX:}" | ||
"[@metadata][remove_transaction]" => "${PARSE_REMOVE_TRANSACTION:false}" | ||
"[@metadata][remove_sampler]" => "${PARSE_REMOVE_SAMPLER:false}" | ||
"[@metadata][with_subresult]" => "${PARSE_WITH_FLAG_SUBRESULT:true}" | ||
"[@metadata][metadata]" => "${TEST_METADATA:undefined}" | ||
"[@metadata][standalone]" => "${STANDALONE:false}" | ||
|
||
} | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
filter { | ||
if [origin] == "jtl" { | ||
|
||
csv { | ||
autodetect_column_names => true | ||
separator => "${CSV_SEPARATOR:,}" | ||
convert => { | ||
"Connect" => "integer" | ||
"bytes" => "integer" | ||
"IdleTime" => "integer" | ||
"Latency" => "integer" | ||
"sentBytes" => "integer" | ||
"elapsed" => "integer" | ||
"allThreads" => "integer" | ||
"grpThreads" => "integer" | ||
"success" => "boolean" | ||
"SampleCount" => "integer" | ||
"ErrorCount" => "integer" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
filter { | ||
if [origin] == "jtl" { | ||
|
||
#parse Transaction | ||
if [responseCode] =~ /^[0-9]+$/ { | ||
mutate { | ||
copy => { | ||
"responseCode" => "responseStatus" | ||
} | ||
} | ||
} | ||
else { | ||
mutate { | ||
add_field => [ "responseStatus", "${MISSED_RESPONSE_CODE:510}" ] | ||
|
||
} | ||
} | ||
|
||
mutate { | ||
convert => { | ||
"responseStatus" => "integer" | ||
} | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
filter { | ||
|
||
if [origin] == "jtl" { | ||
#parse Transaction | ||
|
||
ruby { | ||
code => " | ||
regex = event.get('[@metadata][transaction_regex]') | ||
if (regex.to_java().isEmpty() ) | ||
event.set('transaction', 'false') | ||
else | ||
patern = java::util::regex::Pattern.compile(regex) | ||
if patern.match(event.get('label')) | ||
event.set('transaction', 'true') | ||
else | ||
event.set('transaction', 'false') | ||
end | ||
end | ||
" | ||
tag_on_exception => "_rubyexception_transaction" | ||
} | ||
|
||
if [@metadata][transaction_auto] == "true" { | ||
if [URL] == "null" { | ||
if [responseMessage] =~ /^Number of samples in transaction (.)+/ { | ||
mutate { | ||
replace => { | ||
"transaction" => "true" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
if [transaction] == "true" { | ||
|
||
if [@metadata][remove_transaction] == "false" { | ||
#parse transaction Message | ||
if [responseMessage] { | ||
|
||
grok { | ||
match => { | ||
"responseMessage" => ['\ANumber of samples in transaction : %{INT:transactionTotalSampler}, number of failing samples : %{INT:transactionFailingSampler}\Z'] | ||
} | ||
tag_on_failure => ["_grokparsefailure","_grokparsefailure_Transaction"] | ||
|
||
} | ||
|
||
mutate { | ||
convert => { | ||
"transactionTotalSampler" => "integer" | ||
"transactionFailingSampler" => "integer" | ||
} | ||
} | ||
|
||
} | ||
} | ||
else { | ||
drop { | ||
} | ||
} | ||
} | ||
else { | ||
if [@metadata][remove_sampler] != "false" { | ||
drop { | ||
} | ||
} | ||
} | ||
|
||
|
||
mutate { | ||
convert => { | ||
"transaction" => "boolean" | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.