JSFiddle - React, Tailwind, and code Playground

by Alexey Demin

HTML

<!--
Время (01/11/1990:13:26:00);
Устройство (1234SERVER1);
Событие (TCP CONN_TERMINATE/TCP CONN_DELINK/SSLLOG SSL_HANDSHAKE_SUCCESS);
Source и Destination IP:Port (Source 1.1.1.1:8888 - Destination 1.1.1.2:9999);
Еще раз Время (Start Time 01/11/1990:13:25:18 GMT - End Time 01/11/1990:13:26:00 - но не обязательно)
-->

JavaScript

console.clear();
var lines = ["<134> 01/11/1990:13:26:00 GMT 1234SERVER1 0-PPE-0 : default TCP CONN_TERMINATE 23168132 0 :  Source 1.1.1.1:8888 - Destination 1.1.1.2:9999 - Start Time 01/11/1990:13:25:18 GMT - End Time 01/11/1990:13:26:00 GMT - Total_bytes_send 1 - Total_bytes_recv 1",
"<134> 01/11/1990:13:26:00 GMT 1234SERVER1 0-PPE-0 : default TCP CONN_DELINK 23168133 0 :  Source 1.1.1.4:8888 - Vserver 1.1.1.6:22 - NatIP 1.1.1.5:60002 - Destination 10.1.1.9:22 - Delink Time 01/11/1990:13:26:00 GMT - Total_bytes_send 2334 - Total_bytes_recv 3174",
"<135> 01/11/1990:13:26:03 GMT 1234SERVER1 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUCCESS 23168136 0 :  SPCBId 2592498 - ClientIP 192.168.121.132 - ClientPort 56468 - VserverServiceIP 1.1.1.12 - VserverServicePort 443 - ClientVersion TLSv1.2 - CipherSuite \"AES-256-CBC-SHA TLSv1.2 Non-Export 256-bit\" - Session New"];
for(var i = 0, res = []; i < lines.length; i++){
  var parts = lines[i].split(" ");
  console.log(parts);
  res[i] = {
    date: parts[1] + " " + parts[2],
    device: parts[3],
    event: parts[7] + " " + parts[8],
    source: parts[14],
    destination: parts[17]
  };
}
console.log(res);