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 24, 2024
1 parent f5c3c6c commit 5f2cc37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 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
2 changes: 1 addition & 1 deletion install/docker/console-db-es-ls-kibana/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ filter {
}

date {
match => [ "logdate", "yyyy-MM-dd HH:mm:ss,SSS" ]
match => [ "logdate", "ISO8601" ]
timezone => "UTC"
locale => en
remove_field => [ "logdate" ]
Expand Down
2 changes: 1 addition & 1 deletion install/docker/worker-ls/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ filter {
}

date {
match => [ "logdate", "yyyy-MM-dd HH:mm:ss,SSS" ]
match => [ "logdate", "ISO8601" ]
timezone => "UTC"
locale => en
remove_field => [ "logdate" ]
Expand Down
2 changes: 1 addition & 1 deletion install/logging/cws-logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ filter {
}

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

0 comments on commit 5f2cc37

Please sign in to comment.