On This Page

Home / Stream/ Integrations/ Sources/LiteLLM Source

LiteLLM Source ​

The LiteLLM Source receives LiteLLM generic API logger data on the Cribl HTTP bulk endpoint. LiteLLM can send a JSON array or NDJSON.

Type: Push | TLS Support: Yes | Event Breaker Support: No

This Source supports gzip-compressed inbound data when the Content-Encoding: gzip connection header is set.

Configure a LiteLLM Source ​

  1. On the top bar, select Products, and then select Cribl Stream. Under Worker Groups, select a Worker Group. Next, you have two options:
    • To configure via QuickConnect, navigate to Routing > QuickConnect. Select Add Source and select LiteLLM from the list, choosing either Select Existing or Add New.
    • To configure via the Routes, select Data > Sources. Select LiteLLM. Next, select Add Source.
  2. In the New Source modal, configure the following under General Settings:
    • Input ID: Enter a unique name to identify this LiteLLM Source definition. If you clone this Source, Cribl Stream adds -CLONE to the original Input ID.
    • Description: Optionally, enter a description.
    • Address: Enter the hostname or IP address on which to listen. Defaults to 0.0.0.0.
    • Port: Enter the port number on which to listen.
    • Cribl HTTP event API: Enter the absolute path on which to listen for LiteLLM generic API logger requests. The path must start with / and defaults to /cribl. Cribl Stream appends /_bulk to the path you enter. Set the LiteLLM generic API logger to http(s)://<host>:<port><path>/_bulk. For example, http(s)://<host>:<port>/cribl/_bulk.
    • Optional Settings:
      • Tags: Metadata tags used for categorization and filtering in the Cribl Stream UI. These tags aren’t added to processed events. Use a tab or hard return between tag names.
  3. Optionally, you can adjust the Authentication, TLS, Persistent Queue, Processing, and Advanced settings, or Connected Destinations outlined in the sections below.
  4. Select Save, then Commit & Deploy.

TLS Settings (Server Side) ​

Enabled: Toggle on to enable Transport Layer Security (TLS) on this connection. Defaults to toggled off. When toggled on, configure the following settings.

Under Server Certificate, select a certificate from the store to auto-fill the paths, or enter them manually:

  • Certificate: Select an existing certificate name from the drop-down or add a new certificate by selecting Create. See adding a certificate on a Worker Group for details.
  • Certificate path: Enter the server path that contains certificates in Privacy Enhanced Mail (PEM) format. You can reference $ENV_VARS.
  • Private key path: Enter the server path that contains the private key in PEM format. You can reference $ENV_VARS.
  • Passphrase: Enter the passphrase used to decrypt the private key.

Under Mutual Authentication (mTLS):

  • Authenticate client (mutual auth): Toggle on to require clients to present certificates. Defaults to toggled off. When toggled on, configure these settings:
    • Trusted client CA path: Enter the server path that contains the certificate authority (CA) certificates to trust as the chain root when verifying a client’s identity.
    • Validate client certificates: Toggle on to reject certificates that aren’t authorized by a CA in the Trusted client CA path or by another trusted CA. Defaults to toggled on.
    • Common name: Enter a regex to match against the CN and SAN fields in the client certificate. Cribl Stream rejects clients unless it finds at least one match. Defaults to /.*/.

Under TLS Version, reject clients using TLS versions below or above these thresholds:

  • Minimum TLS version: Select the minimum TLS version to accept.
  • Maximum TLS version: Select the maximum TLS version to accept.

Authentication ​

Auth tokens: Select Add Token to add a token. If you add no tokens, unauthorized access is permitted.

Authentication method: Defaults to Secret.

  • Secret: Select a stored text secret, or select Create text secret.
  • Manual: Token appears. Enter the shared secret, or select Generate. Clients send it as Authorization: <token>.

Description: Optionally, enter a description.

Fields: Fields to add to events that use this token. Each field is a Name/Value pair. Value is a JavaScript expression, enclosed in quotes or backticks.

Persistent Queue Settings ​

In the Persistent Queue Settings tab, you can optionally specify persistent queue storage, using the following controls. Persistent queue buffers and preserves incoming events when a downstream Destination has an outage or experiences backpressure.

Before enabling persistent queue, learn more about persistent queue behavior and how to optimize it with your system:

On Cribl-managed Cloud Workers (with an Enterprise plan), this tab exposes only the Enable persistent queue toggle. If enabled, PQ is automatically configured in Always On mode, with a maximum queue size of 1 GB disk space allocated per PQ-enabled Source, per Worker Process.

The 1 GB limit is on uncompressed inbound data, and the queue does not perform any compression. This limit is not configurable. For configurable queue size, compression, mode, and other options below, use a hybrid Group.

All other settings described in this section apply to on-prem and hybrid deployments only.

Enable persistent queue: Default is toggled off. When toggled on:

Mode: Select a condition for engaging persistent queues.

  • Always On: This default option will always write events to the persistent queue, before forwarding them to the Cribl Stream data processing engine.
  • Smart: This option will engage PQ only when the Source detects backpressure from the Cribl Stream data processing engine. Smart mode only engages when necessary, such as when a downstream Destination becomes blocked and the Buffer size limit reaches its limit. When persistent queue is set to Smart mode, Cribl Stream attempts to flush the queue when every new event arrives. The only time events stay in the buffer is when a downstream Destination becomes blocked.

Deprecation Notice

To improve data integrity, Smart mode is deprecated for Source persistent queue on hybrid and on-prem deployments. In January 2027, affected configurations will automatically migrate to Always On mode. Consider updating existing configurations to Always On mode prior to the automatic migration date. Before changing the configuration:

Buffer size limit (bytes): The maximum memory to buffer events before flushing them to persistent queue on disk. Enter a value with a unit suffix. For example: 64KB, 1MB, or 10MB. Spaces between the number and unit are allowed (such as 64 KB). Units are case-insensitive. Plain byte values (like 65536) are accepted, but decimals (like 0.5MB) are not. The valid range is 64KB to 10MB. Values outside this range are rounded to the nearest limit. Defaults to 1MB.

Deprecation Notice

The Buffer size limit (bytes) setting replaces the deprecated Buffer size limit (events) setting as of version 4.18.0 to provide more predictable memory management. For upgraded Worker Groups and Fleets, the new byte-based limit defaults to 1MB. Update your configurations to use the byte-based limit to ensure optimal memory stability.

Commit frequency: The number of events to send downstream before committing that Cribl Stream has read them. Defaults to 42.

File size limit: The maximum data volume to store in each queue file before closing it and (optionally) applying the configured Compression. Enter a numeral with units of KB, MB, and so on. If not specified, Cribl Stream applies the default 10 MB. When you save the configuration, File size limit must be greater than or equal to Buffer size limit (bytes). Cribl Stream rejects invalid combinations.

Queue size limit: The maximum amount of disk space that the queue is allowed to consume on each Worker Process. Once this limit is reached, this Source stops queueing data and applies the Queue-full behavior. Required, and defaults to 5 GB. Accepts positive numbers with units of KB, MB, GB, and so on. Can be set as high as 1 TB, unless you’ve configured a different Worker Process PQ size limit in Group or Fleet settings.

Queue file path: The location for the persistent queue files. Defaults to $CRIBL_HOME/state/queues. To this field’s specified path, Cribl Stream appends /<worker-id>/inputs/<input-id>.

Compression: Optional codec to compress the persisted data after a file closes. Defaults to None; Gzip is also available.

Queue-full behavior: Whether to block or drop events when the queue begins to exert backpressure. A queue begins to exert backpressure when the disk is low or at full capacity.

  • Block (Default): Does not accept new data until the queue has capacity. When the sender supports backpressure signaling, Cribl Stream returns block signals to the sender.
  • Drop new data: Discards incoming events while leaving the contents of the persistent queue unchanged.

In Cribl Stream 4.1 and newer, the Source persistent queue default Mode is Always on, to best ensure events’ delivery. For details on optimizing this selection, see Optimize Source Persistent Queues.

You can optimize Workers’ startup connections and CPU load at Group/Fleet settings > Worker Processes.

Processing Settings ​

Fields ​

In this section, you can define new fields or modify existing ones using JavaScript expressions, similar to the Eval function.

  • The Field Name can either be a new field (unique within the event) or an existing field name to modify its value.
  • The Value is a JavaScript expression (enclosed in quotes or backticks) to compute the field’s value (can be a constant). Select this field’s advanced mode icon (far right) if you’d like to open a modal where you can work with sample data and iterate on results.

This flexibility means you can:

  • Add new fields to enrich the event.
  • Modify existing fields by overwriting their values.
  • Compute logic or transformations using JavaScript expressions.

Pre-Processing ​

Auto parse: Toggle on to detect each event’s Datatype and extract top-level fields from _raw before Source Fields and before the pre-processing Pipeline or Pack. The toggle is off by default. Because Fields runs after automatic parsing, values you add there take precedence over same-named fields extracted from _raw. For Datatypes that automatic parsing can detect, see the List of Stock v2 Datatypes. For field behavior, prevention of duplicate parsing, and performance considerations, see Automatic Parsing.

Pipeline: Select an existing Pipeline or Pack to process data from this Source before routing.

Advanced Settings ​

Health check endpoint: Toggle on to enable a health check endpoint specific to this Source, http(s)://<host>:<port>/cribl_health. A 200 HTTP response code is returned when the Source is healthy.

Capture request headers: Toggle on to add request headers to events, in the __headers field.

Active request limit: Maximum number of active requests allowed for this Source, per Worker Process. Defaults to 256. Enter 0 for unlimited. This setting is hidden on Cribl.Cloud.

Activity log sample rate: How often request activity is logged at the info level. The default 100 logs every 100th request. A value of 1 logs every request.

Requests-per-socket limit: Maximum number of requests Cribl Stream allows on one socket before it instructs the client to close the connection. Defaults to 0 (unlimited).

Socket timeout (seconds): How long Cribl Stream waits before assuming that an inactive socket has timed out. The default 0 waits forever.

Request timeout (seconds): How long to wait for an incoming request to complete before aborting it. The default 0 waits indefinitely. An expired request can return HTTP 408. The LiteLLM generic API logger does not retry HTTP 4xx responses, so setting this timeout can cause a log batch to be lost.

Keep-alive timeout (seconds): After the last response is sent, Cribl Stream waits this long for additional data before closing the socket. Defaults to 5 seconds. Minimum 1. Maximum 600.

IP allowlist regex: Requests from IP addresses that match this pattern are processed, unless the denylist also matches them. Defaults to /.*/.

IP denylist regex: Requests from IP addresses that match this pattern are ignored. The denylist takes precedence over the allowlist. Defaults to /^$/.

Environment: If you’re using GitOps, optionally use this field to specify a single Git branch on which to enable this configuration. If empty, the configuration is enabled everywhere.

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 data for this Source.

Fields for this Source:

  • __srcIpPort: Identifies the client socket.
  • __headers: Request headers. Present when Capture request headers is toggled on.

Troubleshooting ​

The Source’s configuration modal has helpful tabs for troubleshooting:

Live Data: Try capturing live data to see real-time events as they are ingested. On the Live Data tab, click Start Capture to begin viewing real-time data.

Logs: Review and search the logs that provide detailed information about the ingestion process, including any errors or warnings that may have occurred.

You can also view the Monitoring page that provides a comprehensive overview of data volume and rate, helping you identify ingestion issues. Analyze the graphs showing events and bytes in/out over time.