@@ -18,6 +18,34 @@ base: components: sources: socket: configuration: {
18
18
required : false
19
19
type : uint : unit : " connections "
20
20
}
21
+ credentials_key : {
22
+ description : """
23
+ If set, on a stream socket, output events will contain information about
24
+ the UID/GID/PID of the process which connected to the socket. Note that
25
+ this information is subject to some race conditions and is not available
26
+ in all circumstances:
27
+
28
+ * If a process exits after connecting, and passes the socket on to a different
29
+ process, (e.g. a child), the pid might now refer to a different process
30
+ (or, on some platforms, might not be returned at all)
31
+ * If a process connects to this socket source, writes data, and immediately
32
+ disconnects, it's possible Vector won't query the peer credentials before
33
+ the other process disconnects; in this case, the data won't be available
34
+ on some platforms.
35
+
36
+ Vector configurations should be prepared for this information to be absent,
37
+ incorrect, or only partially present; it's a best-guess only.
38
+
39
+ Peer credential information cannot currently be collected for datagram sockets,
40
+ and setting this key will simply produce a null object.
41
+
42
+ The key will be set with an object containing `"uid"`, `"gid"`, and `"pid"`
43
+ keys, or `null` if the information was not available.
44
+
45
+ By default, this key is not emitted. Set to `""` to explicitly suppress
46
+ this key.
47
+ """
48
+ }
21
49
decoding : {
22
50
description : " Configures how events are decoded from raw bytes. "
23
51
required : false
@@ -236,6 +264,23 @@ base: components: sources: socket: configuration: {
236
264
required : false
237
265
type : string : default : " host "
238
266
}
267
+ inode_key : {
268
+ description : """
269
+ If set, output events will contain the device & inode number of the
270
+ socket under this key. For stream sockets, this will be a unique
271
+ identifier of each incoming connection; for datagram sockets, this
272
+ will be the same value for every incoming message (but can uniquely
273
+ identify this source).
274
+
275
+ The key will be set with an object containing `"dev"` and `"ino"` keys
276
+ representing the device & inode number of the socket.
277
+
278
+ By default, this key is not emitted. Set to `""` to explicitly suppress
279
+ this key.
280
+ """
281
+ required : false
282
+ type : string : default : " "
283
+ }
239
284
keepalive : {
240
285
description : " TCP keepalive settings for socket-based components. "
241
286
relevant_when : " mode = \" tcp\" "
0 commit comments