System socket dataset
editSystem socket dataset
editThis functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
This is the socket
dataset of the system module.
Implementation
editIt is implemented for Linux only.
On Linux, the dataset uses the
sock_diag netlink subsystem
to periodically receive a list of all sockets from the kernel. The polling frequency
can be set using the period
configuration option. A low value (e.g. 1s
) is
recommended to capture short-lived sockets.
By default, sockets from or to localhost
will be excluded. This can be controlled using
the socket.include_localhost
configuration option.
Example dashboard
editThe dataset comes with a sample dashboard:
Fields
editFor a description of each field in the dataset, see the exported fields section.
Here is an example document generated by this dataset:
{ "@timestamp": "2017-10-12T08:05:34.853Z", "destination": { "ip": "10.0.2.15", "port": 22 }, "event": { "action": "socket_closed", "dataset": "socket", "kind": "event", "module": "system" }, "message": "Inbound socket (10.0.2.2:55270 -\u003e 10.0.2.15:22) CLOSED by process sshd (PID: 22799) and user root (UID: 0)", "network": { "community_id": "1:IXrg9Y06W7zrkqBlE30jpC/mzjo=", "direction": "inbound", "transport": "tcp", "type": "ipv4" }, "process": { "name": "sshd", "pid": 22799 }, "service": { "type": "system" }, "socket": { "entity_id": "fIj66YRoGyoe8dML" }, "source": { "ip": "10.0.2.2", "port": 55270 }, "user": { "id": 0, "name": "root" } }