These docs are for Cribl Stream 4.4 and are no longer actively maintained.
See the latest version (4.11).
Cribl TCP
The Cribl TCP Source receives data from a Cribl TCP Destination in the same Distributed deployment, including Cribl.Cloud, at no charge. It’s common to send data from Edge and Stream within the same deployment using a Cribl TCP Destination and Cribl TCP Source pair.
The Cribl TCP Source is available only in Distributed deployments. In single‑instance mode or for testing, you can substitute it with the TCP JSON Source. However, this substitution will not facilitate sending all internal fields, as described below.
Type: Internal | TLS Support: YES | Event Breaker Support: No
You might choose this Source over the Cribl HTTP Source in certain circumstances, such as when a firewall or proxy allows TCP traffic.
How It Works
You can use the Cribl TCP Source to transfer data between Workers. If the Cribl TCP Source receives data from its Cribl TCP Destination counterpart on another Worker, you’re billed for ingress only once – when Cribl first receives the data. All data subsequently transferred to other Workers via a Cribl TCP Destination/Source pair is not charged.
This use case is common in hybrid Cribl.Cloud deployments, where a customer-managed (on-prem) Node sends data to a Worker in Cribl.Cloud for additional processing and routing to Destinations. However, the Cribl TCP Destination/Source pair can similarly reduce your metered data ingress in other scenarios, such as on-prem Edge to on-prem Stream.
As one usage example, assume that you want to send data from one Node deployed on-prem, to another that is deployed in Cribl.Cloud. You could do the following:
- Create an on-prem File System Collector (or whatever Collector or Source is suitable) for the data you want to send to Cribl.Cloud.
- Create an on-prem Cribl TCP Destination.
- Create a Cribl TCP Source, on the target Stream Worker Group or Edge Fleet in Cribl.Cloud.
- For an on-prem Node, configure a File System Collector to send data to the Cribl TCP Destination, and from there to the Cribl TCP Source in Cribl.Cloud.
- On Cribl-managed Cribl.Cloud Nodes, make sure that TLS is either disabled on both the Cribl TCP Destination and the Cribl TCP Source it’s sending data to, or enabled on both. Otherwise, no data will flow. On Cribl.Cloud instances, the Cribl TCP Source ships with TLS enabled by default.
Configuration Requirements
The key points about configuring this architecture are:
- The Cribl TCP Destination must be on a Node that is connected to the same Leader as the Cribl TCP Source.
- When you configure the Cribl TCP Destination, its Address and Port values must point to the Address and Port you’ve configured on the Cribl TCP Source.
- Cribl 3.5.4 was a breakpoint in Cribl TCP Leader/Worker communications. Nodes running the Cribl TCP Source on Cribl 3.5.4 and later can send data only to Nodes running v.3.5.4 and later. Nodes running the Cribl TCP Source on Cribl 3.5.3 and earlier can send data only to Nodes running v.3.5.3 and earlier.
Configuring the Cribl TCP Source
From the top nav, click Manage, then select a Worker Group to configure. Next, you have two options:
To configure via the graphical QuickConnect UI, click Routing > QuickConnect (Stream) or Collect (Edge). Next, click Add Source at left. From the resulting drawer’s tiles, select [System and Internal >] Cribl TCP. Next, click either Add Destination or (if displayed) Select Existing. The resulting drawer will provide the options below.
Or, to configure via the Routing UI, click Data > Sources (Stream) or More > Sources (Edge). From the resulting page’s tiles or left nav, select [System and Internal >] Cribl TCP. Next, click New Source to open a New Source modal that provides the options below.
General Settings
Input ID: Enter a unique name to identify this Cribl TCP Source definition.
Address: Enter hostname/IP to listen for TCP JSON data. E.g., localhost
or 0.0.0.0
.
Port: Enter the port number to listen on, e.g., 10300
.
Additional Settings
Tags: Optionally, add tags that you can use for filtering and grouping in the Cribl Stream UI. Use a tab or hard return between (arbitrary) tag names. These tags aren’t added to processed events.
TLS Settings (Server Side)
Enabled defaults to No
. When toggled to Yes
:
Certificate name: Name of the predefined certificate.
Private key path: Server path containing the private key (in PEM format) to use. Path can reference $ENV_VARS
.
Passphrase: Passphrase to use to decrypt private key.
Certificate path: Server path containing certificates (in PEM format) to use. Path can reference $ENV_VARS
.
CA certificate path: Server path containing CA certificates (in PEM format) to use. Path can reference $ENV_VARS
.
Authenticate client (mutual auth): Require clients to present their certificates. Used to perform mutual authentication using SSL certs. Defaults to No
. When toggled to Yes
:
Validate client certs: Reject certificates that are not authorized by a CA in the CA certificate path, or by another trusted CA (e.g., the system’s CA). Defaults to
No
.Common name: Regex matching subject common names in peer certificates allowed to connect. Defaults to
.*
. Matches on the substring afterCN=
. As needed, escape regex tokens to match literal characters. E.g., to match the subjectCN=worker.cribl.local
, you would enter:worker\.cribl\.local
.
Minimum TLS version: Optionally, select the minimum TLS version to accept from connections.
Maximum TLS version: Optionally, select the maximum TLS version to accept from connections.
Persistent Queue Settings
Enable Persistent Queue defaults to No
. When toggled to Yes
:
Mode: Choose a mode from the drop-down:
- With
Smart
mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. - With
Always On
mode, PQ will always write events directly to the queue before forwarding them to the processing engine.
Max buffer size: Maximum number of events to hold in memory before dumping them to disk. Defaults to 1000
.
Commit frequency: Number of events to send before committing that Cribl Stream has read them. Defaults to 42
.
Max file size: The maximum data volume to store in each queue file before closing it. Enter a numeral with units of KB, MB, etc. Defaults to 1 MB
.
Max queue size: The maximum amount of disk space the queue is allowed to consume. Once this limit is reached, Cribl Stream stops queueing and applies the fallback Queue‑full behavior. Enter a numeral with units of KB, MB, etc.
Queue file path: The location for the persistent queue files. Defaults to $CRIBL_HOME/state/queues
. To this value, Cribl Stream will append /<worker‑id>/<output‑id>
.
Compression: Codec to use to compress the persisted data, once a file is closed. Defaults to None
; Gzip
is also available.
Processing Settings
Fields
In this section, you can add Fields to each event, using Eval-like functionality.
Name: Field name.
Value: JavaScript expression to compute field’s value, enclosed in quotes or backticks. (Can evaluate to a constant.)
Pre–Processing
In this section’s Pipeline drop-down list, you can select a single existing Pipeline to process data from this input before the data is sent through the Routes.
Connected Destinations
Select Send to Routes to enable conditional routing, filtering, and cloning of this Source’s data via the Routing table.
Select QuickConnect to send this Source’s data to one or more Destinations via independent, direct connections.
Internal Fields
Cribl Stream uses a set of internal fields to assist in handling of data. These “meta” fields are not part of an event, but they are accessible, and Functions can use them to make processing decisions.
The Cribl TCP Source (and the Cribl HTTP Source) treat internal fields differently than other Sources do. That’s because of the difference in the way that incoming data originates.
Other Sources ingest data that’s not coming from Cribl Edge or Stream, meaning that no Cribl internal fields can be present in that data when it arrives at the Source, and the Source is free to add internal fields without clobbering (overwriting) anything that existed already.
By contrast, the Cribl TCP Source and the Cribl HTTP Source ingest data that’s coming from a Cribl TCP or Cribl HTTP Destination. That data can contain internal fields when it arrives at the Source. This means that if the Source adds internal fields, those could potentially clobber what existed before.
To avoid this problem, the Cribl TCP Source and the Cribl HTTP Source add a unique __forwardedAttrs
(i.e., “forwarded attributes”) field. The nested structure of the __forwardedAttrs
field contains any of the following fields that are present in the arriving data:
Internal Fields |
---|
__srcIpPort |
__inputId |
__outputId |
Other Fields |
---|
cribl_breaker |
cribl_pipe |
These fields are copied into __forwardedAttrs
, not moved there. As the data (apart from __forwardedAttrs
) moves through the Source and any Pipelines, the values of these fields can be overwritten. But the copies of these fields in __forwardedAttrs
remain unchanged, so you can retrieve them as necessary.