@@ -18,6 +18,36 @@ 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
+ required : false
49
+ type : string : default : " "
50
+ }
21
51
decoding : {
22
52
description : " Configures how events are decoded from raw bytes. "
23
53
required : false
@@ -236,6 +266,23 @@ base: components: sources: socket: configuration: {
236
266
required : false
237
267
type : string : default : " host "
238
268
}
269
+ inode_key : {
270
+ description : """
271
+ If set, output events will contain the device & inode number of the
272
+ socket under this key. For stream sockets, this will be a unique
273
+ identifier of each incoming connection; for datagram sockets, this
274
+ will be the same value for every incoming message (but can uniquely
275
+ identify this source).
276
+
277
+ The key will be set with an object containing `"dev"` and `"ino"` keys
278
+ representing the device & inode number of the socket.
279
+
280
+ By default, this key is not emitted. Set to `""` to explicitly suppress
281
+ this key.
282
+ """
283
+ required : false
284
+ type : string : default : " "
285
+ }
239
286
keepalive : {
240
287
description : " TCP keepalive settings for socket-based components. "
241
288
relevant_when : " mode = \" tcp\" "
0 commit comments