Hello,
I try to import Log Data from ELK which are in the ELASTIC COMMON SCHEMA - ECS
(Overview | Elastic Common Schema (ECS) Reference [8.6] | Elastic)
The aim of this work is a connected Graph (timebased) which shows the single events of a "Log Story". A log story is a single user activity which produces many events but this events are in ECS not connected. A simple seassion in my lab produces with an NGINX (as Reverseproxy) + Guacamole (as Remote Web Admin Console) + other linux systems many log events an I try to map these Events together.
On a top Level View of 1(!) requested EVENT I got an nested JSON like this:
{
"_type": "_doc",
"_source": {
"server": {
"port": 80,
"packets": 7,
"bytes": 1044,
"ip": "192.168.178.73"
},
"process": {
"name": "nginx",
"args": [
"nginx: worker process"
],
"pid": 1698,
"executable": "/usr/sbin/nginx",
"created": "2019-11-11T06:22:49.830Z"
},
"agent": {
"hostname": "nginx",
"id": "28cfb698-1aac-482f-8931-35f3c10c526c",
"type": "auditbeat",
"ephemeral_id": "315d5cdd-f403-4ee4-9907-3707c4bf54dd",
"version": "7.4.2"
},
"destination": {
"port": 80,
"packets": 7,
"bytes": 1044,
"ip": "192.168.178.73"
},
"source": {
"port": 19149,
"packets": 6,
"bytes": 326,
"ip": "x.x.x.x"
},
"network": {
"community_id": "1:1PtDDQARII2dPRid/1LS1AlerUc=",
"transport": "tcp",
"type": "ipv4",
"bytes": 1370,
"packets": 13,
"direction": "inbound"
},
"@timestamp": "2019-11-20T00:07:29.410Z",
"system": {
"audit": {
"socket": {
"uid": 33,
"egid": 33,
"internal_version": "1.0.3",
"gid": 33,
"euid": 33,
"kernel_sock_address": "0xffff9464e0fce800"
}
}
},
"ecs": {
"version": "1.1.0"
},
"service": {
"type": "system"
},
"host": {
"name": "nginx",
"hostname": "nginx",
"id": "c9250b1f6acb405da67881552d455ee4",
"os": {
"name": "Ubuntu",
"family": "debian",
"version": "18.04.3 LTS (Bionic Beaver)",
"kernel": "4.15.0-66-generic",
"platform": "ubuntu",
"codename": "bionic"
},
"architecture": "x86_64",
"containerized": false
},
"client": {
"port": 19149,
"packets": 6,
"bytes": 326,
"ip": "x.x.x.x"
},
"event": {
"duration": 5287690744,
"kind": "event",
"module": "system",
"start": "2019-11-20T00:07:22.087Z",
"action": "network_flow",
"end": "2019-11-20T00:07:27.374Z",
"category": "network_traffic",
"dataset": "socket"
},
"user": {
"name": "www-data",
"id": "33"
},
"flow": {
"final": true,
"complete": true
},
"group": {
"name": "www-data",
"id": "33"
}
},
"_id": "Xw0ihm4B7Iy8Ibw1rz9s",
"_index": "auditbeat-7.4.2-2019.11.18-000001",
"_score": 1.0
}
This Event should be merged with the next Events.
Today I read the following to nested JSON (Read nested json) - ECS Events are nested and I need to connect one ECS Event to another.
Is there any solution to connect the ECS events or is there a better way to get a connection between these events?
Greetings
Sebastian