Skip to content

Commit

Permalink
Fixes issue where log entries were having their dates parsed incorrec…
Browse files Browse the repository at this point in the history
…tly, causing errors in the ES index, this was causing out-of-date entries to appear in process log UI.
  • Loading branch information
jdrodjpl committed Jul 30, 2024
1 parent f5c3c6c commit 610976f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 34 deletions.
14 changes: 2 additions & 12 deletions install/cws-ui/history.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1011,18 +1011,8 @@
console.error("Error getting instance JSON: " + xhr.responseText);
});
logLines.sort(function(a, b) {
var aTemp = a[0];
//if there is a space in the last char, remove it
if (aTemp.charAt(aTemp.length - 1) == " ") {
aTemp = aTemp.substring(0, aTemp.length - 1);
}
var bTemp = b[0];
//if there is a space in the last char, remove it
if (bTemp.charAt(bTemp.length - 1) == " ") {
bTemp = bTemp.substring(0, bTemp.length - 1);
}
var aDate = moment(aTemp);
var bDate = moment(bTemp);
var aDate = moment(a[0].trim());
var bDate = moment(b[0].trim());
if (aDate.isBefore(bDate)) return -1;
if (bDate.isBefore(aDate)) return 1;
return 0;
Expand Down
8 changes: 1 addition & 7 deletions install/docker/console-db-es-ls-kibana/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ filter {
]
}

date {
match => [ "logdate", "yyyy-MM-dd HH:mm:ss,SSS" ]
timezone => "UTC"
locale => en
remove_field => [ "logdate" ]
}


if [logLevel] == "WARNING" {
mutate {
update => { "logLevel" => "WARN" }
Expand Down
11 changes: 3 additions & 8 deletions install/docker/worker-ls/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@ filter {
"message", '%{GREEDYDATA:msgBody}'
]
}

date {
match => [ "logdate", "yyyy-MM-dd HH:mm:ss,SSS" ]
timezone => "UTC"
locale => en
remove_field => [ "logdate" ]
}




if [logLevel] == "WARNING" {
mutate {
update => { "logLevel" => "WARN" }
Expand Down
9 changes: 2 additions & 7 deletions install/logging/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ filter {
]
}

date {
match => [ "logdate", "yyyy-MM-dd HH:mm:ss,SSS" ]
timezone => "UTC"
locale => en
remove_field => [ "logdate" ]
}



if [logLevel] == "WARNING" {
mutate {
update => { "logLevel" => "WARN" }
Expand Down

0 comments on commit 610976f

Please sign in to comment.