Cribl Docs – Global llms-full.txt (Full Text for AI Agents) This file is an automatically generated concatenation of all public Cribl documentation in Markdown form. It is intended for bulk ingestion by AI agents, MCP servers, and embedding/semantic search pipelines. It is not curated, and it is not optimized for initial discovery or human reading. For global indexes and product-scoped ingestion options, see: - Global index (llms.txt, auto-generated, not curated): https://docs.cribl.io/llms.txt - Per-doc-set page indexes (llms.txt under each area, e.g. Stream): https://docs.cribl.io/stream/llms.txt - Per-doc-set llms-full.txt files (for product-scoped ingestion), for example: - https://docs.cribl.io/stream/llms-full.txt - https://docs.cribl.io/edge/llms-full.txt - https://docs.cribl.io/search/llms-full.txt - https://docs.cribl.io/lake/llms-full.txt - https://docs.cribl.io/insights/llms-full.txt - https://docs.cribl.io/copilot/llms-full.txt - https://docs.cribl.io/apps/llms-full.txt - https://docs.cribl.io/cribl-as-code/llms-full.txt - https://docs.cribl.io/guard/llms-full.txt ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/cribl-as-code-concepts.md ############################################################ # Basic Concepts for Cribl as Code This page introduces basic Cribl concepts to provide context for Cribl as Code. For detailed information about these concepts and other Cribl resources and features, refer to the [Cribl product documentation](https://docs.cribl.io). ## Control Plane and Management Plane {#control-mgmt} Cribl distinguishes in-deployment product configuration (the control plane) from administration (the management plane). The control plane is supported in every [deployment model](#deployment-models): Cribl.Cloud, hybrid, and on-prem. The management plane is supported only in Cribl.Cloud. It is not supported for deployments that do not use Cribl.Cloud, including standalone on-prem Leaders and other fully self-hosted topologies. * Use the control plane to manage product resources, such as Worker Groups and Edge Fleets, Sources, Destinations, Pipelines, Cribl Search Datasets, and Cribl Lake storage. * Use the management plane for orchestration and administrative tasks for Organizations, Workspaces, and billing in Cribl.Cloud. For a complete description of Cribl architecture, see [The Cribl Three-Plane Model](/reference-architectures/core-arch-concepts/). ## Deployment Models (Cribl.Cloud, On-Prem, and Hybrid) {#deployment-models} Your Cribl deployment model determines where the Leader runs and whether the underlying infrastructure is Cribl-managed (Cribl.Cloud), customer-managed (on-prem), or both (hybrid). * In [Cribl.Cloud deployments](/stream/deploy-cloud), Cribl hosts and operates the Leader and the Cribl-managed parts of your footprint. You use Organizations and Workspaces to separate environments, set up access control, and configure products. * In [on-prem (self-hosted) deployments](/stream/deploy-types), you install and operate Cribl on infrastructure that you control. You run the Leader, Workers, and Edge Nodes in environments that you operate. * [Hybrid deployments](/stream/cloud-enterprise#hybrid) use a Cribl.Cloud Leader. Stream Workers and Edge Nodes run in a mix of Cribl-managed and customer-managed locations, such as your cloud accounts or data centers. For details about the architecture for each deployment model, see [Cribl.Cloud](/reference-architectures/arch-cloud-arch-planning), [on-prem](/reference-architectures/arch-onprem-planning), and [hybrid](/reference-architectures/arch-hybrid-planning). ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api.md ############################################################ # Cribl API The Cribl API is a RESTful API that provides a centrally managed control plane for programmatically configuring and managing Cribl resources. Developers can use the API to: - Retrieve and manage data. - Automate repetitive manual processes. - Integrate with third-party applications. - Consistently replicate environments and resources for testing, development, and deployment. The Cribl API generally follows a resource-based structure in which each endpoint corresponds with a specific Cribl resource or collection of resources. In request URLs, resource-specific paths branch off from the [base URL](#base-urls). Read the [Authentication](api-auth) page to learn how to authenticate to the Cribl API. > ##### About PATCH Requests > > In the Cribl API for the control plane, PATCH requests require a complete representation of the resource that you want to update. Endpoints that use the PATCH method do not support partial updates. Cribl removes any omitted fields when updating the resource. If you use a GET request to retrieve an existing configuration to use in the body of a PATCH request, confirm that the configuration is correct. If the existing configuration is incorrect, the updated resource may not function as expected. The [Update Configurations](update-configurations) example demonstrates how to update a Destination using the PATCH method. > > The Cribl API for the management plane does support partial updates for endpoints that use the PATCH method. {.box .warning} ## Try It Out {#try-it-out} The [API Reference](/api-reference/) is also available in Cribl at **Settings** > **Global** > **API Reference**. We recommend using the in-product API Reference because it features a **Try it out** button for each endpoint that you can use to construct and execute a `curl` command and examine the response. The in-product API Reference aligns with your environment and provides a seamless testing experience. At the top of the in-product API Reference, a **Servers** drop-down menu lists the base URLs associated with your Stream Leader and Worker Groups, Edge Fleets, and Search instance. **Try it out** commands use the base URL that you select from the **Servers** drop-down menu. The default selection in the **Servers** drop-down is the base URL for your Leader. ## Base URLs {#base-urls} The base URL is the root address for making requests to the Cribl API. The standardized base URL format provides a consistent, predictable pattern. Follow the format examples in this section to construct the base URL for your Cribl deployment. The correct base URL depends first on whether the target endpoint is in the [control plane](#control-plane-base-url) or [management plane](#mgmt-plane-base-url). For control plane endpoints, the base URL further depends on whether the target endpoint operates in the [global](#base-url-global), [Group/Fleet or Host](#base-url-group-fleet-host), or [Cribl Search](#base-url-cribl-search) context. In [hybrid deployments](/stream/cloud-enterprise/#hybrid) with a Cribl.Cloud Leader and on-prem workers, API requests use the Cribl.Cloud base URL format. This is true even in the [Group/Fleet or Host](#base-url-group-fleet-host) context because API requests are served from the Cribl.Cloud Leader. To compose the complete URL for a request to a specific endpoint, append the endpoint path that is listed in the [API Reference](/api-reference/) to the base URL. ### Control Plane Base URLs {#control-plane-base-url} The control plane provides operational control over Cribl resources. The control plane is supported for Cribl.Cloud/hybrid and on-prem deployments, and the base URL varies for target endpoints in the [global](#base-url-global), [Group/Fleet or Host](#base-url-group-fleet-host), or [Cribl Search](#base-url-cribl-search) context. #### Global Context {#base-url-global} For API requests to endpoints that apply to the entire Workspace or Organization (Cribl.Cloud/hybrid) or instance (on-prem), use the base URL for global requests. Examples of requests with a global scope include managing feature settings and resources outside of the context of a specific Worker Group or Fleet. In Cribl.Cloud and hybrid deployments, the base URL format for global requests for Cribl Stream, Edge, and Lake endpoints is: ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1 ``` In Cribl.Cloud Government and hybrid deployments, the format is the same except the hostname uses `cribl-gov.cloud`: ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1 ``` For single-instance on-prem deployments, use the following base URL format for global requests: ``` https://${hostname}:${port}/api/v1 ``` For example, to send a request to the `GET /system/settings/git-settings` endpoint to retrieve the git settings for the Organization or instance, the complete URL is: **Cribl.Cloud and Hybrid (Global)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/system/settings/git-settings ``` **Cribl.Cloud Government and Hybrid (Global)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/system/settings/git-settings ``` **On-Prem (Global)** ``` https://${hostname}:${port}/api/v1/system/settings/git-settings ``` #### Group/Fleet or Host Context {#base-url-group-fleet-host} Some endpoints operate in the context of a specific Worker Group or Edge Fleet or host (Worker or Edge Node). In these cases, the base URL format includes additional URL segments that identify the context and the particular Group/Fleet or Node. Context | URL Segments | Example ------- | ------------ | ------- Endpoints that target a specific Group/Fleet | `/m/${groupName}` | List the commit history for a Worker Group or Edge Fleet with `GET /version` Endpoints that act on a single Worker or Edge Node | `/w/${nodeId}` | Get host metadata with `GET /edge/metadata` ##### Base URL for the Group or Fleet Context {#base-url-group-fleet} For requests that are specific to a Worker Group or Edge Fleet, the base URL includes the `/m` context indicator and the name of the target Worker Group or Fleet: **Cribl.Cloud and Hybrid (Worker Group/Edge Fleet)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName} ``` **Cribl.Cloud Government and Hybrid (Worker Group/Edge Fleet)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/${groupName} ``` **On-Prem (Worker Group/Edge Fleet)** ``` https://${hostname}:${port}/api/v1/m/${groupName} ``` > If your license is limited to a single Worker Group, the `groupName` is always `default`. {.box .info} For example, to send a request to the `POST /system/outputs` endpoint to create a Destination for the Worker Group `myDevGroup`, the complete URL is: **Cribl.Cloud and Hybrid (Worker Group/Edge Fleet)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/myDevGroup/system/outputs ``` **Cribl.Cloud Government and Hybrid (Worker Group/Edge Fleet)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/myDevGroup/system/outputs ``` **On-Prem (Worker Group/Edge Fleet)** ``` https://${hostname}:${port}/api/v1/m/myDevGroup/system/outputs ``` ##### Base URL for the Host Context {#base-url-host} For requests that are specific to a certain host (Worker or Edge Node), the base URL includes the `/w` context indicator and the ID of the target Worker or Edge Node: **Cribl.Cloud and Hybrid (Worker/Edge Nodes)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/w/${nodeId} ``` **Cribl.Cloud Government and Hybrid (Worker/Edge Nodes)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/w/${nodeId} ``` **On-Prem (Worker/Edge Nodes)** ``` https://${hostname}:${port}/api/v1/w/${nodeId} ``` To get the `nodeId`, send a request to the `GET /products/{product}/workers` endpoint using the [global context](#base-url-global) for the base URL. The response lists detailed metadata for all Worker and Edge Nodes that the Leader manages. Use the `id` value for the desired Node as the `nodeId` in the request URL. For example, to send a request to the `GET /health` endpoint for the Worker Node `abc123a9-ea69-4066-b295-456defb55784`, the complete URL is: **Cribl.Cloud and Hybrid (Worker/Edge Node)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/w/abc123a9-ea69-4066-b295-456defb55784/health ``` **Cribl.Cloud Government and Hybrid (Worker/Edge Node)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/w/abc123a9-ea69-4066-b295-456defb55784/health ``` **On-Prem (Worker/Edge Node)** ``` https://${hostname}:${port}/api/v1/w/abc123a9-ea69-4066-b295-456defb55784/health ``` #### Cribl Search Context {#base-url-cribl-search} For [Cribl Search endpoints](/cribl-as-code/api-reference/control-plane/cribl-search), the base URL includes `/m` and `default_search`: **Cribl.Cloud and Hybrid (Cribl Search)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search ``` **Cribl.Cloud Government and Hybrid (Cribl Search)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/default_search ``` For example, for a request to the `GET /search/jobs/{id}` endpoint, the complete URL is: **Cribl.Cloud and Hybrid (Cribl Search)** ``` https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs/{id} ``` **Cribl.Cloud Government and Hybrid (Cribl Search)** ``` https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/default_search/search/jobs/{id} ``` ### Management Plane Base URL {#mgmt-plane-base-url} The management plane includes endpoints for administrative tasks like configuring and managing Workspaces. The management plane is supported for commercial Cribl.Cloud only. > Cribl.Cloud Government does not support the management plane API. > {.box .cloud} For [management plane endpoints](/cribl-as-code/api-reference/management-plane/), the base URL is: ``` https://gateway.cribl.cloud ``` For example, for a request to the `GET /v1/organizations/{organizationId}/workspaces` endpoint, the complete URL is: ``` https://gateway.cribl.cloud/v1/organizations/${organizationId}/workspaces ``` ## Path Parameters Many Cribl API endpoints require to you provide path parameters. Most path parameters are used to specify individual resources. For example, in the endpoint `GET /pack/{id}`, the `{id}` identifies the specific Cribl Pack to retrieve. For some endpoints, path parameters limit the scope of the request in some way. For example, in the endpoint `GET /products/{product}/groups`, the `{product}` path parameter indicates the Cribl product whose Worker Groups or Edge Fleets should be listed in the response. In another example, `GET /p/{pack}/pipelines`, the `{pack}` path parameter limits the response to Pipelines within the specified Pack. The [API Reference](/api-reference/) identifies and describes the path parameters for each endpoint. ## Query Parameters Some Cribl API endpoints support optional query parameters for filtering or modifying the response. For example, endpoints that return a list of objects can have lengthy responses, so they might support `limit` and `offset` query parameters to use for paginating the response. Other endpoints might support query parameters that allow you to specify additional properties to include in the response or a JavaScript expression to apply as a filter. The [API Reference](/api-reference/) identifies and describes the supported query parameters for each endpoint. ## Request Size Limit The size limit for requests to the Cribl API is 5 MB. ## Rate Limits {#rate-limits} Cribl applies rate limits for API requests so that excessive traffic does not interfere with normal operations. The rate limits vary for different Cribl API endpoints. You can directly change rate limits for only the [login and SSO/SLO callback endpoints](#login-sso-slo-rate-limits). When a request exceeds an endpoint's rate limit, the API returns HTTP status code `429 Too Many Requests` and a `Retry-After` response header. The `Retry-After` header value is the number of seconds to wait before retrying the request. The response body includes the `limiter` attribute, which identifies the rate limit that the request exceeded. > In Cribl.Cloud, if a rate limit repeatedly prevents requests, contact [Cribl Support](/support/) to request an adjustment at the Organization or Workspace level. Provide the `limiter` value from the `429 Too Many Requests` response body with your adjustment request. > {.box .cloud} Each Leader or Node tracks its own rate limits. Requests from all clients to the same Leader or Node count toward the same rate limit. ### Rate Limits for Login and SSO/SLO Endpoints {#login-sso-slo-rate-limits} You can change the default rate limits for the following on-prem API endpoints: |
Endpoints
| Purpose | Default Rate Limit | | --- | --- | --- | | `POST /auth/login` | Log in and get a Bearer token to authenticate subsequent API requests. | Two requests per second | | `GET /auth/sso/callback`
`POST /auth/sso/callback`
`GET /auth/slo/callback`
`POST /auth/slo/callback` | Receive and process SAML sign-in and sign-out responses from the identity provider. All four endpoints share the rate limit. | Two requests per second | Updated limits take effect without restarting the affected Leader or Node. To change rate limits for the login and SSO/SLO endpoints with the API, use `PATCH /system/api-limits`. The following example demonstrates how to increase the rate limits for the login and SSO/SLO endpoints from 2 requests per second to 10 requests per second: - For the login endpoint, use the `rateLimits.login.rate` and `rateLimits.login.interval` body parameters. - For the SSO/SLO endpoints, use the `rateLimits.sso.rate` and `rateLimits.sso.interval` body parameters. **Change Login and SSO/SLO Endpoint Rate Limits (On-Prem)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/system/api-limits" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "rateLimits": { "login": { "rate": 10, "interval": "second" }, "sso": { "rate": 10, "interval": "second" } } }' ``` You can also use the Cribl UI or the `api-limits.yml` configuration file to change the rate limits for these endpoints: - In the Cribl UI, set the **Login rate limit** and **SSO/SLO callback rate limit** for the [Leader](/iam/authentication#auth-controls), [Worker Group](/stream/group-settings#api-limits), or [Edge Fleet](/edge/fleet-settings#api-limits). - In the [`api-limits.yml`](/stream/api-limitsyml) configuration file, set `rateLimits.login` and `rateLimits.sso`. ## Media Types For endpoints that require a request body (typically `POST`, `PUT`, and `PATCH`), the server expects a valid `Content-Type` [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) that specifies the media type of the request body. In this example request, the `Content-Type` value is `application/json`: ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "query": "cribl dataset=\"goatherd_sample_dataset\" | limit 1000", "earliest": "-1h", "latest": "now", "sampleRate": 1 }' ``` If the request omits the `Content-Type` header or the value does not match the supported media type for the endpoint, the server might return an error. For most `POST`, `PUT`, and `PATCH` endpoints in the Cribl API, the media type for the request body is `application/json`. Some endpoints support other media types, such as `application/x-ndjson` or `application/x-www-form-urlencoded`. The [API Reference](/api-reference/) specifies the supported media type for each endpoint in the **Request body** drop-down list. ![Location of the request body media type for an endpoint in the API Reference.](request-media-type-api-reference.png) {border="true" caption="Endpoint's request body media type in API Reference"} The [API Reference](/api-reference/) also specifies the media type for each endpoint's responses, which is helpful for ensuring proper data processing. ![Location of the response media type for an endpoint in the API Reference.](response-media-type-api-reference.png) {border="true" caption="Endpoint's response media type in API Reference"} ## HTTP Status Codes The Cribl API can return the following HTTP status codes in response headers: | HTTP Status Code | Meaning | | -------------------------- | --------------------------- | | 200 OK | The request was successful. | | 204 No Content | The request was successful, but there is no content to send in the response. Often used for `DELETE` requests. | | 400 Bad Request | The server could not understand the request due to malformed syntax or missing parameters. | | 401 Unauthorized | Authentication failed because credentials are missing or invalid. | | 403 Forbidden | The server understood the request but did not authorize it because permissions are insufficient to access the requested resource. | | 404 Not Found | The requested resource was not found. The endpoint may not exist or the resource may be unavailable. | | 405 Method Not Allowed | The request method is not supported for the resource (for example, a `POST` request for a resource that only supports `GET`). | | 415 Unsupported Media Type | The server did not accept the request because the payload is in an unsupported data format. Often indicates that the `Content-Type` header is incorrect. | | 420 Shutting Down | The server is in the process of shutting down or is in standby. | | 429 Too Many Requests | The number of requests exceeds a [rate limit](#rate-limits). | | 500 Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. | | 502 Bad Gateway | While acting as a gateway or proxy, the server received an invalid response from the upstream server. | | 503 Service Unavailable | The server could not handle the request due to temporary overload or maintenance. | See the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) for more information about HTTP status codes. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-auth.md ############################################################ # Authenticate with the Cribl API All Cribl API requests require you to authenticate with a Bearer token, except `GET /health` in the [global context](api#base-url-global) and `POST /auth/login`. In Cribl, Bearer tokens are [JSON Web Tokens (JWTs)](https://datatracker.ietf.org/doc/html/rfc7519). You must include a valid Bearer token in the `Authorization` header of your API requests. The Bearer token verifies your identity and ensures secure access to the requested resources. The process for retrieving the Bearer token depends on whether you authenticate in [commercial Cribl.Cloud and hybrid](#api-auth-cloud) deployments, [Cribl.Cloud Government and hybrid](#api-auth-gov) deployments, or [on-prem](#api-auth-on-prem) deployments. - In Cribl.Cloud and hybrid deployments, Bearer tokens are valid for `24` hours. - In on-prem deployments, Bearer tokens expire according to the value you provide for the **Auth token TTL** setting at **Settings** > **Global** > **General Settings** > **API Server Settings** > **Advanced**. The default setting is `3600` seconds (`1` hour). {scale="90%" border="true"} You are responsible for ensuring that your applications obtain a new Bearer token within the expiration window for each token. > For on-prem deployments, if you're using SSO/OpenID Connect Authentication, you must toggle on **Allow login as Local User** in Cribl (see [Set Up Fallback Access](/iam/sso-on-prem/#fallback-access-on-prem)). You'll need to be a Local user when you authenticate. > > To use `https` for on-prem requests, you must [Configure TLS](/stream/securing-configure-tls/). If you do not configure TLS, use `http` instead. Use `http` only for testing in development environments. In production, configure TLS and use `https` to secure your communications. > {.box .warning} ## Authenticate in Cribl.Cloud and Hybrid Deployments {#api-auth-cloud} To authenticate for API requests to [control plane](/cribl-as-code/control-plane/) (Cribl.Cloud or hybrid) or [management plane](/cribl-as-code/api-reference/management-plane/) (Cribl.Cloud) endpoints, first create an API Credential. The API Credential provides a **Client ID** and **Client Secret**. Provide these in a request to `https://login.cribl.cloud/oauth/token` to obtain a 24-hour Bearer token to authenticate subsequent API requests. > API Credentials that refresh Bearer tokens at a high frequency are subject to [rate limits](api#rate-limits). > {.box .info} The authentication process is the same for [control plane](/cribl-as-code/control-plane/) and [management plane](/cribl-as-code/api-reference/management-plane/) access. The difference is the [base URL](api#base-urls) and endpoints used for subsequent API requests. > For Cribl.Cloud Government, follow the separate [authentication instructions](#api-auth-gov) instead. > {.box .cloud} You can create API Credentials with the `POST /api-credentials` endpoint in the Cribl [management plane API](/cribl-as-code/api-reference/management-plane/). However, you must first create the initial API Credential manually in the Cribl UI. This is necessary because Cribl API requests require a Bearer token, which in turn requires an API Credential. After you create the first API Credential, you can retrieve a Bearer token to use in [API requests to create new API Credentials](api-create-api-credentials). To create an API Credential in the Cribl UI: 1. Log in to Cribl.Cloud as an Owner or an Admin. 1. On the top bar, select **Products**, and then select **Cribl**. 1. In the sidebar, select **Organization**, and then select **API Credentials**. 1. Select **Add Credential**. 1. Enter a **Name** and an optional **Description**. 1. In the **Organization Permissions** drop-down menu, select a [Permission](/iam/permissions#organization) to apply for the API Credential. **Organization Permissions** are available on [certain plan/license tiers](https://cribl.io/pricing/). Without a proper license, all API Credentials are granted the **Admin** Permission. - The **Admin** or **Owner** Permission automatically grants admin access on all Workspaces. - If you choose the **User** Permission, under **Workspace Access**, define the desired [Permissions](/iam/permissions#workspace) for specific [Workspaces](/stream/workspaces) and Cribl products. - To grant read-only access on [individual Cribl Search resources](/search/sharing#share-datasets-dashboards) (for example, for a service account that connects to Cribl Search via API), select the **User** Permission on the Organization, the **Member** Permission on the Workspace, and either the **User** or **Editor** Permission on Cribl Search. The **Admin** Permission automatically grants full access to all Cribl Search resources. - The **Billing Reader** Permission grants read-only access to billing information for the Organization. It does not grant access to Workspaces or products. 1. (Optional) Under **IP Allowlist**, you can restrict API access for the Credential to specific IPv4 Classless Inter-Domain Routing (CIDR) ranges. Select **Add CIDR** and enter the desired range. You can add a maximum of 10 CIDR ranges. 1. Select **Save**. The **API Credentials** page displays the new API Credential within a few seconds. The API Credential includes a **Client ID** and a **Client Secret** that Organization Owners and Admins can use to generate Bearer tokens. Organization Owners and Admins can view, edit, and disable existing API Credentials. Only Owners can delete API Credentials. > The **Client ID** and **Client Secret** are sensitive information and should be kept private. > {.box .info} Once you have the **Client ID** and **Client Secret**, send them in a request to `https://login.cribl.cloud/oauth/token` to retrieve the 24-hour Bearer token to use to authenticate subsequent API requests. The request body includes these fields: - `grant_type`: The OAuth grant type. For API Credentials, the value is always `client_credentials`. - `client_id` and `client_secret`: The **Client ID** and **Client Secret** from the API Credential. The **Client ID** and **Client Secret** are sensitive information and should be kept private, so the example request shows how to provide them as variables. - `audience`: The API identifier for Cribl.Cloud in Auth0. The value is always `https://api.cribl.cloud`. This is not the URL to use for subsequent API requests, which require the appropriate [base URL](api#base-urls) as shown in the [API request example](#api-request-example-cloud). **Authentication Request Example (Cribl.Cloud and Hybrid)** ```shell curl --request POST \ --url "https://login.cribl.cloud/oauth/token" \ --header "Content-Type: application/json" \ --data "{ \"grant_type\": \"client_credentials\", \"client_id\": \"${clientId}\", \"client_secret\": \"${clientSecret}\", \"audience\": \"https://api.cribl.cloud\" }" ``` As shown in the following example response, the JSON object in the response includes several attributes: - `access_token`: The Bearer token to use in the `Authorization` header for authentication in subsequent API requests. - `scope`: The [Permissions](/iam/permissions) that the Bearer token grants. - `expires_in`: The number of seconds until the Bearer token expires. In Cribl.Cloud/hybrid, Bearer tokens expire `24` hours (`86400` seconds) after they are created. You are responsible for ensuring that your applications obtain a new Bearer token within the expiration window for each token. - `token_type`: The type of the token. In Cribl.Cloud/hybrid, the value is always `Bearer`. **Authentication Response Example (Cribl.Cloud/Hybrid)** ```json { "access_token": "abcdefg1234567890...exampleBearerToken", "scope": "user:read:workergroups user:update:workergroups user:read:connections user:update:connections user:update:workspaces user:read:workspaces", "expires_in": 86400, "token_type": "Bearer" } ``` To use the Bearer token in subsequent API requests, include it in the `Authorization` header as shown in this control plane example: **API Request Example (Cribl.Cloud and Hybrid)** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/inputs" \ --header "Authorization: Bearer abcdefg1234567890...exampleBearerToken" \ --header "Content-Type: application/json" ``` ## Authenticate in Cribl.Cloud Government and Hybrid Deployments {#api-auth-gov} To authenticate for API requests to [control plane](/cribl-as-code/control-plane/) endpoints in Cribl.Cloud Government and hybrid deployments, first create an API Credential. The API Credential provides a **Client ID** and **Client Secret**. Provide these in a request to `https://criblgov-prod.okta.com/oauth2/ausfuanngyqh8CJ6c4h7/v1/token` to obtain a 24-hour Bearer token to authenticate subsequent API requests. > API Credentials that refresh Bearer tokens at a high frequency are subject to [rate limits](api#rate-limits). > {.box .info} > Cribl.Cloud Government does not support [management plane](/cribl-as-code/api-reference/management-plane/) API endpoints or the **IP Allowlist** option for API Credentials. > > API authentication request details differ between Cribl.Cloud Government and commercial Cribl.Cloud, such as the request URL, request header, and audience value. Follow the instructions and examples in this section. > {.box .cloud} To create an API Credential in the Cribl.Cloud Government UI: 1. Log in to Cribl.Cloud Government as an Owner or an Admin. 1. On the top bar, select **Products**, and then select **Cribl**. 1. In the sidebar, select **Organization**, and then select **API Credentials**. 1. Select **Add Credential**. 1. Enter a **Name** and an optional **Description**. 1. In the **Organization Permissions** drop-down menu, select a [Permission](/iam/permissions#organization) to apply for the API Credential. **Organization Permissions** are available on [certain plan/license tiers](https://cribl.io/pricing/). Without a proper license, all API Credentials are granted the **Admin** Permission. - The **Admin** or **Owner** Permission automatically grants admin access on all Workspaces. - If you choose the **User** Permission, under **Workspace Access**, define the desired [Permissions](/iam/permissions#workspace) for specific [Workspaces](/stream/workspaces) and Cribl products. - To grant read-only access on [individual Cribl Search resources](/search/sharing#share-datasets-dashboards) (for example, for a service account that connects to Cribl Search via API), select the **User** Permission on the Organization, the **Member** Permission on the Workspace, and either the **User** or **Editor** Permission on Cribl Search. The **Admin** Permission automatically grants full access to all Cribl Search resources. - The **Billing Reader** Permission grants read-only access to billing information for the Organization. It does not grant access to Workspaces or products. 1. Select **Save**. The **API Credentials** page displays the new API Credential within a few seconds. The API Credential includes a **Client ID** and a **Client Secret** that Organization Owners and Admins can use to generate Bearer tokens. Organization Owners and Admins can view, edit, and disable existing API Credentials. Only Owners can delete API Credentials. > The **Client ID** and **Client Secret** are sensitive information and should be kept private. Client IDs and Client Secrets are not interchangeable between commercial Cribl.Cloud and Cribl.Cloud Government. > {.box .info} Once you have the **Client ID** and **Client Secret**, send them as form fields in a request to `https://criblgov-prod.okta.com/oauth2/ausfuanngyqh8CJ6c4h7/v1/token` to retrieve the 24-hour Bearer token to use to authenticate subsequent API requests. The request includes these form fields: - `grant_type`: The OAuth grant type. For API Credentials, the value is always `client_credentials`. - `client_id` and `client_secret`: The **Client ID** and **Client Secret** from the API Credential. The **Client ID** and **Client Secret** are sensitive information and should be kept private, so the example request shows how to provide them as variables. - `audience`: The audience configured for Cribl.Cloud Government in Okta. The value is always `https://api.cribl-gov.cloud`. This is not the URL to use for subsequent API requests, which require the appropriate [base URL](api#base-urls) as shown in the [API request example](#api-request-example-gov). **Authentication Request Example (Cribl.Cloud Government and Hybrid)** ```shell curl --request POST \ --url "https://criblgov-prod.okta.com/oauth2/ausfuanngyqh8CJ6c4h7/v1/token" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "client_id=${clientId}" \ --data-urlencode "client_secret=${clientSecret}" \ --data-urlencode "audience=https://api.cribl-gov.cloud" ``` As shown in the following example response, the JSON object in the response includes several attributes: - `token_type`: The type of the token. In Cribl.Cloud Government and hybrid deployments, the value is always `Bearer`. - `expires_in`: The number of seconds until the Bearer token expires. In Cribl.Cloud Government and hybrid deployments, Bearer tokens expire `24` hours (`86400` seconds) after they are created. You are responsible for ensuring that your applications obtain a new Bearer token within the expiration window for each token. - `access_token`: The Bearer token to use in the `Authorization` header for authentication in subsequent API requests. - `scope`: In Cribl.Cloud Government and hybrid deployments, the value is always `zeus_api_access`. The authentication server grants this default scope for every API Credential token. The [Permissions](/iam/permissions) that you assigned to the API Credential still determine which API operations the Bearer token can perform. **Authentication Response Example (Cribl.Cloud Government and Hybrid)** ```json { "token_type": "Bearer", "expires_in": 86400, "access_token": "abcdefg1234567890...exampleBearerToken", "scope": "zeus_api_access" } ``` To use the Bearer token in subsequent API requests, include it in the `Authorization` header as shown in this control plane example: **API Request Example (Cribl.Cloud Government and Hybrid)** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/${groupName}/system/inputs" \ --header "Authorization: Bearer abcdefg1234567890...exampleBearerToken" \ --header "Content-Type: application/json" ``` ## Authenticate in On-Prem Deployments {#api-auth-on-prem} To authenticate using the API in on-prem deployments, send a request to the `/auth/login` endpoint. The response includes the Bearer token required for subsequent API requests. The following example request demonstrates an `/auth/login` request. Replace the variables in the example request with your hostname, port, and login credentials (username and password). Your username and password are sensitive information and should be kept private, so the example request shows how to provide them as variables. **Authentication Request Example (On-Prem Deployment)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/auth/login" \ --header "Content-Type: application/json" \ --data "{ \"username\": \"${username}\", \"password\": \"${password}\" }" ``` The response is a JSON object like the following example. The value of the `token` attribute in the response is the Bearer token: **Authentication Response Example (On-Prem Deployment)** ```json { "token": "abcdefg1234567890...exampleBearerToken", "forcePasswordChange": false } ``` To use the Bearer token in subsequent API requests, include it in the `Authorization` header, like this: **API Request Example (On-Prem Deployment)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/inputs" \ --header "Authorization: Bearer abcdefg1234567890...exampleBearerToken" \ --header "Content-Type: application/json" ``` ## Authenticate and Create HEC Tokens with Python {#hec-tokens} Cribl Solutions Engineering developed an example script that demonstrates how to use Python to authenticate to the Cribl API, make a simple POST request, and add a new HEC token. The script and instructions for usage are available in the [`py_hec_token_mgr` GitHub repo](https://github.com/camrunr/py_hec_token_mgr). To use the script, you'll need: - Python 3. - The Python 3 Requests module (use brew or pip3 to install). - A working, distributed Cribl Stream or Edge installation, with a configured [Splunk HEC Source](/stream/sources-splunk-hec). - An admin username and password. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-code-examples.md ############################################################ # Cribl API Code Examples These code examples demonstrate how to use the Cribl API directly to complete a task or set of tasks. Each example describes the steps required to complete a specific task, identifies the endpoints to use, and provides example requests and responses. The API code examples complement our [API Reference](/api-reference/) and explain common usage scenarios for the Cribl API. If you want to automate an action in Cribl for which you can't find documentation, ask in the [Cribl Community `#docs` channel](https://cribl-community.slack.com/archives/C01BM8PU30V). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The following Cribl API code examples are available: - [Configure Worker Groups](api-configure-worker-groups) - [Configure Resources](api-configure-resources) - [Update Configurations](update-configurations) - [Copy, Export, and Install Packs](copy-export-install-packs) - [Create and Update Lookups](create-update-lookups) - [Commit and Deploy Changes](commit-deploy) - [View Large Diffs](view-large-diffs) - [Query the Health Endpoint](query-health-endpoint) - [Create New API Credentials](api-create-api-credentials) (management plane) - [Add a Cribl Search Pack and Create a Lake Dataset](api-search-pack-lake-dataset) - [Search and Retrieve Results](search-results) - [Get Alerts for Search Results](get-alerts-search-results) - [Get Cumulative Consumption by Contract](api-billing-contracts-utilization) - [Get Monthly or Daily Credit Consumption](api-billing-monthly-daily-consumption) - [Get Credit Grants and Statistics](api-billing-grants-statistics) ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-configure-worker-groups.md ############################################################ # Configure Worker Groups with the Cribl API These code examples demonstrate how to use the [Cribl API](api) to configure, scale, replicate, and deploy [Worker Groups](/stream/deploy-distributed/#concepts) in Cribl Stream. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/products/stream/groups`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The examples for [creating](#create-worker-group-api) and [scaling](#scale-worker-group-api) a Worker Group on Cribl.Cloud include the `estimatedIngestRate` property, which allows you to configure Worker Groups for optimal performance. For each supported `estimatedIngestRate` value, the following table maps the corresponding throughput and number of Worker Processes: | `estimatedIngestRate` | Throughput | Worker Processes | | --------------------- | ---------- | ---------------- | | 1024 | 12 MB/s | 6 | | 2048 | 24 MB/s | 9 | | 3072 | 36 MB/s | 14 | | 4096 | 48 MB/s | 21 | | 5120 | 60 MB/s | 30 | | 7168 | 84 MB/s | 45 | | 10240 | 120 MB/s | 62 | | 13312 | 156 MB/s | 93 | | 15360 | 180 MB/s | 186 | ## 1. Create a Worker Group {#create-worker-group-api} This example creates a new Worker Group in Cribl Stream. In the Cribl.Cloud example, the [`estimatedIngestRate`](#est-ingest-rates-api) is set to `2048`, which is equivalent to a maximum of 24 MB/s with nine Worker Processes. In the on-prem deployment example, the new Worker Group is created with eight Workers. **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my-worker-group", "name": "my-worker-group", "description": "Cribl.Cloud Worker Group", "cloud": { "provider": "aws", "region": "us-west-2" }, "workerRemoteAccess": true, "isFleet": false, "isSearch": false, "onPrem": false, "estimatedIngestRate": 2048, "provisioned": false }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my-worker-group", "name": "my-worker-group", "description": "My Worker Group description", "workerRemoteAccess": true, "isFleet": false, "isSearch": false, "onPrem": true, "workerCount": 8 }' ``` ## 2. Scale the Worker Group {#scale-worker-group-api} The Cribl.Cloud example scales the Worker Group to an [`estimatedIngestRate`](#est-ingest-rates-api) of 4096, which is equivalent to a maximum of 48 MB/s with 21 Worker Processes. The example also sets provisioned to true to activate Cribl.Cloud resources. The on-prem example assumes the Syslog Source load balancer (LB) is enabled on a Cribl Stream system with 6 physical cores hyperthreaded (12 vCPUs). Because the Syslog Source LB reserves an additional core, the example scales the process count from the default to `-3`: two cores for system/API overhead plus one for the LB process, so the system spawns nine Worker Processes. For more information, see [Optimize a Distributed Deployment or Hybrid Group](/stream/scaling#optimize-a-distributed-deployment-or-hybrid-group) and [Choose a Process Count](/stream/scaling#choose-a-process-count). The on-prem example also updates the Worker Group system settings, commits and deploys the changes, and restarts the Worker Group to apply the changes. > The request bodies for the `PATCH /products/{product}/groups/{id}` (Cribl.Cloud) and `PATCH /system/settings/conf` (on-prem) endpoints must include a **complete** representation of the Worker Group or settings, respectively, that you want to update. These endpoints do not support partial updates. Cribl removes any omitted fields when updating the Worker Group or settings. > {.box .warning} **Cribl.Cloud** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups/my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my-worker-group", "name": "my-worker-group", "description": "Cribl.Cloud Worker Group", "cloud": { "provider": "aws", "region": "us-west-2" }, "workerRemoteAccess": true, "isFleet": false, "isSearch": false, "onPrem": false, "estimatedIngestRate": 4096, "provisioned": true }' ``` **On-Prem** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/products/stream/groups/my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "api": { "host": "0.0.0.0", "port": 1234, "ssl": { "disabled": false, "certificateName": "myCertificate", "certPath": "$CRIBL_HOME/local/cribl/auth/certs/myCertificate.crt", "privKeyPath": "$CRIBL_HOME/local/cribl/auth/certs/myCertificate.key" } }, "system": { "upgrade": "api", "intercom": true }, "workers": { "count": -3, "memory": 2048, "minimum": 2 }, "proxy": { "useEnvVars": true }, "upgradeSettings": { "disableAutomaticUpgrade": true, "enableLegacyEdgeUpgrade": false }, "shutdown": { "drainTimeout": 10 } }' ``` ## 3. Replicate the Worker Group {#replicate-worker-group-api} This example creates a replica Worker Group in Cribl Stream by cloning an existing Worker Group configuration. The new Worker Group uses the `sourceGroupId` body parameter to specify the Worker Group to clone. The replica Worker Group inherits the configuration from the source Worker Group, including settings and resources like Sources, Destinations, and Pipelines. To run this example, you must have at least one existing Worker Group named `my-worker-group` in Cribl Stream to use as the source Worker Group. **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my-replica-worker-group", "name": "my-replica-worker-group", "description": "Worker Group cloned from my-worker-group with identical configuration", "cloud": { "provider": "aws", "region": "us-west-2" }, "workerRemoteAccess": true, "isFleet": false, "isSearch": false, "onPrem": false, "sourceGroupId": "my-worker-group" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my-replica-worker-group", "name": "my-replica-worker-group", "description": "Worker Group cloned from my-worker-group with identical configuration", "workerRemoteAccess": true, "isFleet": false, "isSearch": false, "onPrem": true, "sourceGroupId": "my-worker-group" }' ``` ## 4. Confirm the Worker Group Configuration {#confirm-worker-group-api} Use this example to retrieve a list of all Worker Groups in Cribl Stream so that you can review and confirm their configurations. **Cribl.Cloud** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/products/stream/groups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` ## 5. Commit and Deploy the Worker Group {#commit-deploy-worker-group-api} This example demonstrates how to commit and deploy the Worker Group configurations, then commit to the Leader to keep it in sync with the Worker Groups. You can commit and deploy immediately after a single [create](#create-worker-group-api) or [update](#scale-worker-group-api) request or after multiple requests. On-prem deployments also require restarting the Worker Groups if you want their new configurations to take effect. First, commit pending changes to the Worker Group. This request commits only the configuration changes for the Worker Group by specifying the file `local/cribl/groups.yml`. Repeat this request for each Worker Group whose changes you want to commit. **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit?groupId=my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "files": [ "local/cribl/groups.yml" ], "message": "Commit Worker Group configuration" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit?groupId=my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "files": [ "local/cribl/groups.yml" ], "message": "Commit Worker Group configuration" }' ``` Second, deploy the committed changes to the Worker Group. This request includes the `version` body parameter, which uses the value of `commit` from the response body for the commit request. Repeat this request for each Worker Group whose committed changes you want to deploy. **Cribl.Cloud** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups/my-worker-group/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": 1234abcd5678efgh9012ijkl3456mnop7EXAMPLE }' ``` **On-Prem** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/products/stream/groups/my-worker-group/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": 1234abcd5678efgh9012ijkl3456mnop7EXAMPLE }' ``` Commit the changes to the Leader to keep the Leader in sync with the Worker Group. **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync my-worker-group with Leader" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync my-worker-group with Leader" }' ``` Finally, for on-prem deployments only, restart the Worker Group. Repeat this request for each Worker Group whose configuration you want to take effect. **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/system/settings/restart" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-configure-resources.md ############################################################ # Configure Resources with the Cribl API These code examples demonstrate how to use the [Cribl API](api) to create the following resources in Cribl Stream: - A [Syslog Source](/stream/sources-syslog/) to receive data on port 9021. - An [S3 Destination](/stream/destinations-s3/) to store processed data. - A [Pipeline](/stream/pipelines/) that filters events and keeps only data in the `eventSource` and `eventID` fields. - A [Route](/stream/routes/) that connects the Source, Pipeline, and Destination. The examples also include [deploying](#commit-deploy-resource-configs) the resource configurations to a Worker Group to make them active. The examples use the Worker Group created in [Configure Worker Groups](api-configure-worker-groups) to manage the resource configuration. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/my-worker-group/system/inputs`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Create a Source {#create-source-api} This example creates a [Syslog Source](/stream/sources-syslog/) to receive data on port 9021. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/system/inputs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "in_syslog_9021", "type": "syslog", "disabled": true, "tcpPort": 9021, "host": "192.168.1.100" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/system/inputs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "in_syslog_9021", "type": "syslog", "disabled": true, "tcpPort": 9021, "host": "192.168.1.100" }' ``` ## Create a Destination {#create-destination-api} This example creates an [S3 Destination](/stream/destinations-s3/) to store processed data. Replace placeholder values like `your-aws-api-key` before you run the example. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/system/outputs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "out_s3", "type": "s3", "awsAuthenticationMethod": "manual", "awsApiKey": "your-aws-api-key", "awsSecretKey": "your-aws-secret-key", "region": "us-east-2", "bucket": "your-aws-bucket-name", "compress": "gzip", "compressionLevel": "best_speed", "stagePath": "$CRIBL_HOME/state/outputs/staging", "emptyDirCleanupSec": 300 }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/system/outputs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "out_s3", "type": "s3", "awsAuthenticationMethod": "manual", "awsApiKey": "your-aws-api-key", "awsSecretKey": "your-aws-secret-key", "region": "us-east-2", "bucket": "your-aws-bucket-name", "compress": "gzip", "compressionLevel": "best_speed", "stagePath": "$CRIBL_HOME/state/outputs/staging", "emptyDirCleanupSec": 300 }' ``` ## Create a Pipeline {#create-pipeline-api} This example creates a [Pipeline](/stream/pipelines/) that filters events and keeps only data in the `eventSource` and `eventID` fields. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/pipelines" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my_pipeline", "conf": { "asyncFuncTimeout": 1000, "functions": [ { "filter": "true", "conf": { "remove": [ "*" ], "keep": [ "eventSource", "eventID" ] }, "id": "eval", "final": true } ] } }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/pipelines" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "my_pipeline", "conf": { "asyncFuncTimeout": 1000, "functions": [ { "filter": "true", "conf": { "remove": [ "*" ], "keep": [ "eventSource", "eventID" ] }, "id": "eval", "final": true } ] } }' ``` ## Create a Route {#create-route-api} This example creates a [Route](/stream/routes/) that connects the Syslog Source, Pipeline, and S3 Destination and adds it to the end of the `default` Routing table. The Routing table already includes a `default` Route, so this request changes the `default` Route's setting for `final` to `false` so that it won't block the new Route. > The `PATCH /routes/default` endpoint requires a **complete** representation of the Routing table and its existing Routes in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Routing table. Use `GET /routes/default` to retrieve the existing Routing table to use in the body of the PATCH request. > {.box .warning} **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/routes/default" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "default", "routes": [ { "id": "0abcd9", "name": "default", "final": false, "disabled": false, "pipeline": "main", "enableOutputExpression": false, "filter": "true", "output": "default" }, { "name": "my_route", "final": true, "disabled": false, "pipeline": "my_pipeline", "enableOutputExpression": false, "filter": "__inputId == 'syslog:in_syslog_9021:tcp'", "output": "out_s3", "description": "This is my new Route" } ] }' ``` **On-Prem** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/routes/default" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "default", "routes": [ { "id": "0abcd9", "name": "default", "final": false, "disabled": false, "pipeline": "main", "enableOutputExpression": false, "filter": "true", "output": "default" }, { "name": "my_route", "final": true, "disabled": false, "pipeline": "my_pipeline", "enableOutputExpression": false, "filter": "__inputId == 'syslog:in_syslog_9021:tcp'", "output": "out_s3", "description": "This is my new Route" } ] }' ``` ## Commit and Deploy the Resource Configurations {#commit-deploy-resource-configs} This example demonstrates how to commit and deploy the resource configurations to your Worker Group, then commit to the Leader to keep it in sync with the Worker Group. Committing and deploying the Worker Group configuration requires three requests: commit to the Worker Group, deploy to the Worker Group, and commit the Leader to keep it in sync. First, commit the pending resource configurations to the Worker Group: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit?groupId=my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Commit resource configurations to my-worker-group" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit?groupId=my-worker-group" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Commit resource configurations to my-worker-group" }' ``` Next, deploy the committed changes to the Worker Group. This request includes the `version` body parameter, which uses the value of `commit` from the response body for the commit request: **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups/my-worker-group/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": 1234abcd5678efgh9012ijkl3456mnop7EXAMPLE }' ``` **On-Prem** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/products/stream/groups/my-worker-group/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": 1234abcd5678efgh9012ijkl3456mnop7EXAMPLE }' ``` Finally, commit the changes to the Leader to keep the Leader in sync with the Worker Group: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync my-worker-group resource configurations with Leader" } ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync my-worker-group resource configurations with Leader" } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/update-configurations.md ############################################################ # Update Configurations Use the Cribl API to programmatically update the configuration of supported objects like Sources and Destinations. Use the `/system/inputs` endpoints for Sources and the `/system/outputs` endpoints for Destinations (see the [API Reference](/api-reference/) for details). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/${groupName}/system/outputs/MinIO_testing`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > > In Cribl.Cloud and other distributed deployments, you must [commit and deploy](commit-deploy) the changes you make. > {.box .info} ## Update a Destination Configuration {#update-destination} This example demonstrates how to change the secret key pair that is used to authenticate to an existing MinIO Destination by sending a `PATCH` request to the `/system/outputs/{id}` endpoint. But first, you'll send a `GET` request to retrieve the definition for the Destination. The definition includes the attributes and values you'll need to include in the body of your `PATCH` request. > The `PATCH /system/outputs/{id}` endpoint requires a **complete** representation of the resource that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the resource. > > Also, the body for your `PATCH` request is based on the existing configuration that you [retrieve](#get-destination-definition), so you must confirm that the configuration is correct. If the existing configuration is incorrect, the updated resource may not function as expected. > {.box .warning} ### 1. Retrieve the Definition for the Destination {#get-destination-definition} Retrieve the definition for the Destination that you want to update. After you confirm that the retrieved definition is correct, you'll use it as the basis of your request in the next step, changing only the values that you want to update. In this example, the Destination ID is `MinIO_testing`. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Single-Instance)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` The response includes the definition of the `MinIO_testing` Destination as a JSON object: ```json { "items": [ { "id": "MinIO_testing", "systemFields": [ "cribl_pipe" ], "streamtags": [], "awsAuthenticationMethod": "secret", "stagePath": "$CRIBL_HOME/state/outputs/testing", "addIdToStagePath": true, "signatureVersion": "v4", "objectACL": "private", "reuseConnections": true, "rejectUnauthorized": true, "verifyPermissions": true, "removeEmptyDirs": true, "partitionExpr": "C.Time.strftime(_time ? _time : Date.now()/1000, '%Y/%m/%d')", "format": "json", "baseFileName": "`CriblOut`", "fileNameSuffix": "`.${C.env[\"CRIBL_WORKER_ID\"]}.${__format}${__compression === \"gzip\" ? \".gz\" : \"\"}`", "maxFileSizeMB": 32, "maxOpenFiles": 100, "headerLine": "", "writeHighWaterMark": 64, "onBackpressure": "block", "deadletterEnabled": false, "onDiskFullBackpressure": "block", "maxFileOpenTimeSec": 300, "maxFileIdleTimeSec": 30, "maxConcurrentFileParts": 4, "compress": "gzip", "compressionLevel": "best_speed", "emptyDirCleanupSec": 300, "type": "minio", "endpoint": "http://minio:9090", "bucket": "test", "awsSecret": "MinIO_testing_minio_secret_keypair", "status": { "health": "Green", "timestamp": 1742219848827, "metrics": { "openFileStreams": 0, "sentCount": 0, "bytesWritten": 0 } }, "notifications": [] } ], "count": 1 } ``` ### 2. Update the Destination Configuration {#update-destination-config} Use the response to the `GET /system/outputs/{id}` request from the previous step as the request body, with the following changes: - Do not include the `items` array or the `count` attribute from the `GET` response. - Replace the value for the `awsSecret` parameter with the name of the secret key pair that you want to use for the Destination. > Do not omit any fields from the resource representation in the request body. Include a complete representation of the resource, replacing only the values for the fields that you want to update. Cribl removes any omitted fields when updating the resource. > {.box .info} **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "MinIO_testing", "systemFields": [ "cribl_pipe" ], "streamtags": [], "awsAuthenticationMethod": "secret", "stagePath": "$CRIBL_HOME/state/outputs/testing", "addIdToStagePath": true, "signatureVersion": "v4", "objectACL": "private", "reuseConnections": true, "rejectUnauthorized": true, "verifyPermissions": true, "removeEmptyDirs": true, "partitionExpr": "C.Time.strftime(_time ? _time : Date.now()/1000, '%Y/%m/%d')", "format": "json", "baseFileName": "`CriblOut`", "fileNameSuffix": "`.${C.env[\"CRIBL_WORKER_ID\"]}.${__format}${__compression === \"gzip\" ? \".gz\" : \"\"}`", "maxFileSizeMB": 32, "maxOpenFiles": 100, "headerLine": "", "writeHighWaterMark": 64, "onBackpressure": "block", "deadletterEnabled": false, "onDiskFullBackpressure": "block", "maxFileOpenTimeSec": 300, "maxFileIdleTimeSec": 30, "maxConcurrentFileParts": 4, "compress": "gzip", "compressionLevel": "best_speed", "emptyDirCleanupSec": 300, "type": "minio", "endpoint": "http://minio:9090", "bucket": "test", "awsSecret": "MinIO_new_minio_secret_keypair", "status": { "health": "Green", "timestamp": 1742222265527, "metrics": { "openFileStreams": 0, "sentCount": 0, "bytesWritten": 0 } }, "notifications": [] }' ``` **On-Prem (Single-Instance)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "MinIO_testing", "systemFields": [ "cribl_pipe" ], "streamtags": [], "awsAuthenticationMethod": "secret", "stagePath": "$CRIBL_HOME/state/outputs/testing", "addIdToStagePath": true, "signatureVersion": "v4", "objectACL": "private", "reuseConnections": true, "rejectUnauthorized": true, "verifyPermissions": true, "removeEmptyDirs": true, "partitionExpr": "C.Time.strftime(_time ? _time : Date.now()/1000, '%Y/%m/%d')", "format": "json", "baseFileName": "`CriblOut`", "fileNameSuffix": "`.${C.env[\"CRIBL_WORKER_ID\"]}.${__format}${__compression === \"gzip\" ? \".gz\" : \"\"}`", "maxFileSizeMB": 32, "maxOpenFiles": 100, "headerLine": "", "writeHighWaterMark": 64, "onBackpressure": "block", "deadletterEnabled": false, "onDiskFullBackpressure": "block", "maxFileOpenTimeSec": 300, "maxFileIdleTimeSec": 30, "maxConcurrentFileParts": 4, "compress": "gzip", "compressionLevel": "best_speed", "emptyDirCleanupSec": 300, "type": "minio", "endpoint": "http://minio:9090", "bucket": "test", "awsSecret": "MinIO_new_minio_secret_keypair", "status": { "health": "Green", "timestamp": 1742222265527, "metrics": { "openFileStreams": 0, "sentCount": 0, "bytesWritten": 0 } }, "notifications": [] }' ``` **On-Prem (Distributed)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/outputs/MinIO_testing" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "MinIO_testing", "systemFields": [ "cribl_pipe" ], "streamtags": [], "awsAuthenticationMethod": "secret", "stagePath": "$CRIBL_HOME/state/outputs/testing", "addIdToStagePath": true, "signatureVersion": "v4", "objectACL": "private", "reuseConnections": true, "rejectUnauthorized": true, "verifyPermissions": true, "removeEmptyDirs": true, "partitionExpr": "C.Time.strftime(_time ? _time : Date.now()/1000, '%Y/%m/%d')", "format": "json", "baseFileName": "`CriblOut`", "fileNameSuffix": "`.${C.env[\"CRIBL_WORKER_ID\"]}.${__format}${__compression === \"gzip\" ? \".gz\" : \"\"}`", "maxFileSizeMB": 32, "maxOpenFiles": 100, "headerLine": "", "writeHighWaterMark": 64, "onBackpressure": "block", "deadletterEnabled": false, "onDiskFullBackpressure": "block", "maxFileOpenTimeSec": 300, "maxFileIdleTimeSec": 30, "maxConcurrentFileParts": 4, "compress": "gzip", "compressionLevel": "best_speed", "emptyDirCleanupSec": 300, "type": "minio", "endpoint": "http://minio:9090", "bucket": "test", "awsSecret": "MinIO_new_minio_secret_keypair", "status": { "health": "Green", "timestamp": 1742222265527, "metrics": { "openFileStreams": 0, "sentCount": 0, "bytesWritten": 0 } }, "notifications": [] }' ``` The response includes the definition of the `MinIO_testing` Destination with the updated `awsSecret` value: ```json { "items": [ { "id": "MinIO_testing", "systemFields": [ "cribl_pipe" ], "streamtags": [], "awsAuthenticationMethod": "secret", "stagePath": "$CRIBL_HOME/state/outputs/testing", "addIdToStagePath": true, "signatureVersion": "v4", "objectACL": "private", "reuseConnections": true, "rejectUnauthorized": true, "verifyPermissions": true, "removeEmptyDirs": true, "partitionExpr": "C.Time.strftime(_time ? _time : Date.now()/1000, '%Y/%m/%d')", "format": "json", "baseFileName": "`CriblOut`", "fileNameSuffix": "`.${C.env[\"CRIBL_WORKER_ID\"]}.${__format}${__compression === \"gzip\" ? \".gz\" : \"\"}`", "maxFileSizeMB": 32, "maxOpenFiles": 100, "headerLine": "", "writeHighWaterMark": 64, "onBackpressure": "block", "deadletterEnabled": false, "onDiskFullBackpressure": "block", "maxFileOpenTimeSec": 300, "maxFileIdleTimeSec": 30, "maxConcurrentFileParts": 4, "compress": "gzip", "compressionLevel": "best_speed", "emptyDirCleanupSec": 300, "type": "minio", "endpoint": "http://minio:9090", "bucket": "test", "awsSecret": "MinIO_new_minio_secret_keypair", "notifications": [], "status": { "health": "Green", "timestamp": 1742223031723, "metrics": { "openFileStreams": 0, "sentCount": 0, "bytesWritten": 0 } } } ], "count": 1 } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/copy-export-install-packs.md ############################################################ # Copy, Export, and Install Packs You can use the Cribl API to automate Pack operations, such as in a CI/CD pipeline, like [copying Packs](#copy-packs) between Worker Groups or Fleets and [exporting and installing Packs](#export-install-pack) from one Worker Group or Fleet to another. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/packs/__clone__`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > > In Cribl.Cloud and other distributed deployments, you must [commit and deploy](commit-deploy) the changes you make. > {.box .info} ## Copy Packs {#copy-packs} The Cribl API includes a `/packs/__clone__` endpoint for copying Packs from a Worker Group to one or more other Worker Groups. The following example demonstrates how to copy two Packs from the `default` Worker Group to the `newHerd` and `goatMob` Worker Groups. Provide the following values in the request body: * `srcGroup`: ID of the Worker Group that contains the Packs you want to copy. * `dstGroups`: Array of IDs of the target Worker Groups where you want to install the copied Packs. * `packs`: Array of IDs of the Packs you want to copy. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/packs/__clone__" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "srcGroup": "default", "dstGroups": [ "newHerd", "goatMob" ], "packs": [ "cribl-palo-alto-networks", "cribl-cisco-asa-cleanup" ] }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/packs/__clone__" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "source": "goatherd.a12b3Cd.crbl", "id": "billyPack" }' ``` The response is a JSON object that confirms the target Worker Groups where the copied Packs are installed, similar to this example: ```json { "installed": [ { "group": "newHerd" }, { "group": "goatMob" } ] } ``` If you copy Packs to only one Worker Group, the response includes details about the installed packs instead of the Worker Group, similar to this example: ```json { "installed": [ { "id": "cribl-palo-alto-networks", "source": "file:/opt/cribl/state/packs/cribl-palo-alto-networks.ABC12d3.tmp.crbl", "version": "1.1.2", "group": "defaultHybrid", "warnings": [] }, { "id": "cribl-cisco-asa-cleanup", "source": "file:/opt/cribl/state/packs/cribl-cisco-asa-cleanup.eF4G567.tmp.crbl", "version": "1.1.15", "warnings": [] } ] } ``` ## Export and Install a Pack {#export-install-pack} The following example demonstrates how to export a Pack from one Worker Group or Fleet and upload and install the Pack in another. The two Worker Groups or Fleets do **not** need to have the same Leader Node. ### 1. Export the Pack {#export-pack} The request URL should use the name of the Worker Group or Fleet from which you are exporting (in this example, `originalHerd`). Include the `mode` query parameter in the request URL to specify the [export mode](/stream/packs/#export-mode) you want to use. The request returns an octet-stream attachment that downloads as a `.crbl` file. This example uses the `>` redirect to write the exported Pack to a specific file (in this case, `goatherd.crbl`). If you do not include a redirect to specify a file name, Cribl downloads the Pack to a file that is named after the Pack ID in the format `${packName}.crbl`. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/originalHerd/packs/${packName}/export?mode=${exportMode}' > goatherd.crbl \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/originalHerd/packs/${packName}/export?mode=${exportMode}' > goatherd.crbl \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` ### 2. Upload the Exported Pack to the Target Worker Group or Fleet {#upload-exported-pack} In the request URL, make sure to use the name of the target Worker Group or Fleet (in this example, `newHerd`). Include the `filename` query parameter in the request URL to specify the file name of the exported Pack. Note the values for the custom headers `Accept-Encoding`, `Connection`, and `Content-Type`. **Cribl.Cloud and Hybrid** ```shell curl --request PUT \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/newHerd/packs?filename=goatherd.crbl" \ --header "Authorization: Bearer ${token}" \ --header "Accept-Encoding: gzip, deflate, br, zst" \ --header "Connection: keep-alive" \ --header "Content-Type: application/octet-stream" \ --data-binary '@goatherd.crbl' ``` **On-Prem** ```shell curl --request PUT \ --url "https://${hostname}:${port}/api/v1/m/newHerd/packs?filename=goatherd.crbl" \ --header "Authorization: Bearer ${token}" \ --header "Accept-Encoding: gzip, deflate, br, zst" \ --header "Connection: keep-alive" \ --header "Content-Type: application/octet-stream" \ --data-binary '@goatherd.crbl' ``` The response is a JSON object that includes the Pack name, a random ID, and the `crbl` file extension, similar to this example: ```json {"source":"goatherd.a12b3Cd.crbl"} ``` ### 3. Install the Uploaded Pack in the Target Worker Group or Fleet {#install-uploaded-pack} The request body must include the JSON object from the response to the upload request in the previous step. If you want to rename the Pack in the target Worker Group or Fleet, add the `id` parameter in the request body as shown in this example. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/newHerd/packs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "source": "goatherd.a12b3Cd.crbl", "id": "billyPack" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/newHerd/packs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "source": "goatherd.a12b3Cd.crbl", "id": "billyPack" }' ``` The response is a JSON object that provides information about the installed Pack, similar to this example: ```json { "items": [ { "id": "billyPack", "source": "file:/opt/cribl/state/packs/goatherd.a12b3Cd.crbl", "version": "0.0.1", "warnings": [] } ], "count": 1 } ``` ## Install a Pack from a Git Repository {#install-git-pack} If a Pack is hosted in a Git repository, you can install it directly from the repository. In the request body, prepend `git+` to the repository URL in the `source` parameter value. Use the `spec` parameter to specify the Git branch to install from. If you omit `spec`, Cribl uses the repository's default branch. The following example installs a Pack from the `main` branch of the specified GitHub repository and uses the `id` parameter to rename the Pack in the target Worker Group or Fleet. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/newHerd/packs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "source": "git+https://github.com/criblio/cribl_ocsf_postprocessing", "spec": "main", "id": "my-ocsf-pack" }' ``` **On-Prem** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/newHerd/packs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "source": "git+https://github.com/criblio/cribl_ocsf_postprocessing", "spec": "main", "id": "my-ocsf-pack" }' ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/create-update-lookups.md ############################################################ # Create and Update Lookups [Lookups](/stream/lookups-about/) provide a flexible way to enrich events en route to their Destinations. This topic demonstrates how to use the Cribl API to get a list of lookups and create and replace lookups. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/${groupName}/system/lookups`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > > In Cribl.Cloud and other distributed deployments, you must [commit and deploy](commit-deploy) the changes you make. > {.box .info} ## Get Existing Lookups {#get-lookups} Before creating or updating lookups, send a `GET` request to the `/system/lookups` endpoint to retrieve a list of existing lookups. Getting a list of existing lookups is helpful for validating data and streamlining subsequent requests. For example, checking whether a lookup already exists helps you avoid errors due to sending a request to create a duplicate lookup. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Single-Instance)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` The response is a JSON object that includes lookup file names and sizes, along with available information like modes, number of rows, descriptions, tags, and random version numbers for each lookup. The response also includes the total number of lookups, similar to this example: ```json {"items":[{"id":"host_destinations.csv","size":77824,"mode":"disk","description":"Host destination lookups","tags": "destinations","rows":935,"version":"56eFG5H6"},{"id":"service_names_port_numbers.csv","size":25146},{"id":"name_vendor_products.csv","size":6002}],"count":3} ``` ## Create a Lookup {#create-lookup} Follow these steps to use the Cribl API to create a lookup. ### 1. Upload the Lookup File {#upload-lookup-file} Include the `filename` query parameter in the request URL to specify the name of the lookup file you want to use (in this example, `lookupExample.csv`). The value for the custom header `Content-Type` is `text/csv`. **Cribl.Cloud and Hybrid** ```shell curl --request PUT \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/lookups?filename=lookupExample.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: text/csv" \ --data-binary '@${/path/to/file/lookupExample.csv}' ``` **On-Prem (Single-Instance)** ```shell curl --request PUT \ --url "https://${hostname}:${port}/api/v1/system/lookups?filename=lookupExample.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: text/csv" \ --data-binary '@${/path/to/file/lookupExample.csv}' ``` **On-Prem (Distributed)** ```shell curl --request PUT \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/lookups?filename=lookupExample.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: text/csv" \ --data-binary '@${/path/to/file/lookupExample.csv}' ``` The response is a JSON object that includes the lookup file name with a random ID and information about the file's number of rows and size, similar to this example: ```json {"filename":"lookupExample.csv.ABCDeFg.tmp","rows":1433,"size":23014} ``` ### 2. Create the Lookup {#create-lookup-from-upload} Send a `POST` request to the `/system/lookups` endpoint to create the lookup from the uploaded file. Provide the following values in the request body: * `id`: File name to use for the lookup. * `fileInfo.filename`: Value of the `filename` attribute from the response to the upload request in the previous step. This example creates a lookup that uses [in-memory file storage](/stream/lookups-about#storage-mode), which is the default. **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" } }' ``` **On-Prem (Single-Instance)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" } }' ``` **On-Prem (Distributed)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" } }' ``` The response is a JSON object that includes the lookup file name, a random version for the lookup, and the lookup size, similar to this example: ```json {"items":[{"id":"newLookup.csv","version":"12AbC3D4","size":23014}],"count":1} ``` To create a lookup that uses [disk-based file storage](/stream/lookups-about#storage-mode), include `"mode": "disk"` in the request body as follows: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" }, "mode": "disk" }' ``` **On-Prem (Single-Instance)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" }, "mode": "disk" }' ``` **On-Prem (Distributed)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup", "fileInfo": { "filename": "lookupExample.csv.ABCDeFg.tmp" }, "mode": "disk" }' ``` For disk-based lookups, the response includes `mode` and `pendingTask`, similar to this example: ```json {"items":[{"id":"newLookup.csv","mode":"disk","version":"12AbC3D4","pendingTask":{"id":"GuPdiPM8","type":"IMPORT"},"size":23014}],"count":1} ``` Read [Choose a Lookup File Storage Mode](/stream/lookups-about/#storage-mode) for more information about in-memory and disk-based lookups. ## Replace an Existing In-Memory Lookup {#replace-lookup} > This example replaces an in-memory lookup. For an example that replaces a disk-based lookup, see [Deploy Modified Disk-Based Lookups](#deploy-modified-lookup-files). For more information about the lookup modes, read [Choose a Lookup File Storage Mode](/stream/lookups-about/#storage-mode). {.box .info} To replace an existing in-memory lookup, first upload the new lookup file as described in step 1 of the [Create a Lookup](#create-lookup) instructions. Then, send a `PATCH` request to the `/system/lookups/{id}` endpoint. In the request URL, replace `{id}` with the file name of the lookup you want to replace. Provide the following values in the request body: * `id`: Value of the `id` attribute for the lookup, which you can get from the response to a request to [get existing lookups](#get-lookups). * `fileInfo.filename`: Value of the `filename` attribute from the response to the [upload request](#upload-lookup-file). In this example, the existing lookup is `newLookup.csv` and the `filename` value is `lookupUpdate.csv.1234aBcD.tmp`. **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/${groupName}/system/lookups/newLookup.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup.csv", "fileInfo": { "filename": "lookupUpdate.csv.1234aBcD.tmp" } }' ``` **On-Prem (Single-Instance)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/system/lookups/newLookup.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup.csv", "fileInfo": { "filename": "lookupUpdate.csv.1234aBcD.tmp" } }' ``` **On-Prem (Distributed)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/m/${groupName}/system/lookups/newLookup.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "newLookup.csv", "fileInfo": { "filename": "lookupUpdate.csv.1234aBcD.tmp" } }' ``` The response is a JSON object that includes the lookup file name, a random version for the lookup, and the lookup size, similar to this example: ```json {"items":[{"id":"newLookup.csv","version":"Xyz56789","size":200}],"count":1} ``` ## Deploy Modified Disk-Based Lookups {#deploy-modified-lookup-files} > This example deploys a modified disk-based lookup. For an example that replaces an in-memory lookup, see [Replace an Existing In-Memory Lookup](#replace-lookup). For more information about the lookup modes, read [Choose a Lookup File Storage Mode](/stream/lookups-about/#storage-mode). {.box .info} Manual updates are impractical for frequently modified disk-based lookup files. Instead, configure a workflow with the Cribl API to deploy modified lookup files to a Worker Group. You can deploy only the modified lookup file so that the updated data is accessible without restarting any Workers. When deploying lookup updates, remember that each deploy request must specify all lookups intended for the Workers. For example, if you initially deployed lookups A (version a1), B (version b1), and C (version c1), all three reside on the Workers. To update to a modified lookup C (version c2), the deploy request must include A (a1), B (b1), and C (c2). Omitting A and B in the update request for C (c2) will result in the Workers having only lookup C. In Distributed environments, we recommend updating the lookup file only on the Leader Node. The Leader then notifies Worker Nodes that a new configuration is available, and Worker Nodes pull the new configuration from the Leader Node. This example uses the following sequence of requests to Cribl API endpoints: 1. `GET /system/lookups` to [get a list of lookups](#confirm-lookup) to confirm that the lookup that you want to update exists. 2. `GET /system/lookups/{id}/content?raw=1` to [download the lookup file](#download-lookup) so that you can modify it. 3. `PUT /system/lookups?filename={id}` to [upload the modified lookup file](#upload-modified-lookup). 4. `PATCH /system/lookups/{id}` to [replace the existing lookup file](#replace-existing-lookup) with the modified version. 5. `GET /master/groups/{groupName}` to [get information](#get-info-modified-lookup) about the modified lookup file. 6. `PATCH /master/groups/{groupName}/deploy` to [selectively deploy the modified lookup file](#deploy-modified-lookup). The modified lookup file will propagate to the Worker Nodes that belong to the Worker Group. ### 1. Confirm that the Lookup Exists {#confirm-lookup} To prevent errors, get a list of the lookups that exist on the Worker Group so that you can confirm that the lookup that you want to modify is included. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/default/system/lookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` The response is a JSON object that lists the lookups, similar to this example: ```json {"items":[{"id":"newLookup.csv","size":23014,"version":"12AbC3D4"},{"id":"host_destinations.csv","size":77824,"mode":"disk","version":"56eFG5H6","rows":935,"indices":[{"fields":["service_name"],"caseSensitive":true}]},{"id":"service_names_port_numbers.csv","size":25146},{"id":"name_vendor_products.csv","size":6002}],"count":4} ``` This example uses the `host_destinations.csv` lookup, which is included in the list of lookups for the `default` Worker Group. ### 2. Download the Lookup File {#download-lookup} Download the lookup file so that you can modify it locally. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default/system/lookups/host_destinations.csv/content?raw=1" \ --header "Authorization: Bearer ${token}" \ --output 'host_destinations.csv' ``` **On-Prem (Distributed)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/default/system/lookups/host_destinations.csv/content?raw=1" \ --header "Authorization: Bearer ${token}" \ --output 'host_destinations.csv' ``` The client initiates a download of the lookup file. You may see a prompt to save the file, or the file may automatically download to a specified location, depending on your local browser settings. ### 3. Upload the Modified Lookup File {#upload-modified-lookup} After you modify the lookup file, upload it from its current location on the local machine. In this example, the lookup file `host_destinations.csv` is stored in the `/opt` directory. **Cribl.Cloud and Hybrid** ```shell curl --request PUT \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default/system/lookups?filename=host_destinations.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: text/csv" \ --data-binary '@/opt/host_destinations.csv' ``` **On-Prem (Distributed)** ```shell curl --request PUT \ --url "https://${hostname}:${port}/api/v1/m/default/system/lookups?filename=host_destinations.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: text/csv" \ --data-binary '@/opt/host_destinations.csv' ``` The response is a JSON object that includes the lookup file name with a random ID and information about the file's number of rows and size, similar to this example: ```json {"filename":"host_destinations.csv.ABCDeFg.tmp","rows":935,"size":77824} ``` ### 4. Replace the Existing Lookup File {#replace-existing-lookup} Replace the existing lookup file on the Worker Group with the modified lookup file that you uploaded. In the request URL, replace `{id}` with the file name of the lookup you're modifying. Provide the following values in the request body: * `id`: Value of the `id` attribute for the lookup from the response to the [confirm request in step 1](#confirm-lookup). * `fileInfo.filename`: Value of the `filename` attribute from the response to the [upload request in step 3](#upload-modified-lookup). * `mode`: The type of lookup (in this example, `disk`). **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default/system/lookups/host_destination.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "host_destination.csv", "fileInfo": { "filename": "host_destination.csv.ABCDeFg.tmp" }, "mode": "disk" }' ``` **On-Prem (Distributed)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/m/default/system/lookups/host_destination.csv" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "host_destination.csv", "fileInfo": { "filename": "host_destination.csv.ABCDeFg.tmp" }, "mode": "disk" }' ``` The response is a JSON object that includes information about the lookup file, similar to this example: ```json {"items":[{"id":"host_destination.csv","mode":"disk","version":"Xyz56789","size":78960,"pendingTask":{"id":"mNPQR456","type":"IMPORT"}}],"count":1} ``` ### 5. Get Information About the Modified Lookup File {#get-info-modified-lookup} Get the commit number, context, file name, and version number for the modified lookup file. The request URL includes the `fields` query parameter to ensure that the response includes this information. **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/master/groups/fields=git.log%2Cgit.commit%2Cgit.localChanges%2Clookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/master/groups/fields=git.log%2Cgit.commit%2Cgit.localChanges%2Clookups" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` The response is a JSON object, similar to the following example. In the response, find the `commit`, `lookupDeployments.context`, `lookupDeployments.lookups.file`, and `lookupDeployments.lookups.version` attributes. You will need the values for these attributes to [deploy the modified lookup file in step 6](#deploy-modified-lookup). ```json {"items":[{"onPrem":false,"estimatedIngestRate":1024,"provisioned":true,"streamtags":["default1"],"isFleet":false,"workerRemoteAccess":true,"isSearch":false,"description":"Default Worker Group","tags":"default","name":"default","configVersion":"27bbd48","cloud":{"provider":"aws","region":"us-west-2"},"lookupDeployments":[{"context":"cribl","lookups":[{"file":"host_destination.csv","version":"Xyz56789","deployedVersion":"56eFG5H6"}]}],"id":"default","git":{"localChanges":4,"log":[{"hash":"abcdefg1234567hijklmnop123456789qrstuv11","date":"2025-05-07 15:12:07 +0000","message":"default commit message","refs":"HEAD -> master","body":"","author_name":"Cribl Admin","author_email":"admin@cribl.cloud"},{"hash":"zyxwvut1234567srqponmlk123456789jihgfe11","date":"2025-04-30 22:34:58 +0000","message":"default commit message","refs":"","body":"","author_name":"Cribl Admin","author_email":"admin@cribl.cloud"}],"commit":"62aab48"}}],"count":1} ``` ### 6. Selectively Deploy the Modified Lookup File {#deploy-modified-lookup} Send a `PATCH` request to the `/master/groups/${groupName}/deploy` endpoint to selectively deploy the modified lookup file without restarting any Workers. In the request body, provide the following values from the response to the request in [step 5](#get-info-modified-lookup): * `version`: Value of the `commit` attribute. * `lookups.context`: Value of the `lookupDeployments.context` attribute. * `lookups.lookups.file`: Value of the `lookupDeployments.lookups.file`. * `lookups.lookups.version`: Value of the `lookupDeployments.lookups.version`. **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/master/groups/default/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "62aab48", "lookups": [ { "context": "cribl", "lookups": [ { "file": "host_destination.csv", "version": "Xyz56789" } ] } ] }' ``` **On-Prem (Distributed)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/master/groups/default/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "257cd56", "lookups": [ { "context": "cribl", "lookups": [ { "file": "host_destination.csv", "version": "Xyz56789" } ] } ] }' ``` The response is a JSON object that includes the lookup file name and its deployed version, similar to the following example: ```json {"items":[{"onPrem":false,"estimatedIngestRate":1024,"provisioned":true,"streamtags":["default1"],"isFleet":false,"workerRemoteAccess":true,"isSearch":false,"description":"Default Worker Group","tags":"default","name":"default","configVersion":"27bbd48","cloud":{"provider":"aws","region":"us-west-2"},"lookupDeployments":[{"context":"cribl","lookups":[{"file":"host_destination.csv","deployedVersion":"Xyz56789"}]}],"id":"default"}],"count":1} ``` You can deploy more than one modified lookup file in a single command. To do this, in your request body, add an object for each file. For example: **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/master/groups/default/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "257cd56", "lookups": [ { "context": "cribl", "lookups": [ { "file": "host_destination.csv", "version": "Xyz56789" }, { "file": "top_domains.csv", "version": "RsT45TUv" } ] }, { "context": "dbpack", "lookups": [ { "file": "service_names_port_numbers.csv", "version": "aBC123gH" } ] } ] }' ``` **On-Prem (Distributed)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/master/groups/default/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "257cd56", "lookups": [ { "context": "cribl", "lookups": [ { "file": "host_destination.csv", "version": "Xyz56789" }, { "file": "top_domains.csv", "version": "RsT45TUv" } ] }, { "context": "dbpack", "lookups": [ { "file": "service_names_port_numbers.csv", "version": "aBC123gH" } ] } ] }' ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/commit-deploy.md ############################################################ # Commit and Deploy Changes You can use the Cribl API to automate commit and deploy commands in [single-instance](#api-single-instance-commit) and [distributed deployments](#api-distributed-commit-deploy) and [commit a subset of configuration changes](#api-selective). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/version/commit`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Commit and Deploy in Single-Instance Deployments {#api-single-instance-commit} In single-instance deployments, you can commit and deploy changes with one API call to the `/version/commit` endpoint. The request body must contain the `message` parameter, whose value is a descriptive commit message. For example: **On-Prem (Single-Instance)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "automation@cribl:commit" }' ``` The response is a JSON object with details about the commit, similar to the following example: ```json {"items":[{"branch":"master","commit":"abcd1234efgh5678ijkl9101mnop1121qrst3141","root":false,"summary":{"changes":2,"insertions":63,"deletions":1},"files":{"modified":["local/cribl/auth/12345678910111.dat"],"created":["local/cribl/auth/users.json"]}}],"count":1} ``` ## Commit and Deploy in Distributed Deployments {#api-distributed-commit-deploy} In on-prem distributed deployments, use two separate API requests to commit and deploy changes to a specific Worker Group. Then, send a third API request to keep your Leader in sync with the Worker Group. ### 1. Commit Pending Changes to the Worker Group {#commit-pending-changes} Commit the pending changes to the desired Worker Group. The request body must include two parameters: * `message`: A descriptive commit message. * `group`: The name of the Worker Group. For example, to commit all pending changes to the `myGroup` Worker Group: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "automation@cribl:commit", "group": "myGroup" }' ``` **On-Prem (Distributed Deployment)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "automation@cribl:commit", "group": "myGroup" }' ``` The response is a JSON object with details about the commit, similar to the following example: ```json {"items":[{"branch":"master","commit":"abcd1234efgh5678ijkl9101mnop1121qrst3141","root":false,"summary":{"changes":3,"insertions":1003,"deletions":2},"files":{"modified":["groups/myGroup/default/cribl/collectors/myCollector/conf.ui-schema.json","groups/myGroup/default/cribl/functions/eventstats/conf.schema.json"],"created":["groups/myGroup/default/cribl/policies.yml"]}}],"count":1} ``` You'll need the `commit` value from the response, `abcd1234efgh5678ijkl9101mnop1121qrst3141`, for the deploy request in the next step. ### 2. Deploy Committed Changes {#deploy-committed-changes} Send a request to `PATCH /products/${productName}/groups/${groupId}$/deploy` to deploy the configuration changes that you committed to the Worker Group. The request body must include the `version` parameter, whose value is the `commit` value from the response in the previous step: **Cribl.Cloud and Hybrid** ```shell curl --request PATCH \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/products/stream/groups/myGroup/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "abcd1234efgh5678ijkl9101mnop1121qrst3141" }' ``` **On-Prem (Distributed Deployment)** ```shell curl --request PATCH \ --url "https://${hostname}:${port}/api/v1/products/stream/groups/myGroup/deploy" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "version": "abcd1234efgh5678ijkl9101mnop1121qrst3141" }' ``` The response is a JSON object similar to the following example: ```json {"items":[{"description":"My Worker Group","tags":"myTag","type":"stream","configVersion":"abcd1234efgh5678ijkl9101mnop1121qrst3141","lookupDeployments":[],"id":"myGroup"}],"count":1} ``` ### 3. Commit Changes to the Leader {#commit-changes-to-leader} To keep your Leader in sync with the Worker Group, commit your changes to the Leader. For example: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync myGroup and Leader" }' ``` **On-Prem (Distributed Deployment)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "Sync myGroup and Leader" }' ``` ## Selectively Commit Changes {#api-selective} To commit only a subset of configuration changes, send a request body similar to the following example to `POST /version/commit`. This example selectively commits a sample data file and the updated YAML listing of all sample files to the `default` Worker Group: **Cribl.Cloud and Hybrid** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "automation@cribl:commit", "group": "default", "files": [ "groups/default/cribl/saved-queries.json", "groups/default/local/cribl/samples.yml" ] }' ``` **On-Prem (Distributed Deployment)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/version/commit" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "message": "automation@cribl:commit", "group": "default", "files": [ "groups/default/cribl/saved-queries.json", "groups/default/local/cribl/samples.yml" ] }' ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/view-large-diffs.md ############################################################ # View Large Diffs For large diffs that have more than 1000 lines, the **Commit Changes** modal in the Cribl UI displays the message `Diff too big to be displayed.` Likewise, if you use the `GET /version/diff` or `GET /version/show` endpoints to retrieve a large diff, the response includes the `Diff too big to be displayed` message as well as `"isTooBig": true`. In these cases, you can add the `diffLineLimit` query parameter to your `GET /version/diff` or `GET /version/show` requests to retrieve large diffs. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Retrieve a Complete Large Diff {#get-complete-diff} Set the `diffLineLimit` query parameter to `0` for a `GET /version/diff` or `GET /version/show` request to disable the line limit and retrieve the complete diff. For example: **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Single Instance)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed Deployment)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` ## Specify the Number of Lines to Retrieve in a Large Diff {#specify-number-of-lines} To retrieve no more than a specific number of lines in a large diff, add the `diffLineLimit` query parameter to a `GET /version/diff` or `GET /version/show` request and specify the maximum number of lines to display. This example retrieves up to 5,000 lines of a large diff: **Cribl.Cloud and Hybrid** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Single Instance)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` **On-Prem (Distributed Deployment)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/query-health-endpoint.md ############################################################ # Query the Health Endpoint Each Cribl Stream, Cribl Edge, and Cribl Outpost instance exposes a `GET /health` endpoint that provides information about the status of the server. In the [global context](api#base-url-global), the server is the Leader or single-instance deployment. In the [host context](api#base-url-host), the server is the specified Worker or Edge Node. The endpoint does not aggregate server health across Nodes, so it does not support the Worker Group or Fleet context. Use the host context to check an individual Node. The `GET /health` endpoint is commonly used with a load balancer to support operational decision-making. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/health`. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Health checks on Outpost Nodes must use `http` instead of `https`. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Retrieve Server Status Information {#server-status} The following examples demonstrate requests to the `GET /health` endpoint in Cribl.Cloud/hybrid and on-prem deployments. Requests to `GET /health` in the [global context](api#base-url-global) do not require authentication. Requests to `GET /health` for a Worker or Edge Node ([host context](api#base-url-host)) are sent to the Leader, which proxies the call to the Node. These requests for a Node **do** require [authentication](api-auth) with a Bearer token to authorize the proxy. Replace the variables in the URL with the correct values for your deployment. **Cribl.Cloud and Hybrid (Global)** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/health" \ --header "accept: application/json" ``` **On-Prem (Global)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/health" \ --header "accept: application/json" ``` **Cribl.Cloud and Hybrid (Node)** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/w/${nodeId}/health" \ --header "Authorization: Bearer ${token}" \ --header "accept: application/json" ``` **On-Prem (Node)** ```shell curl --request GET \ --url "https://${hostname}:${port}/api/v1/w/${nodeId}/health" \ --header "Authorization: Bearer ${token}" \ --header "accept: application/json" ``` The response body is a JSON object similar to the following examples. The `status` value corresponds to the [HTTP status code](#interpret-status-codes) in the response header. Load balancers read the HTTP status code in the response header rather than parsing the response body. **Example Response (Global)** ```json { "status": "healthy", "startTime": 1700000000000, "overlay": { "state": "inactive" }, "role": "primary", "isCaptain": true } ``` **Example Response (Host)** ```json { "status": "healthy", "startTime": 1700003600000, "overlay": { "state": "inactive" }, "isCaptain": false } ``` ## Interpret HTTP Status Codes {#interpret-status-codes} In the response header, the `/health` endpoint returns one of the following HTTP status codes: | HTTP Status Code | Meaning | | ----------------------- | ------- | | 200 OK | The server is running. | | 420 Shutting Down | The server is in the process of shutting down or is in standby. | The HTTP status code `200 OK` is a healthy response but indicates only that the server is running. It does not mean that all of the instance's configured Sources are functioning correctly. Several HTTP-based Sources allow you to enable a Source-level health check endpoint in their **Advanced Settings**. See the documentation for each Source for more information. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-create-api-credentials.md ############################################################ # Create API Credentials with the Cribl API These code examples demonstrate how to use the [Cribl API](api) for the management plane to create two new API Credentials: one with the [**Admin** Role](#api-admin-all) at all levels and one with the [Editor Role at the product level on a single Workspace](#api-editor-one-workspace). To use these examples, you must first create an API Credential manually in the Cribl UI. This is necessary because Cribl API requests require a Bearer token, which you must generate using an existing API Credential. After you create the first API Credential, you can use it to retrieve a Bearer token to authenticate subsequent API requests, including this request to create a new API Credential. Read [Authenticate in Cribl.Cloud and Hybrid Deployments](api-auth#api-auth-cloud) to create an API Credential in the Cribl UI and retrieve a Bearer token. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > API Credentials are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. Cribl.Cloud Government does not support the management plane API. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Create an API Credential with Admin Role at All Levels {#api-admin-all} The following example creates an API Credential with **Admin** at all levels (Organization, all Workspaces, and all Cribl products in all Workspaces). For this request, you only need to specify `admin` as the Organization Role. The API Credential automatically [inherits](/iam/permissions#inheritance-org) the **Admin** Role at lower levels from the Organization-level Role. The example also includes the optional `ipAllowlist` body parameter to demonstrate how to restrict API access for the API Credential to a specific IPv4 CIDR range. Replace the placeholder value with your range. Omitting `ipAllowlist` allows access for all IPs. **Cribl.Cloud** ```shell curl --request POST \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/api-credentials" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "name": "Auto-Manage-Workspaces", "description": "Used for automated Workspace management", "enabled": true, "roles": { "organizationRole": "admin" }, "ipAllowlist": [ "203.0.113.0/24" ] }' ``` ## Create an API Credential with Product-Level Editor Role in One Workspace {#api-editor-one-workspace} The following example creates an API Credential with specific Roles at the Organization, Workspace, and product levels: - **User** on the [Organization](/iam/permissions#organization). - **User** on the `main` [Workspace](/iam/permissions#workspace). - **Editor** on all Cribl [products](/iam/permissions#product-perm) in the `main` Workspace. The example also includes the optional `ipAllowlist` body parameter to demonstrate how to restrict API access for the API Credential to a specific IPv4 CIDR range. Replace the placeholder value with your range. Omitting `ipAllowlist` allows access for all IPs. The Cribl API does not support configuring Roles for API Credentials at the resource level. For API Credentials that do not inherit resource-level Roles from higher levels, use the Cribl UI to [share Cribl Search resources](/search/sharing#share-datasets-dashboards) as needed. See inheritance details for [Dataset Providers and Datasets](/iam/permissions#search-dataset-perm), [Dashboards](/iam/permissions#inheritance-search-dashboards), and [Notebooks](/iam/permissions#inheritance-search-notebooks). **Cribl.Cloud** ```shell curl --request POST \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/api-credentials" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "name": "Product-Editor", "description": "Editor Role on all Cribl Products", "enabled": true, "roles": { "organizationRole": "user", "workspaces": [ { "workspaceId": "main", "workspaceRole": "user", "products": [ { "product": "stream", "role": "editor" }, { "product": "edge", "role": "editor" }, { "product": "search", "role": "editor" }, { "product": "lake", "role": "editor" } ] } ] }, "ipAllowlist": [ "203.0.113.0/24" ] }' ``` ## Store and Protect the Client Secret {#store-client-secret-api} The response includes the configuration details for the new API Credential, including the `clientId` and `clientSecret`. Use the `clientId` and `clientSecret` values in [requests to `https://login.cribl.cloud/oauth/token`](/api-auth#auth-request-example-api) to retrieve a Bearer token for the new API Credential for use in subsequent API requests. Responses for `GET` requests that retrieve API Credentials **do not** include `clientSecret`. Only responses for requests to `POST /api-credentials` include it. You must manually copy the `clientSecret` value into your secret storage or use automation to write it directly to a secrets manager. You cannot retrieve the `clientSecret` later. The `clientSecret` is sensitive information and should be kept private. ## Rotate API Credentials {#rotate-api-creds-api} The [management plane API Reference](/cribl-as-code/api-reference/management-plane/) documents endpoints to create, list, retrieve, update, and delete API Credentials. Any client that can call these endpoints can rotate credentials as needed. To rotate with the API: 1. Send a request to `POST /v1/organizations/{organizationId}/api-credentials` to create a new API Credential. Get the new `clientId` and `clientSecret` from the response. 1. Replace the old `clientId` and `clientSecret` values with the new values wherever they are used. 1. Confirm that the old `clientId` and `clientSecret` values are replaced and validate the new values. 1. Send a request to `DELETE /v1/organizations/{organizationId}/api-credentials/{id}` to delete the old API Credential. Rotate API Credentials on a schedule and when access requirements change to limit how long a credential is usable. Use one API Credential per integration with only the Roles that each integration requires. That way, rotating one credential does not affect other workloads or integrations that authenticate with other API Credentials. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/search-api-examples.md ############################################################ # Cribl Search API Code Examples Cribl Search API code examples demonstrate how to use the Cribl API directly to complete a task in Cribl Search. Each example describes the steps required to complete a specific task, identifies the endpoints to use, and provides example requests and responses. The API code examples complement our [API Reference](/api-reference/) and explain common usage scenarios for the Cribl API. If you want to automate an action in Cribl for which you can't find documentation, ask in the [Cribl Community `#docs` channel](https://cribl-community.slack.com/archives/C01BM8PU30V). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/default_search/search/jobs`. > > Cribl Search is available only on Cribl.Cloud, so these code examples do not include on-prem deployments. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The following Cribl Search API code examples are available: - [Search and Retrieve Results](search-results) - [Get Alerts for Search Results](get-alerts-search-results) ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-search-pack-lake-dataset.md ############################################################ # Add a Cribl Search Pack and Create a Lake Dataset with the Cribl API These code examples demonstrate how to use the Cribl API to [add a Cribl Search Pack](#add-search-pack-api) from the Cribl Packs Dispensary and [create a Lake Dataset](#create-lake-dataset-api). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/default_search/packs`. > > Cribl Search and Cribl Lake are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Add a Search Pack {#add-search-pack-api} This example adds the [Search Pack](/search/packs/) named [Cribl Search AWS VPC Flow Logs](https://packs.cribl.io/packs/cribl-search-aws-vpc-flow-logs) from the Cribl Packs Dispensary. It includes the Pack URL for Cribl Search AWS VPC Flow Logs, which is used as the value of the `source` parameter. To get the URL for a different Pack, see [Get the URL for a Search Pack](#get-pack-url). **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/packs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "cribl-search-aws-vpc-flow-logs", "source": "https://packs.cribl.io/dl/cribl-search-aws-vpc-flow-logs/0.1.1/cribl-search-aws-vpc-flow-logs-0.1.1.crbl" }' ``` ## Create a Lake Dataset {#create-lake-dataset-api} This example creates a [Lake Dataset](/lake/datasets/) in the `default` lake with a basic configuration: Dataset ID, Cribl Lake [storage location](/lake/storage-locations/), retention period of 30 days, and [Direct Access (HTTP)](/lake/direct-access-http/) disabled. **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/products/lake/lakes/default/datasets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "aws-vpc-flow-logs-dataset", "storageLocationId": "cribl_lake", "retentionPeriodInDays": 30, "httpDAUsed": false }' ``` ## Get the URL for a Search Pack {#get-pack-url} To add a Search Pack from the [Cribl Packs Dispensary](https://packs.cribl.io/) or the [Dispensary GitHub Repository](https://github.com/criblpacks), provide the Pack URL as the value for the `source` parameter in your request. The URL must be the direct URL location of the `.crbl` file for the Pack. Read [Pack Repositories](/stream/packs/#pack-repositories) to learn about the differences between the Cribl Packs Dispensary and the Dispensary GitHub Repository. Here's how to get a Pack's URL from the Cribl Packs Dispensary: 1. Search the [Cribl Packs Dispensary](https://packs.cribl.io/) to find the Pack that you want to add. Select the Pack's tile to open the Pack sidebar. 1. Open the developer tools for your browser and select the **Network** tab. 1. At the upper-right of the Pack sidebar, select the download icon. 1. In your browser's developer tools, in the **Name** column, select the entry for the Pack's `.crbl` file and the **Headers** tab. Copy the **Request URL**: the copied URL is the value to provide for the `source` parameter in your request. ![Location of Pack URL in Browser's Developer Tools](pack_url_pack_dispensary.png) {scale="75%" border="true"} To get a Pack's URL from the Dispensary GitHub Repository: 1. Search the [Dispensary GitHub Repository](https://github.com/criblpacks) to find the repository for the Pack that you want to add. Select the Pack's repository to open it. 1. In the right sidebar, select **Releases**. 1. On the **Releases** page, find the release that you want to use and expand the **Assets** section. 1. In the **Assets** section, find the `.crbl` file for the Pack. Right-click the `.crbl` file and select the option to copy the link. The copied link URL is the value to provide for the `source` parameter in your request. ![Location of `.crbl` File Link to Use as the Pack URL](pack_url_dispensary_github.png) {scale="85%" border="true"} ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/search-results.md ############################################################ # Search and Retrieve Results Use the Cribl API to execute searches and retrieve Cribl Search results so that you can automate operations. Applications include triggering alerts based on specific search results and aggregating data for reporting purposes. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/default_search/search/jobs`. > > Cribl Search is available only on Cribl.Cloud, so these code examples do not include on-prem deployments. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Execute a Search and Retrieve the Results {#execute-get-results} This example demonstrates how to use the Cribl API to execute a search, optionally confirm that the search is complete, and retrieve the Cribl Search results. ### 1. Execute the Search {#execute-search} Define your search in the request body. See [Build a Search](/search/build-a-search) and the `POST /search/jobs` endpoint in the [API Reference](/api-reference) for more information about Cribl Search query options. In this example, the request body includes: * `query` (required): The search query string, with escaped quotes around the Dataset name. In API requests, always begin the query with the `cribl` operator. The query must be a single line. This example retrieves the first 1,000 records in the `goatherd_sample_dataset` Dataset. * `earliest` (optional): Beginning of query [time range](/search/cribl/#time-syntax). This example retrieves results only for the last hour. * `latest` (optional): End of query [time range](/search/cribl/#time-syntax). This example retrieves results up to the current time. * `sampleRate` (optional): Ratio to use to reduce the number results. In this example, the search query will return all matching records from the Dataset, up to the 1,000-record limit, without excluding any data based on [sampling](/search/build-a-search/#sampling). **Cribl.Cloud** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "query": "cribl dataset=\"goatherd_sample_dataset\" | limit 1000", "earliest": "-1h", "latest": "now", "sampleRate": 1 }' ``` The response is a JSON object with details about the Cribl Search job, similar to the following example. The response includes the job's `id`, which you need for your requests to check the search status and retrieve the Cribl Search results in subsequent steps. ```json { "items": [ { "query": "cribl dataset=\"goatherd_sample_dataset\" | limit 1000", "earliest": "-1h", "latest": "now", "sampleRate": 1, "user": "google-oauth2|12345678910111EXAMPLE", "displayUsername": "Alex Smith", "isPrivate": true, "group": "default_search", "id": "1349305736255.Acp7er", "timeCreated": 1744114795547, "internal": { "email": "asmith@goatherd.io", "roles": [ "org_owner", "ws_owner" ], [...] } } ] } ``` ### 2. Confirm that the Search Is Complete (Optional) {#confirm-complete} The search must have enough time to finish before you can retrieve the results. Confirm the status of the search by sending a request to the `GET /search/jobs/${id}/status` endpoint. In your request URL, use the `id` value from the response in [step 1](#execute-search) as demonstrated in this example. **Cribl.Cloud** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs/1349305736255.Acp7er/status" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" ``` The response is a JSON object that includes a `status` attribute, similar to the following example. If the `status` value is `completed`, the search is complete. ```json {"items":[{"status":"completed","timeStarted":1744114795547,"timeCreated":1744114795066,"timeCompleted":1744114801517,"timeNow":1744115261804,"cacheStatusesByStageId":{"root":{"goatherd_sample_dataset":{"usedCache":false,"reason":"Not a Lake Dataset"}}}}],"count":1} ``` ### 3. Retrieve the Search Results {#retrieve-results} When the search is complete, send a request to the `GET /search/jobs/${id}/results` endpoint to retrieve the Cribl Search results. For the `Content-Type` header, specify Newline Delimited JSON (`x-ndjson`) so that the response lists the search results as individual JSON objects separated by newlines. In your request URL, use the `id` value from the response in [step 1](#execute-search). Your request also must include the `limit` query parameter to specify the maximum number of records to return in the response. You can provide any value for `limit`, but it may be impractical to retrieve all records at once. Instead, you can send multiple requests that use `limit` with the optional `offset` query parameter to paginate the response into more manageable batches. The `offset` specifies the starting point from which to return records. For example, if you want to retrieve 100 results per page, set the `limit` value to `100` and the `offset` value to `0` in your first request, as shown below. Then, in subsequent requests, continue incrementing the `offset` value until you retrieve all of the search results. **Cribl.Cloud** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs/1349305736255.Acp7er/results?limit=100&offset=0" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/x-ndjson" ``` The response is a NDJSON object that contains the first 100 search results. ```json {"isFinished":true,"limit":10,"offset":0,"persistedEventCount":1000,"totalEventCount":1000,"job":{"id":"1349305736255.Acp7er","query":"cribl dataset=\"goatherd_sample_dataset\" | limit 1000","earliest":"-1h","latest":"now","timeCreated":1744114795066,"timeStarted":1744114795547,"timeCompleted":1744114801517,"status":"completed"}} {"dataset":"goatherd_sample_dataset","_raw":"2 847602856271 eni-4tjvafdk47gjasdsg 52.15.47.93 10.0.0.89 6000 443 6 9 9288 1744114734 1744114739 ACCEPT OK","source":"s3://goatherd-search-example/data/goatlogs/2025/04/08/12/Goats-5cWrf3.1.raw.gz","dataSource":"goatlogs","version":"2","account_id":"847602856271","interface_id":"eni-4tjvafdk47gjasdsg","srcaddr":"52.15.47.93","dstaddr":"10.0.0.89","srcport":"6000","dstport":"443","protocol":"6","packets":"9","bytes":"9288","start":"1744114734","end":"1744114739","action":"ACCEPT","log_status":"OK","_time":1744114734,"datatype":"aws_vpcflow"} {"dataset":"goatherd_sample_dataset","_raw":"2 847602856271 eni-9rgj38dgk83h59djt 189.16.1.201 10.8.90.121 2083 53 6 13 2431 1744114731 1744114738 ACCEPT OK","source":"s3://goatherd-search-example/data/goatlogs/2025/04/08/12/Goats-5cWrf3.1.raw.gz","dataSource":"goatlogs","version":"2","account_id":"847602856271","interface_id":"eni-9rgj38dgk83h59djt","srcaddr":"189.16.1.201","dstaddr":"10.8.90.121","srcport":"2083","dstport":"53","protocol":"6","packets":"13","bytes":"2431","start":"1744114731","end":"1744114738","action":"ACCEPT","log_status":"OK","_time":1744114731,"datatype":"aws_vpcflow"} {"dataset":"goatherd_sample_dataset","_raw":"2 847602856271 eni-0bjag724hdfh8sdfk 10.5.46.358 54.266.152.25 2002 8080 6 45 13545 1744114724 1744114730 ACCEPT OK","source":"s3://goatherd-search-example/data/goatlogs/2025/04/08/12/Goats-Vx67Pn.2.raw.gz","dataSource":"goatlogs","version":"2","account_id":"847602856271","interface_id":"eni-0bjag724hdfh8sdfk","srcaddr":"10.5.46.358","dstaddr":"54.266.152.25","srcport":"2002","dstport":"8080","protocol":"6","packets":"45","bytes":"13545","start":"1744114724","end":"1744114730","action":"ACCEPT","log_status":"OK","_time":1744114724,"datatype":"aws_vpcflow"} {...} ``` To retrieve the next 100 results, send a second request with the `offset` value set to `100` to skip the first 100 records that you already retrieved. For example, the following request will retrieve results 101 through 200. **Cribl.Cloud** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/search/jobs/1349305736255.Acp7er/results?limit=100&offset=100" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/x-ndjson" ``` To retrieve the next 100 results, send a third request with the `limit` set to `100` and the `offset` set to `200` to skip the first 200 records. Continue sending requests with the `offset` value incremented by 100 until you retrieve all of the search results. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/get-alerts-search-results.md ############################################################ # Get Alerts for Search Results Use the Cribl API to configure a Notification target and Notification so that you can receive alerts based on the results of a [scheduled search](/search/scheduled-searches/). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > In Cribl.Cloud Government, use `cribl-gov.cloud` in request URLs instead of `cribl.cloud`. For example, `https://${workspaceName}-${organizationId}.cribl-gov.cloud/api/v1/m/notification-targets`. > > Cribl Search is available only on Cribl.Cloud, so these code examples do not include on-prem deployments. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Create a Notification Target {#create-target} To receive alerts when a [scheduled search](/search/scheduled-searches/) generates results that match the triggering conditions that you specify, you need a [Notification target](/search/notifications/#targets) to send alerts to. Once created, Notification targets are available across Cribl products. If you want to use the default System Messages target or an existing target, you can [create a Notification](#send-alerts) without adding a new Notification target. ### Amazon SNS Notification Target (Topic ARN) {#create-amazonsns-topicarn-target} This example creates an Amazon SNS Notification target for sending Notifications to an [Amazon Simple Notification Service (SNS) topic](https://aws.amazon.com/sns/). You can also configure Amazon SNS targets to [send text messages (SMS)](#create-amazonsns-phone-target) to a phone number. The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **Amazon SNS Example (Topic ARN)** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "amazonsns_topicarn_hourly", "type": "sns", "destinationType": "topic", "topicArn": "arn:aws:sns:us-east-1:123456789012:topicEXAMPLE", "topicType": "fifo", "messageGroupId": "https://host:port/myQueue-${C.vars.myVar}", "region": "us-east-2", "awsAuthenticationMethod": "auto", "enableAssumeRole": true, "assumeRoleArn": "arn:aws:iam::123456789012:role/roleEXAMPLE", "assumeRoleExternalId": "externalId12345", "durationSeconds": 3600, "systemFields": [ "cribl_host", "cribl_pipe" ], "maxRetries": 2, "endpoint": "https://sns.us-east-1.amazonaws.com", "signatureVersion": "v4", "reuseConnections": true, "rejectUnauthorized": true, "onBackPressure": "drop" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | A unique ID for the Notification target. Immutable. | `type` (required) | The Notification target type (`sns`). | | `destinationType` (required) | Type of destination to use for the target (`topic` or `phoneNumber`). | | `topicArn` (required) | [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) of the [Amazon SNS topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) to which you want to send Notifications. Use the format `arn:aws:sns:region:account-id:MyTopic`. | | `topicType` (optional) | Type of the topic selected in AWS SNS: `fifo` (default) or `standard`. Required for `topic` destination type. | | `messageGroupId` (optional) | The tag that specifies that a message belongs to a specific [message group](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-grouping.html). Must be a JavaScript expression (which can evaluate to a constant value). Required for `fifo` topic type. | | `region` (required) | [Region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html#Concepts.RegionsAndAvailabilityZones.Regions) associated with the Amazon S3 bucket | | `awsAuthenticationMethod` (required) | [AWS authentication method](/search/aws-sns-notification-targets/#authentication) to use: `auto` (default) or `manual`. Specify `auto` to use IAM roles. If you specify `manual`, you must also provide an `awsApiKey` and `awsSecretKey`. | | `awsApiKey` (optional) | AWS access key. Required for `manual` authentication. | | `awsSecretKey` (optional) | AWS secret key. Required for `manual` authentication. | | `enableAssumeRole` (optional) | If `true`, specify an IAM role to use (`assumeRoleArn`) instead of automatically detecting one locally. | | `assumeRoleArn` (optional) | Amazon Resource Name (ARN) of the IAM role to assume. Required if `enableAssumeRole` is set to `true`. | | `assumeRoleExternalId` (optional) | External ID to use when assuming role. Required only when assuming a role that requires the external ID to delegate [third-party access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html). | | `durationSeconds` (optional) | Duration of the assumed IAM role's session, in seconds. Minimum is `900` (15 minutes), default is `3600` (1 hour), and maximum is `43200` (12 hours). | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `maxRetries` (optional) | Maximum number of retries before the output returns an error. Retries use an exponential backoff policy: a value of 2 means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `endpoint` (optional) | SNS service endpoint. If empty, defaults to AWS Region-specific endpoint. | | `signatureVersion` (optional) | Signature version to use for signing SNS requests: `v2` or `v4` (default). | | `reuseConnections` (optional) | If `true` (default), reuse connections between requests. | | `rejectUnauthorized` (optional) | If `true` (default), reject certificates that cannot be verified against a valid Certificate Authority (for example, self-signed certificates). | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "amazonsns_topicarn_hourly", "type": "sns", "destinationType": "topic", "topicArn": "arn:aws:sns:us-east-1:123456789012:topicEXAMPLE", "topicType": "fifo", "messageGroupId": "https://host:port/myQueue-${C.vars.myVar}", "region": "us-east-2", "awsAuthenticationMethod": "auto", "enableAssumeRole": true, "assumeRoleArn": "arn:aws:iam::123456789012:role/roleEXAMPLE", "assumeRoleExternalId": "externalId12345", "durationSeconds": 3600, "systemFields": [ "cribl_host", "cribl_pipe" ], "maxRetries": 2, "endpoint": "https://sns.us-east-1.amazonaws.com", "signatureVersion": "v4", "reuseConnections": true, "rejectUnauthorized": true, "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757616403250, "metrics": { "totalSent": 0, "errorCnt": 0 } } } ], "count": 1 } ``` ### Amazon SNS Notification Target (Phone Number) {#create-amazonsns-phone-target} This example creates an Amazon SNS Notification target for sending text message (SMS) Notifications to a phone number. You can also configure a target that uses the [Amazon Simple Notification Service (SNS) topic](#create-amazonsns-topicarn-target) instead. The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **Amazon SNS Example (Phone Number)** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "amazonsns_phone_hourly", "type": "sns", "destinationType": "phoneNumber", "region": "us-east-2", "phoneNumber": "+15555550123", "allowlist": [ "+15555550***" ], "awsAuthenticationMethod": "auto", "enableAssumeRole": false, "systemFields": [ "cribl_host", "cribl_pipe" ], "maxRetries": 2, "endpoint": "https://sns.us-east-1.amazonaws.com", "signatureVersion": "v4", "reuseConnections": true, "rejectUnauthorized": true, "onBackpressure": "drop" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | A unique ID for the Notification target. Immutable. | `type` (required) | The Notification target type (`sns`). | | `destinationType` (required) | Type of destination to use for the target (`topic` or `phoneNumber`). | | `region` (required) | [Region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html#Concepts.RegionsAndAvailabilityZones.Regions) associated with the Amazon S3 bucket | | `phoneNumber` (required) | Default phone number to use if the Notification event does not specify a `__phoneNumber` field. The phone number must be included in the `allowlist`. | | `allowlist` (required) | Wildcard-enabled list of phone numbers that are permitted to receive SMS Notifications. | | `awsAuthenticationMethod` (required) | [AWS authentication method](/search/aws-sns-notification-targets/#authentication) to use: `auto` (default) or `manual`. Specify `auto` to use IAM roles. If you specify `manual`, you must also provide an `awsApiKey` and `awsSecretKey`. | | `awsApiKey` (optional) | AWS access key. Required for `manual` authentication. | | `awsSecretKey` (optional) | AWS secret key. Required for `manual` authentication. | | `enableAssumeRole` (optional) | Set to `false` for `phoneNumber` destination type. | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `maxRetries` (optional) | Maximum number of retries before the output returns an error. Retries use an exponential backoff policy: a value of 2 means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `endpoint` (optional) | SNS service endpoint. If empty, defaults to AWS Region-specific endpoint. | | `signatureVersion` (optional) | Signature version to use for signing SNS requests: `v2` or `v4` (default). | | `reuseConnections` (optional) | If `true` (default), reuse connections between requests. | | `rejectUnauthorized` (optional) | If `true` (default), reject certificates that cannot be verified against a valid Certificate Authority (for example, self-signed certificates). | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "amazonsns_phone_hourly", "type": "sns", "destinationType": "phoneNumber", "region": "us-east-2", "phoneNumber": "+15555550123", "allowlist": [ "+15555550***" ], "awsAuthenticationMethod": "auto", "enableAssumeRole": false, "systemFields": [ "cribl_host", "cribl_pipe" ], "maxRetries": 2, "endpoint": "https://sns.us-east-1.amazonaws.com", "signatureVersion": "v4", "reuseConnections": true, "rejectUnauthorized": true, "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757619679949, "metrics": { "totalSent": 0, "errorCnt": 0 } } } ], "count": 1 } ``` ### Email Notification Target {#create-email-target} This example creates an email Notification target that uses the SMTP server of your choice. The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **Email Example** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "email_hourly", "type": "smtp", "host": "smtp.companydomain.com", "port": 587, "from": "notifications@companydomain.com", "encryptionOption": "STARTTLS", "tls": { "rejectUnauthorized": true, "minVersion": "TLSv1.2", "maxVersion": "TLSv1.3" }, "systemFields": [ "cribl_host", "cribl_pipe" ], "username": "notificationserviceacct", "password": "serviceacctpassword", "onBackpressure": "drop" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | A unique ID for the Notification target. Immutable. | `type` (required) | The Notification target type (for email targets, `smtp`). | | `host` (required) | SMTP server hostname/DNS name or IP address. | | `port` (required) | SMTP port (typically set to `587` or `25`). | | `from` (required) | Sender email address. | | `encryptionOption` (required) | Encryption type to secure SMTP communication.

- `STARTTLS`: Start the connection as plain text, then upgrade to TLS encryption if the server supports it
- `STARTTLS_REQUIRED`: Require TLS
- `TLS`: Use an encrypted connection from the start without requiring a subsequent connection upgrade
- `NONE`: Use a plain text connection | | `tls.rejectUnauthorized` (optional) | If `true` (default), reject certificates that cannot be verified against a valid Certificate Authority (for example, self-signed certificates). Do not include if you specify encryption option `NONE`. | | `tls.minVersion` (optional) | Minimum TLS version to use when connecting (`TLSv1.2` or `TLSv1.3`). Do not include if you specify encryption option `NONE`. | | `tls.maxVersion` (optional) | Maximum TLS version to use when connecting (`TLSv1.2` or `TLSv1.3`). Do not include if you specify encryption option `NONE`. | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `username` (optional) | Authentication principal (if required). | | `password` (optional) | Authentication credential (if required). | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "email_hourly", "type": "smtp", "host": "smtp.companydomain.com", "port": 587, "from": "notifications@companydomain.com", "encryptionOption": "STARTTLS", "tls": { "rejectUnauthorized": true, "minVersion": "TLSv1.2", "maxVersion": "TLSv1.3" }, "systemFields": [ "cribl_host", "cribl_pipe" ], "username": "notificationserviceacct", "password": "serviceacctpassword", "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757620318311, "metrics": { "totalSent": 0, "errorCnt": 0 } } } ], "count": 1 } ``` ### PagerDuty Notification Target {#create-pagerduty-target} This example creates a [PagerDuty](https://developer.pagerduty.com/docs) Notification target that uses the Cribl Search native integration with the PagerDuty API. The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **PagerDuty Example** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "pagerduty_hourly", "type": "pager_duty", "routingKey": "abc123def456ghi789jkl0123EXAMPLE", "group": "ops", "class": "infrastructure", "component": "search", "severity": "info", "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "systemFields": [ "cribl_host", "cribl_pipe" ], "onBackpressure": "queue" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | A unique ID for the Notification target. Immutable. | `type` (required) | The Notification target type (`pager_duty`). | | `routingKey` (required) | Your 32-character Integration key on a PagerDuty service or global ruleset. | | `group` (optional) | PagerDuty default group to assign to Notifications. | | `class` (optional) | PagerDuty default class to assign to Notifications. | | `component` (optional) | PagerDuty default component value to assign to Notification events (default is `logstream`). | | `severity` (optional) | Default message severity for events sent to PagerDuty: `info` (default), `error`, `warning`, and `critical`. | | `responseHonorRetryAfterHeader` (optional) | Set to `true` to honor any `Retry-After` header that specifies a delay in seconds after the retry request (limited to 180 seconds). If `false`, ignore all `Retry-After` headers. | `responseRetrySettings.httpStatus` (optional) | HTTP response status code that will trigger retries. This Notification target example is configured to retry for `429` and `503` HTTP response status codes. | | `responseRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff. Maximum is 600,000 ms (10 minutes). | | `responseRetrySettings.backoffRate` (optional) | Base for exponential backoff. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `responseRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `timeoutRetrySettings.timeoutRetry` (optional) | Set to `true` to retry timed-out HTTP requests. | `timeoutRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff for timeout retries. Maximum is 600,000 ms (10 minutes). | | `timeoutRetrySettings.backoffRate (optional)` | Base for exponential backoff for timeout retries. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `timeoutRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply for timeout retries, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "pagerduty_hourly", "type": "pager_duty", "routingKey": "abc123def456ghi789jkl0123EXAMPLE", "group": "ops", "class": "infrastructure", "component": "search", "severity": "info", "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "systemFields": [ "cribl_host", "cribl_pipe" ], "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757620783602, "metrics": { "numBytesInBuffer": 0, "numEventsInBuffer": 0, "concurrentRequests": 0, "lastFlushTime": 1757620783560, "sentCount": 0, "bytesOut": 0, "numDropped": 0, "parseErrorCount": 0, "retryBufferCount": 0 } } } ], "count": 1 } ``` ### Slack Notification Target {#create-slack-target} This example creates a Slack Notification target that uses Slack's [incoming webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/). The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **Slack Example** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "slack_hourly_webhook", "type": "slack", "url": "https://hooks.slack.com/services/12345678910/1234ABCD567/eFGH10987654321JkEXAMPLE", "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "systemFields": [ "cribl_host", "cribl_pipe" ], "onBackpressure": "drop" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | A unique ID for the Notification target. Immutable. | | `type` (required) | The Notification target type (`slack`). | | `url` (required) | The incoming webhook URL. | | `responseHonorRetryAfterHeader` (optional) | Set to `true` to honor any `Retry-After` header that specifies a delay in seconds after the retry request (limited to 180 seconds). If `false`, ignore all `Retry-After` headers. | | `responseRetrySettings.httpStatus` (optional) | HTTP response status code that will trigger retries. This Notification target example is configured to retry for `429` and `503` HTTP response status codes. | | `responseRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff. Maximum is 600,000 ms (10 minutes). | | `responseRetrySettings.backoffRate` (optional) | Base for exponential backoff. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `responseRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `timeoutRetrySettings.timeoutRetry` (optional) | Set to `true` to retry timed-out HTTP requests. | | `timeoutRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff for timeout retries. Maximum is 600,000 ms (10 minutes). | | `timeoutRetrySettings.backoffRate` (optional) | Base for exponential backoff for timeout retries. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `timeoutRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply for timeout retries, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "slack_hourly_webhook", "type": "slack", "url": "https://hooks.slack.com/services/12345678910/1234ABCD567/eFGH10987654321JkEXAMPLE", "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "systemFields": [ "cribl_host", "cribl_pipe" ], "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757621082705, "metrics": { "numBytesInBuffer": 0, "numEventsInBuffer": 0, "concurrentRequests": 0, "lastFlushTime": 1757621082657, "sentCount": 0, "bytesOut": 0, "numDropped": 0, "parseErrorCount": 0, "retryBufferCount": 0 } } } ], "count": 1 } ``` ### Webhook Notification Target {#create-webhook-target} This example creates a webhook Notification target that applies a custom format to Notification events before sending them. The response is a JSON object that includes the Notification target configuration and a `status` object that lists the target's health and metrics. **Webhook Example** ```shell curl --request POST \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/notification-targets" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "webhook_hourly", "type": "webhook", "url": "https://companydomain.com/api/webhooks/search-results", "method": "POST", "format": "custom", "customSourceExpression": "__httpOut", "customDropWhenNull": false, "customEventDelimiter": "\n", "customContentType": "application/x-ndjson", "customPayloadExpression": "`${events}`", "authType": "token", "token": "4f3e2d1c9b8a7e6f5d4c3b2aEXAMPLE", "systemFields": [ "cribl_host", "cribl_pipe" ], "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "rejectUnauthorized": true, "useRoundRobinDns": true, "compress": true, "keepAlive": true, "timeoutSec": 30, "concurrency": 5, "maxPayloadSizeKB": 4096, "maxPayloadEvents": 0, "flushPeriodSec": 1, "extraHttpHeaders": [ { "name": "User-Agent", "value": "Cribl Search" } ], "failedRequestLoggingMode": "payloadAndHeaders", "safeHeaders": [ "User-Agent", "Content-Type" ], "onBackpressure": "drop" }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | Unique ID for the Notification target. Immutable. | | `type` (required) | The Notification target type (`webhook`). | | `url` (required) | Endpoint that should receive Notification events. | | `method` (optional) | Method to use when sending Notification events: `POST` (default), `PUT`, or `PATCH`. | | `format` (optional) | Format to apply to Notification events before sending them to the endpoint: `ndjson` (default), `json_array`, `custom`, or `advanced`.

If you specify `custom`, also include `customSourceExpression`, `customDropWhenNull`, `customEventDelimiter`, `customContentType`, and `customPayloadExpression`.

If you specify `advanced`, also include `advancedContentType`, `formatEventCode`, and `formatPayloadCode`. | | `customSourceExpression` (optional) | JavaScript [expression](/search/webhook-notification-targets/#fields) whose evaluation shapes the Notification event that is sent to the endpoint (for example, `notification=${_raw}`). If empty, Cribl sends the full Notification event as stringified JSON. | | `customDropWhenNull` (optional) | If `true`, Cribl drops events when `customSourceExpression` evaluates to `null`. Use for `custom` format. | | `customEventDelimiter` (optional) | Delimiter string to insert between individual events. Default is `\n`. Use for `custom` format. | | `customContentType` (optional) | Content type to use for the request. Default is `application/x-ndjson`. Any content types set in `extraHttpHeaders` will override this entry. Use for `custom` format. | | `customPayloadExpression` (optional) | Expression that specifies how to format the payload for each batch. Defines a wrapper object in which to include formatted events. To reference the events to send, use the `${events}` variable (for example, `{"items" : [${events}] }`). Use for `custom` format. | | `advancedContentType` (optional) | Content type to use for the request. Default is `application/json`. Any content types set in `extraHttpHeaders` will override this entry. Use for `advanced` format. | | `formatEventCode` (optional) | Custom JavaScript code to format incoming event data accessible through the `__e` variable. The formatted content is added to `(__e['__eventOut'])` if available. Otherwise, the original event is serialized as JSON. **CAUTION: This function is evaluated in an unprotected context, allowing you to execute almost any JavaScript code.(()) Use for `advanced` format. | | `formatPayloadCode` (optional) | Optional JavaScript code to format the payload sent to the destination. The payload, containing a batch of formatted events, is accessible through the `__e['payload']` variable. The formatted payload is returned in the `__e['__payloadOut']` variable. **CAUTION: This function is evaluated in an unprotected context, allowing you to execute almost any JavaScript code.** Use for `advanced` format. | | `authType` (required) | Authentication type: `none`, `token`, or `basic`. | | `token` (optional) | Authentication token for `token` authentication type. | | `username` (optional) | Username for `basic` authentication type. | | `password` (optional) | Password for `basic` authentication type. | | `systemFields` (optional) | Fields to automatically add to Notification events to provide context before they are sent to the Notification target. | | `responseHonorRetryAfterHeader` (optional) | Set to `true` to honor any `Retry-After` header that specifies a delay in seconds after the retry request (limited to 180 seconds). If `false`, Cribl ignores all `Retry-After` headers. | | `responseRetrySettings.httpStatus` (optional) | HTTP response status code that will trigger retries. This Notification target example is configured to retry for `429` and `503` HTTP response status codes. | | `responseRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff. Maximum is 600,000 ms (10 minutes). | | `responseRetrySettings.backoffRate` (optional) | Base for exponential backoff. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `responseRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `timeoutRetrySettings.timeoutRetry` (optional) | Set to `true` to retry timed-out HTTP requests. | | `timeoutRetrySettings.initialBackoff` (optional) | How long, in milliseconds, to wait before initiating backoff for timeout retries. Maximum is 600,000 ms (10 minutes). | | `timeoutRetrySettings.backoffRate` (optional) | Base for exponential backoff for timeout retries. A value of 2 (default) means retry after 2 seconds, then 4 seconds, then 8 seconds, and so on. | | `timeoutRetrySettings.maxBackoff` (optional) | Maximum backoff interval to apply for timeout retries, in milliseconds. Default and minimum is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds). | | `rejectUnauthorized` (optional) | If `true` (default), reject certificates that cannot be verified against a valid Certificate Authority (for example, self-signed certificates). | | `useRoundRobinDns` (optional) | If `true`, when a DNS server returns multiple addresses, Search will cycle through them in the order returned. Otherwise, `false` (default). | | `compress` (optional) | If `true` (defualt), Cribl compresses the payload body before sending. | | `keepAlive` (optional) | If `true` (default), send `Keep-Alive` headers to the remote server and preserves the connection from the client side for a maximum of 120 seconds. If `false`, close the connection immediately after sending a request. | | `timeoutSec` (optional) | Amount of time, in seconds, to wait for a request to complete before canceling it. Default is `30`. | | `concurrency` (optional) | Maximum number of ongoing requests before blocking. Default is `5`. | | `maxPayloadSizeKB` (optional) | Maximum size, in KB, of the request body before compression. Default is `4096`. | | `maxPayloadEvents` (optional) | Maximum number of events to include in the request body. Default is `0` (unlimited). | | `flushPeriodSec` (optional) | Maximum time between requests. Default is `1`. Low values can cause the payload size to be smaller than the `maxPayloadSizeKB`. | | `extraHttpHeaders` (optional) | Name-value pairs to pass to all Notification events as additional HTTP headers. Values are sent encrypted. Headers added dynamically on a per-event basis in the `__headers` take precedence over headers defined in `extraHttpHeaders`. | | `failedRequestLoggingMode` (optional) | Data to log when a request fails: `none` (default), `payload`, or `payloadAndHeaders`. All headers are redacted unless listed in `safeHeaders`. | | `safeHeaders` (optional) | List of headers that are safe to log in plain text. | | `onBackpressure` (optional) | How the Notificaton Target should handle events when the target exerts backpressure.

- `block`: Block incoming events until backpressure is relieved
- `drop`: Drop incoming events, which may result in data loss
- `queue`: Queue events to disk until the target can accept them again | **Response Example** ```json { "items": [ { "id": "webhook_hourly", "type": "webhook", "url": "https://companydomain.com/api/webhooks/search-results", "method": "POST", "format": "custom", "customSourceExpression": "__httpOut", "customDropWhenNull": false, "customEventDelimiter": "\n", "customContentType": "application/x-ndjson", "customPayloadExpression": "`${events}`", "authType": "token", "token": "4f3e2d1c9b8a7e6f5d4c3b2aEXAMPLE", "systemFields": [ "cribl_host", "cribl_pipe" ], "responseHonorRetryAfterHeader": true, "responseRetrySettings": [ { "httpStatus": 429, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, { "httpStatus": 503, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 } ], "timeoutRetrySettings": { "timeoutRetry": true, "initialBackoff": 1000, "backoffRate": 2, "maxBackoff": 10000 }, "rejectUnauthorized": true, "useRoundRobinDns": true, "compress": true, "keepAlive": true, "timeoutSec": 30, "concurrency": 5, "maxPayloadSizeKB": 4096, "maxPayloadEvents": 0, "flushPeriodSec": 1, "extraHttpHeaders": [ { "name": "User-Agent", "value": "Cribl Search" } ], "failedRequestLoggingMode": "payloadAndHeaders", "safeHeaders": [ "User-Agent", "Content-Type" ], "onBackpressure": "drop", "status": { "health": "Green", "timestamp": 1757685442252, "metrics": { "numBytesInBuffer": 0, "numEventsInBuffer": 0, "concurrentRequests": 0, "lastFlushTime": 1757685441987, "sentCount": 0, "bytesOut": 0, "numDropped": 0, "parseErrorCount": 0, "retryBufferCount": 0, "numBatches": 0 } } } ], "count": 1 } ``` ## Create a Notification to Send Alerts {#send-alerts} You can create a [Notification](/search/notifications/#configure) to get alerts when a [scheduled search](/search/scheduled-searches/) generates results that match the triggering conditions that you specify. When you create a Notification, Cribl also adds the Notification details to the search that you specified for `savedQueryId`. If you retrieve the saved search, its configuration will include the schedule and Notification details. > You must have a [saved](/search/save) and [scheduled](/search/scheduled-searches/) search and a Notification target to create a Notification. > > Cribl does not support creating Notification events for searches that reside within Packs. > {.box .info} The following example demonstrates how to create a Notification for a scheduled search based on a [custom condition](/search/notifications/#triggers). The response is a JSON object that includes the Notification configuration. **Custom Condition Example** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/notifications" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "goatherd_mexico_city", "disabled": false, "condition": "search", "targets": [ "slack_hourly_webhook" ], "conf": { "triggerType": "custom", "savedQueryId": "Goatherd_sample_dataset_last_hour", "trigger": "location=\"Mexico City\"", "message": "Date: {{timestamp}}\n\nA notification was triggered for the scheduled search: {{searchId}},\nTenant ID: {{tenantId}}\nSearch ID: {{savedQueryId}}.\nNotification: {{notificationId}}" }, "targetConfigs": [ { "id": "slack_hourly_webhook", "conf": { "includeResults": true, "attachmentType": "inline" } } ], "metadata": [ { "name": "team", "value": "dataops" }, { "name": "location", "value": "mexico_city" }, { "name": "alert_type", "value": "location_match" } ] }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | Unique ID for the Notification. Immutable. | | `disabled` (required) | Set to `false` to send alerts according to the Notification. | | `condition` (required) | Event or state that triggers the Notification. For search Notifications, the value is `search`. | `targets` (required) | Notification targets to use. All Notifications, regardless of their configured target, also generate a message in the Cribl Search UI. | `conf.triggerType` (optional) | Type of trigger, `custom` (default) or `resultsCount`. | `conf.savedQueryId` (required) | The `id` for the saved and scheduled search associated with the Notification. | `conf.trigger` (required) | Kusto expression for the custom [Notification trigger](/search/notifications/#triggers). | `conf.message` (optional) | Message payload [template](/search/notifications/#message-options). Maximum is 1000 characters. | `targetConfigs.id` (optional) | The `id` of the target to add configuration for (if you want to include additional configuration for each target listed in the `targets` array). | `targetConfigs.conf.includeResults` (optional) | If `true`, insert the `{{resultSet}}` [template variable](/search/notifications/#message-options) into Notification events for the target. | `targetConfigs.conf.attachmentType` (optional) | How results are displayed in the Notification events for the target. For Slack Notification targets, the `attachmentType` is `inline`. | `metadata` (optional) | Name-value pairs that provide context, enrich Notification payloads, and facilitate filtering or routing. **Response Example** ```json { "items": [ { "disabled": false, "condition": "search", "targets": [ "slack_hourly_webhook" ], "conf": { "triggerType": "custom", "savedQueryId": "Goatherd_sample_dataset_last_hour", "trigger": "location=\"Mexico City\"", "message": "Date: {{timestamp}}\n\nA notification was triggered for the scheduled search: {{searchId}},\nTenant ID: {{tenantId}}\nSearch ID: {{savedQueryId}}.\nNotification: {{notificationId}}" }, "targetConfigs": [ { "id": "slack_hourly_webhook", "conf": { "includeResults": true, "attachmentType": "inline" } } ], "metadata": [ { "name": "team", "value": "dataops" }, { "name": "location", "value": "mexico_city" }, { "name": "'alert_type'", "value": "location_match" } ], "group": "default_search", "id": "goatherd_mexico_city" } ], "count": 1 } ``` The following example demonstrates how to create a Notification for a scheduled search based on [search results](/search/notifications/#triggers). **Search Results Example** ```shell curl --request GET \ --url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/default_search/notifications" \ --header "Authorization: Bearer ${token}" \ --header "Content-Type: application/json" \ --data '{ "id": "goatherd_results_burst", "disabled": false, "condition": "search", "targets": [ "slack_hourly_webhook" ], "conf": { "triggerType": "resultsCount", "savedQueryId": "Goatherd_sample_dataset_last_hour", "triggerComparator": ">=", "triggerCount": 10, "message": "Date: {{timestamp}}\n\nA notification was triggered for the scheduled search: {{searchId}},\nTenant ID: {{tenantId}}\nSearch ID: {{savedQueryId}}.\nNotification: {{notificationId}}" }, "targetConfigs": [ { "id": "slack_hourly_webhook", "conf": { "includeResults": true, "attachmentType": "inline" } } ], "metadata": [ { "name": "team", "value": "dataops" }, { "name": "alert_type", "value": "results_10_plus" } ] }' ``` **Body Parameter Information** | Request Body Parameter | Description | | ---------------------- | ----------- | | `id` (required) | Unique ID for the Notification. Immutable. | | `disabled` (required) | Set to `false` to send alerts according to the Notification. | | `condition` (required) | Event or state that triggers the Notification. For search Notifications, the value is `search`. | `targets` (required) | Notification targets to use. All Notifications, regardless of their configured target, also generate a message in the Cribl Search UI. | `conf.triggerType` (optional) | Type of trigger, `custom` (default) or `resultsCount`. | `conf.savedQueryId` (required) | The `id` for the saved and scheduled search associated with the Notification. | `conf.triggerComparator` (required) | Comparison operator to use for the [Notification trigger](/search/notifications/#triggers). | `conf.triggerCount` (required) | Numeric threshold to compare against the result count. | `conf.message` (optional) | Message payload [template](/search/notifications/#message-options). Maximum is 1000 characters. | `targetConfigs.id` (optional) | The `id` of the target to add configuration for (if you want to include additional configuration for each target listed in the `targets` array). | `targetConfigs.conf.includeResults` (optional) | If `true`, insert the `{{resultSet}}` [template variable](/search/notifications/#message-options) into Notification events for the target. | `targetConfigs.conf.attachmentType` (optional) | How results are displayed in the Notification events for the target. For Slack Notification targets, the `attachmentType` is `inline`. | `metadata` (optional) | Name-value pairs that provide context, enrich Notification payloads, and facilitate filtering or routing. **Response Example** ```json { "items": [ { "disabled": false, "condition": "search", "targets": [ "slack_hourly_webhook" ], "conf": { "triggerType": "resultsCount", "savedQueryId": "Goatherd_sample_dataset_last_hour", "triggerComparator": ">=", "triggerCount": 10, "message": "Date: {{timestamp}}\n\nA notification was triggered for the scheduled search: {{searchId}},\nTenant ID: {{tenantId}}\nSearch ID: {{savedQueryId}}.\nNotification: {{notificationId}}" }, "targetConfigs": [ { "id": "slack_hourly_webhook", "conf": { "includeResults": true, "attachmentType": "inline" } } ], "metadata": [ { "name": "team", "value": "dataops" }, { "name": "'alert_type'", "value": "results_10_plus" } ], "group": "default_search", "id": "goatherd_results_burst" } ], "count": 1 } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-billing-examples.md ############################################################ # Billing and FinOps API Code Examples Billing and FinOps API code examples demonstrate how to use the Cribl API for the management plane to retrieve Organization-level credit consumption and billing data that appears in the [FinOps Center](/billing-licensing/finops-center). Each example describes the steps required to complete a specific task, identifies the endpoints to use, and provides example requests and responses. The API code examples complement our [management plane API Reference](/cribl-as-code/api-reference/management-plane/) and explain common usage scenarios for programmatic access to FinOps Center data. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples: **Billing Reader**, **Admin**, or **Owner**. Billing API requests return data only for the Organization associated with the API Credential. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > Billing and FinOps API operations are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. Cribl.Cloud Government does not support the management plane API. > > Code examples do not include all available parameters. For a complete list of parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The following Billing and FinOps API code examples are available: - [Get Cumulative Consumption by Contract](api-billing-contracts-utilization) - [Get Monthly or Daily Credit Consumption](api-billing-monthly-daily-consumption) - [Get Credit Grants and Statistics](api-billing-grants-statistics) ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-billing-contracts-utilization.md ############################################################ # Get Cumulative Consumption by Contract Use the Cribl API for the management plane to get cumulative credit consumption for an Organization, grouped by contract period. To get credit grants and credit balance totals, see [Get Credit Grants and Statistics](api-billing-grants-statistics). To get per-product and Worker Group infrastructure credit consumption, see [Get Monthly or Daily Credit Consumption](api-billing-monthly-daily-consumption). For information about viewing billing and credit consumption data in Cribl, see [Track Product Usage and Credit Consumption](/billing-licensing/finops-center). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples: **Billing Reader**, **Admin**, or **Owner**. Billing API requests return data only for the Organization associated with the API Credential. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > Billing and FinOps API operations are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. Cribl.Cloud Government does not support the management plane API. > > Code examples do not include all available parameters. For a complete list of parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Get Cumulative Consumption by Contract {#contracts-utilization-example} Use `GET /billing/credits/contracts-utilization` to get data about credit consumption grouped by contract period. This example uses the following query parameters to get data for January through June 2026: - `window`: Granularity of points within each contract (`monthly`). - `startingOn`: Inclusive start of the date range, in ISO 8601 format. In this example, `2026-01-01T00:00:00.000Z` includes January 1, 2026. - `endingBefore`: Exclusive end of the date range, in ISO 8601 format. In this example, `2026-07-01T00:00:00.000Z` means the last day included in the results is June 30, 2026. **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/contracts-utilization?window=monthly&startingOn=2026-01-01T00:00:00.000Z&endingBefore=2026-07-01T00:00:00.000Z" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" ``` The response body contains a `contracts` array. Each element is one contract period and includes the following fields: - `contractStartDate`: Start of the contract period, in ISO 8601 format. - `contractEndDate`: End of the contract period, in ISO 8601 format. - `items`: Array of utilization points for that contract. With `window=monthly`, each item includes the following fields: - `date`: First day of the monthly aggregation window, in ISO 8601 format. - `credits`: Running total of credits consumed on the contract from `contractStartDate` through this `date`. The `credits` value is not the credits consumed only during the month that starts on `date`. ```json { "contracts": [ { "contractStartDate": "2025-09-17T00:00:00.000Z", "contractEndDate": "2026-09-18T00:00:00.000Z", "items": [ { "date": "2026-01-01T00:00:00.000Z", "credits": 148288.25 }, { "date": "2026-02-01T00:00:00.000Z", "credits": 193400.4502935743 }, { "date": "2026-03-01T00:00:00.000Z", "credits": 235680.86872625691 }, { "date": "2026-04-01T00:00:00.000Z", "credits": 285311.8913310697 }, { "date": "2026-05-01T00:00:00.000Z", "credits": 332132.2760503561 }, { "date": "2026-06-01T00:00:00.000Z", "credits": 376523.8607666401 } ] } ] } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-billing-monthly-daily-consumption.md ############################################################ # Get Monthly or Daily Credit Consumption Use the Cribl API for the management plane to get monthly or daily credit consumption for an Organization, including per-product and Worker Group infrastructure breakdowns. The examples demonstrate how to get [monthly](#get-credit-consumption-monthly) or [daily](#get-credit-consumption-daily) credit consumption with `GET /billing/credits/timeseries`, as well as one way to [get a chargeback-ready table](#get-chargeback-table). To get cumulative credit consumption by contract, see [Get Cumulative Consumption by Contract](api-billing-contracts-utilization). To get credit grants and credit balance totals, see [Get Credit Grants and Statistics](api-billing-grants-statistics). For information about viewing credit consumption in Cribl, see [Track Product Usage and Credit Consumption](/billing-licensing/finops-center). Credit consumption aggregates only at daily and monthly windows, so more frequent polling does not return finer-grained data. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples: **Billing Reader**, **Admin**, or **Owner**. Billing API requests return data only for the Organization associated with the API Credential. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > Billing and FinOps API operations are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. Cribl.Cloud Government does not support the management plane API. > > Code examples do not include all available parameters. For a complete list of parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Get Monthly Credit Consumption {#get-credit-consumption-monthly} Use `GET /billing/credits/timeseries` to get total credit consumption and per-product and Worker Group infrastructure credit consumption broken down by month. Review the JSON response structure, then see [Get a Chargeback-Ready Table for Monthly Credit Consumption](#get-chargeback-table) for an example of one way to get a chargeback-ready table. This example uses the following query parameters to get data for January, February, and March 2026: - `window`: The granularity to apply to the timeseries data. In this example, the granularity is `monthly`. For day-level allocation within a shorter range, see [Get Daily Credit Consumption](#get-credit-consumption-daily). - `startingOn`: The inclusive start of the date range for the request, in ISO 8601 format. In this example, the date range `2026-01-01T00:00:00.000Z` starts on (and includes) January 1, 2026. - `endingBefore`: The exclusive end of the date range for the request, in ISO 8601 format. In this example, the value `2026-04-01T00:00:00.000Z` means that the last day included in the results is March 31, 2026. **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/timeseries?window=monthly&startingOn=2026-01-01T00:00:00.000Z&endingBefore=2026-04-01T00:00:00.000Z" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" ``` In the response body, the `count` value is equal to the number of objects that represent the billing periods in your range. For this request, `count` is `3`: one object each for January, February, and March 2026. Each object in this example response lists consumption for one monthly billing period. For each object: - `date` is the start of a monthly billing period, in ISO 8601 format (the first day of the month when `window=monthly`). - `credits` is the total consumed across all products and Worker Group infrastructure for the month. - `dimensions` lists per-product and Worker Group infrastructure credit consumption for the month. The response might include all or some of the `dimensions` objects listed in the example response, depending on the Cribl products and infrastructure that your Organization uses. ```json { "items": [ { "date": "2026-01-01T00:00:00.000Z", "credits": 45630.4751129743, "dimensions": [ { "dimension": "Search", "credits": 8421.46927874825 }, { "dimension": "Stream", "credits": 28417.38471928641 }, { "dimension": "Lake", "credits": 1264.591384620168 }, { "dimension": "Infrastructure", "credits": 4518.417284619472 }, { "dimension": "Edge", "credits": 2103.5847163 }, { "dimension": "Guard", "credits": 386.75291 }, { "dimension": "Insights", "credits": 518.2748194 } ] }, { "date": "2026-02-01T00:00:00.000Z", "credits": 42752.57682478261, "dimensions": [ { "dimension": "Search", "credits": 7912.27351964027 }, { "dimension": "Stream", "credits": 26108.48730591862 }, { "dimension": "Lake", "credits": 1104.364029851702 }, { "dimension": "Infrastructure", "credits": 4826.508391472018 }, { "dimension": "Edge", "credits": 1987.2916048 }, { "dimension": "Guard", "credits": 341.493581 }, { "dimension": "Insights", "credits": 472.1583921 } ] }, { "date": "2026-03-01T00:00:00.000Z", "credits": 50180.8590760128, "dimensions": [ { "dimension": "Search", "credits": 9234.18374652815 }, { "dimension": "Stream", "credits": 31256.1745083621 }, { "dimension": "Lake", "credits": 1382.291746038531 }, { "dimension": "Infrastructure", "credits": 5104.583716284019 }, { "dimension": "Edge", "credits": 2241.3729506 }, { "dimension": "Guard", "credits": 412.415937 }, { "dimension": "Insights", "credits": 549.8364712 } ] } ], "count": 3 } ``` ### Get a Chargeback-Ready Table for Monthly Credit Consumption {#get-chargeback-table} Automated chargeback reporting tools often expect billing period and credit totals in flat rows. In JSON responses for `GET /billing/credits/timeseries` requests, this data is nested in `items` and `dimensions` instead. This example makes the same request as in [Get Monthly Credit Consumption](#get-credit-consumption-monthly), passes the response body to a short `jq` program, and prints chargeback-ready CSV to `stdout`. You can flatten the JSON response using other methods such as Python, SQL in your warehouse, dbt (or another ETL job), a spreadsheet, or a BI tool. The `jq` program in this example transforms the JSON response as follows: 1. Output a header row with the column names `billing_period`, `dimension`, and `credits`. 1. Loop over every object in `items`. Derive `billing_period` from the `date`. This example uses `window=monthly`, so the `billing_period` values include only the year and month (`YYYY-MM`). 1. Loop over every object in that item's `dimensions` array. For each entry, emit one row: `billing_period`, the `dimension` value (such as `Stream` or `Edge`), and the entry's `credits`. 1. Format each row with `@csv` so values are valid comma-separated fields. **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/timeseries?window=monthly&startingOn=2026-01-01T00:00:00.000Z&endingBefore=2026-04-01T00:00:00.000Z" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" \ | jq -r ' ["billing_period","dimension","credits"], (.items[] | .date as $date | ($date | split("T")[0][0:7]) as $period | .dimensions[] | [$period, .dimension, .credits]) | @csv ' ``` When you execute the request, `stdout` includes CSV output similar to the following example. Each data row is one dimension's credit consumption total for one billing period. For example, `"2026-01","Stream",28417.38471928641` means approximately 28,417.38 credits for Cribl Stream in January 2026. ```text "billing_period","dimension","credits" "2026-01","Search",8421.46927874825 "2026-01","Stream",28417.38471928641 "2026-01","Lake",1264.591384620168 "2026-01","Infrastructure",4518.417284619472 "2026-01","Edge",2103.5847163 "2026-01","Guard",386.75291 "2026-01","Insights",518.2748194 "2026-02","Search",7912.27351964027 "2026-02","Stream",26108.48730591862 "2026-02","Lake",1104.364029851702 "2026-02","Infrastructure",4826.508391472018 "2026-02","Edge",1987.2916048 "2026-02","Guard",341.493581 "2026-02","Insights",472.1583921 "2026-03","Search",9234.18374652815 "2026-03","Stream",31256.1745083621 "2026-03","Lake",1382.291746038531 "2026-03","Infrastructure",5104.583716284019 "2026-03","Edge",2241.3729506 "2026-03","Guard",412.415937 "2026-03","Insights",549.8364712 ``` ## Get Daily Credit Consumption {#get-credit-consumption-daily} Use `GET /billing/credits/timeseries` to get total credit consumption and per-product and Worker Group infrastructure credit consumption broken down by day. This example uses the following query parameters to get data for January 1 through January 7, 2026: - `window`: The granularity to apply to the timeseries data. In this example, the granularity is `daily`. For month-level allocation, see [Get Monthly Credit Consumption](#get-credit-consumption-monthly). - `startingOn`: The inclusive start of the date range for the request, in ISO 8601 format. In this example, the date range `2026-01-01T00:00:00.000Z` starts on (and includes) January 1, 2026. - `endingBefore`: The exclusive end of the date range for the request, in ISO 8601 format. In this example, the value `2026-01-08T00:00:00.000Z` means that the last day included in the results is January 7, 2026. **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/timeseries?window=daily&startingOn=2026-01-01T00:00:00.000Z&endingBefore=2026-01-08T00:00:00.000Z" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" ``` In the response body, the `count` value is equal to the number of objects that represent the billing periods in your range. For this request, `count` is `7`: one object each for seven days. Each object in this example response lists consumption for one day. For each object: - `date` is the date (in ISO 8601 format) for the day whose credit consumption is listed in the `dimensions` objects. - `credits` is the total consumed across all products and Worker Group infrastructure for the day. - `dimensions` lists per-product and Worker Group infrastructure credit consumption for the day. The response might include all or some of the `dimensions` objects listed in the example response, depending on the Cribl products and infrastructure that your Organization uses. ```json { "items": [ { "date": "2026-01-01T00:00:00.000Z", "credits": 1474.682852340751, "dimensions": [ { "dimension": "Search", "credits": 271.458291034182 }, { "dimension": "Stream", "credits": 918.274519286401 }, { "dimension": "Lake", "credits": 41.285918420168 }, { "dimension": "Infrastructure", "credits": 146.225 }, { "dimension": "Edge", "credits": 68.4829163 }, { "dimension": "Guard", "credits": 12.473291 }, { "dimension": "Insights", "credits": 16.4829163 } ] }, { "date": "2026-01-02T00:00:00.000Z", "credits": 1494.036441749864, "dimensions": [ { "dimension": "Search", "credits": 265.18374652815 }, { "dimension": "Stream", "credits": 942.581730591862 }, { "dimension": "Lake", "credits": 40.104364029852 }, { "dimension": "Infrastructure", "credits": 147.075 }, { "dimension": "Edge", "credits": 71.2916048 }, { "dimension": "Guard", "credits": 12.508391 }, { "dimension": "Insights", "credits": 15.2916048 } ] }, { "date": "2026-01-03T00:00:00.000Z", "credits": 1099.91201368261, "dimensions": [ { "dimension": "Search", "credits": 198.27351964027 }, { "dimension": "Stream", "credits": 701.48730591862 }, { "dimension": "Lake", "credits": 32.364029851702 }, { "dimension": "Infrastructure", "credits": 98.508391472018 }, { "dimension": "Edge", "credits": 48.2916048 }, { "dimension": "Guard", "credits": 9.493581 }, { "dimension": "Insights", "credits": 11.493581 } ] }, { "date": "2026-01-04T00:00:00.000Z", "credits": 1051.87558922285, "dimensions": [ { "dimension": "Search", "credits": 185.007636330227 }, { "dimension": "Stream", "credits": 682.1076972 }, { "dimension": "Lake", "credits": 28.509100625956 }, { "dimension": "Infrastructure", "credits": 92.666666666667 }, { "dimension": "Edge", "credits": 45.2447562 }, { "dimension": "Guard", "credits": 8.094976 }, { "dimension": "Insights", "credits": 10.2447562 } ] }, { "date": "2026-01-05T00:00:00.000Z", "credits": 1558.313171349544, "dimensions": [ { "dimension": "Search", "credits": 289.873310099112 }, { "dimension": "Stream", "credits": 968.248508600002 }, { "dimension": "Lake", "credits": 48.97862625043 }, { "dimension": "Infrastructure", "credits": 148.45 }, { "dimension": "Edge", "credits": 72.3404672 }, { "dimension": "Guard", "credits": 13.081792 }, { "dimension": "Insights", "credits": 17.3404672 } ] }, { "date": "2026-01-06T00:00:00.000Z", "credits": 1623.312514190655, "dimensions": [ { "dimension": "Search", "credits": 302.151468707323 }, { "dimension": "Stream", "credits": 1012.302316000001 }, { "dimension": "Lake", "credits": 52.015317216664 }, { "dimension": "Infrastructure", "credits": 151.491666666667 }, { "dimension": "Edge", "credits": 74.0629408 }, { "dimension": "Guard", "credits": 13.225864 }, { "dimension": "Insights", "credits": 18.0629408 } ] }, { "date": "2026-01-07T00:00:00.000Z", "credits": 1529.686328092164, "dimensions": [ { "dimension": "Search", "credits": 278.697166922386 }, { "dimension": "Stream", "credits": 956.8374656 }, { "dimension": "Lake", "credits": 43.856591303111 }, { "dimension": "Infrastructure", "credits": 149.666666666667 }, { "dimension": "Edge", "credits": 70.9696536 }, { "dimension": "Guard", "credits": 12.829392 }, { "dimension": "Insights", "credits": 16.829392 } ] } ], "count": 7 } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-billing-grants-statistics.md ############################################################ # Get Credit Grants and Statistics Use the Cribl API for the management plane to get [credit grants](#grants-example) and [credit balance and consumption totals](#stats-example) for an Organization. To get cumulative credit consumption by contract, see [Get Cumulative Consumption by Contract](api-billing-contracts-utilization). To get per-product and Worker Group infrastructure credit consumption, see [Get Monthly or Daily Credit Consumption](api-billing-monthly-daily-consumption). For information about viewing billing and credit consumption data in Cribl, see [Track Product Usage and Credit Consumption](/billing-licensing/finops-center). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [API authentication documentation](api-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in code examples: **Billing Reader**, **Admin**, or **Owner**. Billing API requests return data only for the Organization associated with the API Credential. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > Billing and FinOps API operations are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. Cribl.Cloud Government does not support the management plane API. > > Code examples do not include all available parameters. For a complete list of parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} ## Get Credit Grants {#grants-example} Use `GET /billing/credits/grants` to get credit grants for the Organization's current contract (purchases, rollovers, and refunds). **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/grants" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" ``` The response body contains an `items` array and a `count` field that lists the number of grants in `items`. Each object in `items` includes the following fields: - `date`: Date the grant was issued, in ISO 8601 format. - `creditsAcquired`: Number of credits added by the grant. - `type`: Category for the grant (`Purchased`, `Rollover`, or `Refund`). ```json { "items": [ { "date": "2025-09-17T00:00:00.000Z", "creditsAcquired": 550000, "type": "Purchased" }, { "date": "2025-09-17T00:00:00.000Z", "creditsAcquired": 40000, "type": "Rollover" }, { "date": "2026-03-10T00:00:00.000Z", "creditsAcquired": 10000, "type": "Refund" } ], "count": 3 } ``` ## Get Credit Balance and Consumption Totals {#stats-example} Use `GET /billing/credits/stats` to get credit balance totals, consumption totals, and contract date ranges for the Organization's current contract. **Cribl.Cloud** ```shell curl --request GET \ --url "https://gateway.cribl.cloud/v1/organizations/${organizationId}/billing/credits/stats" \ --header "Authorization: Bearer ${token}" \ --header "Accept: application/json" ``` The response body includes the following fields: - `totalCreditsRemaining`: Credits remaining on the Organization's current contract. - `totalCreditsUsed`: Credits consumed on the Organization's current contract. - `totalCreditsAcquired`: Credits acquired on the Organization's current contract. - `contracts`: Array of contract periods. Each object can include the following fields: - `startDate`: Start of the contract period, in ISO 8601 format. - `endDate`: End of the contract period, in ISO 8601 format. ```json { "totalCreditsRemaining": 223476.1392333599, "totalCreditsUsed": 376523.8607666401, "totalCreditsAcquired": 600000, "contracts": [ { "startDate": "2025-09-17T00:00:00.000Z", "endDate": "2026-09-18T00:00:00.000Z" } ] } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/api-reference.md ############################################################ # API Reference The Cribl API Reference provides comprehensive and detailed API documentation for all Cribl products. For usage information about the Cribl API, including base URLs, refer to the [Cribl API](api) overview. The [Authentication](api-auth) topic explains how to authenticate to the Cribl API. ## Control Plane API Reference {#control-api-ref} The [Control Plane API Reference](/cribl-as-code/control-plane) includes endpoints that provide operational control over Cribl resources in Cribl.Cloud and on-prem deployments. ## Management Plane API Reference {#management-api-ref} The [Management Plane API Reference](/cribl-as-code/api-reference/management-plane) includes endpoints for managing certain administrative tasks in Cribl.Cloud. The management plane API is supported only in Cribl.Cloud. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/control-plane.md ############################################################ # Control Plane API The Control Plane API Reference is divided into the several sections. Each provides detailed documentation for endpoints that allow you to manage resources throughout the Cribl suite: - [Cribl Core](/cribl-as-code/api-reference/control-plane/cribl-core): System-wide configuration, health, and other shared operational control across Cribl.Cloud and on-prem deployments. - [Cribl Stream](/cribl-as-code/api-reference/control-plane/cribl-stream): Resources such as Worker Groups, Sources, Destinations, Pipelines, and Routes. - [Cribl Edge](/cribl-as-code/api-reference/control-plane/cribl-edge): Resources such as Edge Fleets, Edge Nodes, Sources, and Destinations. - [Cribl Search](/cribl-as-code/api-reference/control-plane/cribl-search): Resources such as Datasets, Dataset Providers, Dashboards, and Notebooks. - [Cribl Lake](/cribl-as-code/api-reference/control-plane/cribl-lake): Resources such as Lake Datasets and Storage Locations. - [Cribl Insights](/cribl-as-code/api-reference/control-plane/cribl-insights): Resources such as Monitors, silences, and System and Data Insights metrics. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/terraform.md ############################################################ # Cribl Terraform Provider The Cribl Terraform provider offers a streamlined, repeatable approach for configuring end-to-end infrastructure as code (IaC) and managing resources consistently across Cribl Organizations and Workspaces. For an opinionated Terraform starter template, refer to the [Cribl as Code Quickstart](https://github.com/criblio/criblascode-quickstart) GitHub repository. The quickstart repo provides copyable examples for creating Worker Groups and installing Packs in Cribl.Cloud, including committing and deploying the configuration. Clone the quickstart repo and follow the instructions to develop a repeatable pipeline for your own deployment. The [terraform-provider-criblio](https://github.com/criblio/terraform-provider-criblio) GitHub repository includes in-depth [examples](https://github.com/criblio/terraform-provider-criblio/tree/main/examples) and describes prerequisites, installation and authentication, available resources and data sources, and testing. The [Terraform Registry documentation](https://registry.terraform.io/providers/criblio/criblio/latest/docs) also provides reference information. On-prem deployments support operations for resources including Sources, Destinations, Routes, Pipelines, and Packs. Cribl Search, Cribl Lake and Lakehouse, and Workspace Management operations are supported only on Cribl.Cloud. > Submit feedback, feature requests, and questions about the Cribl Terraform provider to [Cribl Support](/support/). > {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/terraform-auth.md ############################################################ # Authenticate with the Cribl Terraform Provider > For on-prem deployments, if you're using SSO/OpenID Connect Authentication, you must toggle on **Allow login as Local User** in Cribl (see [Set Up Fallback Access](/iam/sso-on-prem/#fallback-access-on-prem)). You'll need to be a Local user when you authenticate. > > To use `https` for on-prem requests, you must [Configure TLS](/stream/securing-configure-tls/). If you do not configure TLS, use `http` instead. Use `http` only for testing in development environments. In production, configure TLS and use `https` to secure your communications. > {.box .warning} ## Token Management Options {#terraform-token-mgmt} All Cribl Terraform operations require you to authenticate with a Bearer token. In Cribl, Bearer tokens are [JSON Web Tokens (JWTs)](https://datatracker.ietf.org/doc/html/rfc7519). The Bearer token verifies your identity and ensures secure access to the requested resources. - In Cribl.Cloud and hybrid deployments, Bearer tokens are valid for `24` hours. - In on-prem deployments, Bearer tokens expire according to the value you provide for the **Auth token TTL** setting at **Settings** > **Global** > **General Settings** > **API Server Settings** > **Advanced**. The default setting is `3600` seconds (`1` hour). {scale="90%" border="true"} To configure authentication, you can use either automatic or manual token management: - For automatic token management, you provide your OAuth credentials to the Terraform provider. The provider uses your credentials to automatically make OAuth requests to obtain a Bearer token. When the token expires, the provider automatically refreshes the token. Automatic token management is more convenient and reliable for Terraform operations. - For manual token management, you obtain a Bearer token in advance and provide the token directly to the Terraform provider. You are responsible for ensuring that applications refresh the Bearer token within the expiration window for each token. Automatic token management is supported for all authentication configuration methods on [Cribl.Cloud and hybrid](#terraform-auth-cloud) deployments and in [on-prem deployments](#terraform-auth-on-prem) deployments. The Cribl Terraform provider does not support manual token management if you use the credentials file to configure authentication. ## Authenticate in Cribl.Cloud and Hybrid Deployments {#terraform-auth-cloud} To configure authentication in Cribl.Cloud and hybrid deployments, first create an API Credential. The API Credential provides a **Client ID** and **Client Secret**, which you must either provide in your configuration or use to obtain a Bearer token. To create an API Credential in the Cribl UI: 1. Log in to Cribl.Cloud as an Owner or an Admin. 1. On the top bar, select **Products**, and then select **Cribl**. 1. In the sidebar, select **Organization**, and then select **API Credentials**. 1. Select **Add Credential**. 1. Enter a **Name** and an optional **Description**. 1. In the **Organization Permissions** drop-down menu, select a [Permission](/iam/permissions#organization) to apply for the API Credential. **Organization Permissions** are available on [certain plan/license tiers](https://cribl.io/pricing/). Without a proper license, all API Credentials are granted the **Admin** Permission. - The **Admin** or **Owner** Permission automatically grants admin access on all Workspaces. - If you choose the **User** Permission, under **Workspace Access**, define the desired [Permissions](/iam/permissions#workspace) for specific [Workspaces](/stream/workspaces) and Cribl products. - To grant read-only access on [individual Cribl Search resources](/search/sharing#share-datasets-dashboards) (for example, for a service account that connects to Cribl Search via API), select the **User** Permission on the Organization, the **Member** Permission on the Workspace, and either the **User** or **Editor** Permission on Cribl Search. The **Admin** Permission automatically grants full access to all Cribl Search resources. - The **Billing Reader** Permission grants read-only access to billing information for the Organization. It does not grant access to Workspaces or products. 1. (Optional) Under **IP Allowlist**, you can restrict API access for the Credential to specific IPv4 Classless Inter-Domain Routing (CIDR) ranges. Select **Add CIDR** and enter the desired range. You can add a maximum of 10 CIDR ranges. 1. Select **Save**. The **API Credentials** page displays the new API Credential within a few seconds. The API Credential includes a **Client ID** and a **Client Secret** that Organization Owners and Admins can use to generate Bearer tokens. Organization Owners and Admins can view, edit, and disable existing API Credentials. Only Owners can delete API Credentials. > The **Client ID** and **Client Secret** are sensitive information and should be kept private. > {.box .info} Next, decide whether you want to use automatic or manual [token management](#terraform-token-mgmt). For automatic token management, you will provide your OAuth credentials (the **Client ID** and **Client Secret** from the API Credential) when you configure authentication. For manual token management, you must obtain a Bearer token to use directly when you configure authentication. Send an API request to `https://login.cribl.cloud/oauth/token`, with the **Client ID** and **Client Secret** from the API Credential in the body: **Bearer Token Request Example (Manual Token Management)** ```shell curl --request POST \ --url "https://login.cribl.cloud/oauth/token" \ --header "Content-Type: application/json" \ --data '{ "grant_type": "client_credentials", "client_id": "${clientId}", "client_secret": "${clientSecret}", "audience": "https://api.cribl.cloud" }' ``` As shown in the following example response, the JSON object in the response includes several attributes: - `access_token`: The Bearer token to provide when you configure authentication. - `scope`: The [Permissions](/iam/permissions) that the Bearer token grants. - `expires_in`: The number of seconds until the Bearer token expires. In Cribl.Cloud/hybrid, Bearer tokens expire `24` hours (`86400` seconds) after they are created. - `token_type`: The type of the token. in Cribl.Cloud/hybrid, the value is always `Bearer`. **Bearer Token Response Example (Manual Token Management)** ```json { "access_token": "abcdefg1234567890...exampleBearerToken", "scope": "user:read:workergroups user:update:workergroups user:read:connections user:update:connections user:update:workspaces user:read:workspaces", "expires_in": 86400, "token_type": "Bearer" } ``` After you have the **Client ID** and **Client Secret** (for automatic token management) or a Bearer token (for manual token management), you can configure authentication using the following methods, listed in order of precedence: 1. [Provider block](#provider-block-cloud). 1. [Environment variables](#env-vars-cloud). 1. [Credentials file](#creds-file-cloud) (automatic token management only). If you include a provider block in your Terraform configuration file, it has the highest precedence and will override any environment variables or credentials file that you have also configured. If you configure authentication using both environment variables and a credentials file, the Terraform provider will use the environment variables instead of the credentials file. ### Provider Block (Cribl.Cloud and Hybrid) {#provider-block-cloud} To configure authentication directly in your Terraform configuration file, include a provider block: ```hcl provider "criblio" { # OAuth credentials for automatic token management # with optional cloud_domain client_id = "your-client-id" # Replace with the Client ID for your API Credential client_secret = "your-client-secret" # Replace with the Client Secret for your API Credential organization_id = "your-organization-id" # Replace with your Organization ID workspace_id = "your-workspace-id" # Replace with your Workspace name cloud_domain = "cribl.cloud" # (Optional) Replace with the Cloud domain # Bearer token for manual token management bearer_token = "your-bearer-token" # Replace with a Bearer token } ``` ### Environment Variables (Cribl.Cloud and Hybrid) {#env-vars-cloud} To configure authentication using environment variables, replace the placeholder values with your OAuth credentials (automatic token management) or a Bearer token (manual token management): ```bash # OAuth credentials for automatic token management export CRIBL_CLIENT_ID="your-client-id" # Replace with the Client ID for your API Credential export CRIBL_CLIENT_SECRET="your-client-secret" # Replace with the Client Secret for your API Credential export CRIBL_ORGANIZATION_ID="your-organization-id" # Replace with your Organization ID export CRIBL_WORKSPACE_ID="your-workspace-name" # Replace with your Workspace name # Bearer token for manual token management export CRIBL_BEARER_TOKEN="your-bearer-token" # Replace with a Bearer token ``` ### Credentials File (Cribl.Cloud and Hybrid) {#creds-file-cloud} The credentials file method for configuring authentication supports only automatic [token management](#terraform-token-mgmt). Store your OAuth credentials in `~/.cribl/credentials` or `~/.cribl` (legacy) with the following format: ```ini # OAuth credentials for automatic token management # with multiple profiles and optional cloud_domain [default] client_id = your-client-id # Replace with the Client ID for your API Credential client_secret = your-client-secret # Replace with the Client Secret for your API Credential organization_id = your-organization-id # Replace with your Organization ID workspace = your-workspace-id # Replace with your Workspace name cloud_domain = cribl-playground.cloud # (Optional) Replace with the Cloud domain [profile2] client_id = another-client-id # Replace with the Client ID for your API Credential client_secret = another-client-secret # Replace with the Client Secret for your API Credential organization_id = another-organization-id # Replace with your Organization ID workspace = another-workspace-id # Replace with your Workspace name cloud_domain = cribl.cloud # (Optional) Replace with the Cloud domain ``` To use a specific profile, set the `CRIBL_PROFILE` environment variable: ```bash export CRIBL_PROFILE="profile2" ``` ## Authenticate in On-Prem Deployments {#terraform-auth-on-prem} In on-prem deployments, you can configure authentication using the following methods (listed in order of precedence): 1. [Environment variables](#env-vars-on-prem). 1. [Credentials file](#creds-file-on-prem) (automatic token management only). If you configure authentication using both environment variables and a credentials file, the environment variables will override the credentials file configuration. ### Environment Variables (On-Prem) {#env-vars-on-prem} If you use environment variables to configure authentication, you may use either[login credentials for automatic token management](#env-vars-on-prem-auto) or a [Bearer token for manual token management](#env-vars-on-prem-manual). #### Use Automatic Token Management with Environment Variables {#env-vars-on-prem-auto} To configure authentication using [automatic token management](#terraform-token-mgmt), replace the placeholder values for the following environment variables with your server URL and login credentials (username and password): ```bash # Server URL export CRIBL_ONPREM_SERVER_URL="http://localhost:9000" # Replace with your server URL # Login credentials for automatic token management export CRIBL_ONPREM_USERNAME="your-username" # Replace with your username export CRIBL_ONPREM_PASSWORD="your-password" # Replace with your password ``` In the Terraform configuration file, include the provider block with no authentication settings to ensure that the Terraform provider uses the settings from the environment variables: ```hcl provider "criblio" { # Do not configure authentication settings. Uses environment variables. } ``` #### Use Manual Token Management with Environment Variables {#env-vars-on-prem-manual} To configure authentication by directly providing a Bearer token in an environment variable for [manual token management](#terraform-token-mgmt), you must first send a request to the `/auth/login` endpoint to obtain a Bearer token. The following example request demonstrates an `/auth/login` request. Replace the variables in the example request with your hostname, port, and login credentials (username and password). Your username and password are sensitive information and should be kept private. **Authentication Request Example (On-Prem)** ```shell curl --request POST \ --url "https://${hostname}:${port}/api/v1/auth/login" \ --header "Content-Type: application/json" \ --data '{ "username": "${username}", "password": "${password}" }' ``` The response is a JSON object like the following example. The value of the `token` attribute in the response is the Bearer token: **Authentication Response Example (On-Prem)** ```json { "token": "Bearer abcdefg1234567890...exampleBearerToken", "forcePasswordChange": false } ``` When you have a Bearer token, replace the placeholder values for the following environment variables with your server URL and the Bearer token: ```bash # Server URL export CRIBL_ONPREM_SERVER_URL="http://localhost:9000" # Replace with your server URL # Bearer token for manual token management export CRIBL_BEARER_TOKEN="your-bearer-token" # Replace with a Bearer token ``` In the Terraform configuration file, include the provider block with no authentication settings to ensure that the Terraform provider uses the settings from the environment variables: ```hcl provider "criblio" { # Do not configure authentication settings. Uses environment variables. } ``` ### Credentials File (On-Prem) {#creds-file-on-prem} The credentials file method for configuring authentication supports only automatic [token management](#terraform-token-mgmt). Store your login credentials (username and password) in `~/.cribl/credentials` or `~/.cribl` (legacy) with the following format: ```ini # Server URL and login credentials for automatic token management [onprem] onprem_server_url = http://localhost:9000 # Replace with your server URL onprem_username = your-username # Replace with your username onprem_password = your-password # Replace with your password ``` To use the configured profile, set the `CRIBL_PROFILE` environment variable: ```bash export CRIBL_PROFILE="onprem" ``` In the Terraform configuration file, include the provider block with no authentication settings to ensure that the Terraform provider uses the settings from the credentials file: ```hcl provider "criblio" { # Do not configure authentication settings. Uses credentials file. } ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/terraform-migrate-resources.md ############################################################ # Migrate Cribl Configurations to Terraform Use the `cribl-tf-config-exporter` CLI tool to export an existing Cribl configuration to Terraform HashiCorp Configuration Language (HCL) format and migrate to Terraform-managed infrastructure as code. The `cribl-tf-config-exporter` tool operates in three phases: 1. **Discovery**: Uses the Cribl API to identify all supported Cribl resource types, build an inventory of resource to export, and collect resource metadata. 1. **Conversion**: Uses the Cribl API to retrieve the complete configuration for each discovered resource and converts the configuration to Terraform-enabled models. 1. **HCL generation**: Produces organized Terraform HCL files, module structure files, provider configuration, import blocks, and a README.md with usage instructions. The output is ready-to-use Terraform module set that represents the Cribl configuration. ## Prerequisites {#tf-config-export-prerequisites} To install and use `cribl-tf-config-exporter`, make sure that you meet the following prerequisites: - Read-only access on a Cribl.Cloud or on-prem deployment. - Because `cribl-tf-config-exporter` uses the Cribl API for only read operations, it does not require greater access rights on Cribl deployments. `cribl-tf-config-exporter` does not make any changes to Cribl deployments. - Terraform version 1.5 or newer. - [Cribl Terraform provider](https://registry.terraform.io/providers/criblio/criblio/latest/docs) (`criblio/criblio`) version 1.20.138 or newer with properly configured [authentication](#auth-tf-config-export). ## Install `cribl-tf-config-exporter` {#install-tf-config-export} 1. In the GitHub repository for the Cribl Terraform provider, select the [latest `cribl-tf-config-exporter` release](https://github.com/criblio/terraform-provider-criblio/releases). 1. On the release page, under **Assets**, download the archive for your platform: | Platform | Archive File Name Example | | ------------------------------ | ------------------------------------------------------ | | macOS (Intel) | `cribl-tf-config-exporter__darwin_amd64.zip` | | macOS (Apple Silicon M1/M2/M3) | `cribl-tf-config-exporter__darwin_arm64.zip` | | Linux (x86-64) | `cribl-tf-config-exporter__linux_amd64.zip` | | Linux (ARM64) | `cribl-tf-config-exporter__linux_arm64.zip` | | Windows | `cribl-tf-config-exporter__windows_amd64.zip` | > `cribl-tf-config-exporter` is built with Go and released via goreleaser as platform-dependent binaries. For Linux, one binary is provided per architecture (x86-64 and ARM64), not per distribution. The Linux binaries run on glibc-based distributions such as Debian, RHEL, and Ubuntu as long as the architecture matches. {.box .info} 1. Extract the archive locally and run the binary with no arguments to display usage information: - **macOS or Linux:** `./cribl-tf-config-exporter` - **Windows:** `cribl-tf-config-exporter.exe`

To run `cribl-tf-config-exporter` without the `./` prefix, add the extracted directory to your PATH or copy the binary to a directory in your PATH. ### Resolve macOS Security Warning {#macos-security-warning} When you install and run `cribl-tf-config-exporter` on macOS, you may see a security warning that it cannot be opened because it is from an unidentified developer. The process may also be killed with no dialog. This occurs because the binary is not signed by Apple. To remove quarantine and resolve the security warning, run the following command: ```bash xattr -d com.apple.quarantine ./cribl-tf-config-exporter ``` If you prefer, you can allow `cribl-tf-config-exporter` to run for a single use as follows: 1. Right-click `cribl-tf-config-exporter`. 1. Select **Open**. 1. Select **Open** again to confirm. ## Authenticate {#auth-tf-config-export} Use one of the supported [authentication methods for the Cribl Terraform provider](terraform-auth) for `cribl-tf-config-exporter` authentication. For Cribl.Cloud deployments, you can use the [`--org-id` and `--workspace-id` options](#export-options) to specify the Organization ID and Workspace ID instead of listing them in the provider block, credentials file, or environment variables. For example: ```bash cribl-tf-config-exporter export --org-id --workspace-id --output-dir ./tf ``` For on-prem deployments, you can use the [`--server-url` option](#export-options) to specify the server URL instead of listing it as an environment variable or in a credentials file. For example: ```bash cribl-tf-config-exporter export --server-url --output-dir ./tf ``` If you use the `--org-id` and `--workspace-id` options (Cribl.Cloud) or the `--server-url` option (on-prem), the values you specify take precedence over any values provided in the provider block, environment variables, or credentials file that you use for Terraform authentication. You must still configure a provider block, environment variables, or credentials file to provide the other values that are required for authentication as shown in the instructions for authenticating in [Cribl.Cloud](terraform-auth#terraform-auth-cloud) or [on-prem](terraform-auth#terraform-auth-on-prem) deployments. ## Sub-Commands and Options {#subcommands-options} ### `cribl-tf-config-exporter export` {#subcommand-export} Export Cribl configuration resources to Terraform HCL files and generate `main.tf`, `variables.tf`, and `import.tf` for Terraform operations. #### Options for `cribl-tf-config-exporter export` {#export-options} Use the following options to control which resources to include in the export and how the resources are organized in the output directory. [Usage examples](#usage-examples) demonstrate common commands using these options. | Option | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------- | | `--output-dir`
| Output directory for exported Terraform files (default `.`). | | `--dry-run` | Preview the export without converting or writing files. | | `--include` | Export only the specified resource types. To specify multiple resource types, use a comma-separated list with no spaces or repeat the `--include` option. | | `--exclude` | Omit only the specified resource types from the export. To specify multiple resource types, use a comma-separated list with no spaces or repeat the `--exclude` option. | | `--group` | Export only resources from the specified Worker Groups or Edge Fleets. To specify multiple Groups or Fleets, use a comma-separated list with no spaces or repeat the `--group` option. | | `--flat` | Omit categorization of resources into subdirectories by Worker Group, Edge Node, and Cribl Search in the [output directory structure](#output-dir-structure). | | `--parallel` | Specify the maximum number of concurrent API calls (default `5`). | | `--verbose` | Enable debug logging. Shows details for skipped resources. | | `--org-id ` | ID for a Cribl.Cloud Organization. Use with `--workspace-id` for [authentication](#auth-tf-config-export). | | `--workspace-id` | ID for a Cribl.Cloud Workspace. Use with `--org-id` for [authentication](#auth-tf-config-export). | | `--server-url ` | Server URL for an on-prem deployment for [authentication](#auth-tf-config-export). | | `--cloud-domain ` | Specify a custom Cribl.Cloud domain to override the default domain, `cribl.cloud`. | #### Output Directory Structure {#output-dir-structure} By default, the output directory structure organizes resources into subdirectories based on Worker Groups, Edge Fleets, and Cribl Search as follows: - Worker Groups: `///` - Edge Fleets: `///` - Cribl Search (including the `default_search` group): `/search//` Resources with no Worker Group, Edge Fleet, or Cribl Search context, such as lakehouse and Cribl Lake datasets, are organized under the `global` subdirectory: `/global/`. If you use the `--flat` option, all resources are organized directly under `//`, with no categorization by Worker Group, Edge Fleet, or Cribl Search subdirectories. The `global/` subdirectory is also omitted in flat mode. ### `cribl-tf-config-exporter version` {#subcommand-version} Display the current version and build information for `cribl-tf-config-exporter`. ## Usage Examples {#usage-examples} | Purpose | Example | | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | Specify the server URL for authentication (on-prem).
| `cribl-tf-config-exporter export --server-url --output-dir ./tf` | | Specify the Organization and Workspace IDs for authentication (Cribl.Cloud). | `cribl-tf-config-exporter export --org-id staging-cloud-one --workspace-id main --output-dir ./tf` | | Preview resource counts and types without writing files.

Get a list of all discoverable resource types in your Cribl environment to use with `--include` or `--exclude`. | `cribl-tf-config-exporter export --dry-run` | | Export to `./tf`. | `cribl-tf-config-exporter export --output-dir ./tf` | | Export only Sources and Destinations. | `cribl-tf-config-exporter export --include criblio_source,criblio_destination` | | Export all resources except Grok files. | `cribl-tf-config-exporter export --exclude criblio_grok` | | Export resources only from the `default` Worker Group. | `cribl-tf-config-exporter export --group default` | | Use a flat [structure](#output-dir-structure) in the `.tf` output directory. | `cribl-tf-config-exporter export --output-dir ./tf --flat` | | Display the current version. | `cribl-tf-config-exporter version` | ## Prepare to Export and Migrate {#prepare-export-migrate} As you prepare to [export and migrate](#export-migrate) your Cribl configuration to Terraform, consider the following workflow approaches to help ensure a seamless process: - Before you actually export and migrate resources, run your `cribl-tf-config-exporter export` commands with the `--dry-run` option. Review the results to confirm resource counts and types and verify that discovery works as expected. This gives you a chance to refine and update your commands as needed. - Migrate incrementally to reduce the scope of each command and make validation more manageable. After you validate the outcome of each command, continue with another subset of resources in subsequent commands. For example: - Use the `--include` option to focus on a subset of resource types in each command. - Use the `--group` option for large deployments to restrict each command to a specific Worker Group or Edge Fleet. - Specify a dedicated output directory such as `./tf` to keep exported files organized and separate from other files. Isolating files in a dedicated output directory facilitates review and makes version control more straightforward. - Pin the Cribl Terraform provider version in `providers.tf` in your output directory (for example, `version = ">= 1.20.138"`). The `providers.tf` file is generated along with other Terraform files when you run `cribl-tf-config-exporter export`. Pinning a provider version helps prevent unexpected changes in functionality and behavior, and it maintains a consistent infrastructure state when you run `terraform apply` across different environments. - Use environment variables or a `terraform.tfvars` file to keep secrets, credentials, and sensitive information out of committed files. If you use `terraform.tfvars`, make sure to add it to your `.gitignore` file. ## Export Resources and Migrate to Terraform Management {#export-migrate} The following procedure generally describes how to use `cribl-tf-config-exporter` to export Cribl resources and migrate Cribl configurations to Terraform management. See [Copy a Configuration to a New Workspace in Cribl.Cloud](#copy-new-workspace-cloud) and [Migrate from an On-Prem Deployment to Cribl.Cloud](#migrate-onprem-cloud) for more detailed procedures. 1. Run the `cribl-tf-config-exporter export` command to generate your Cribl configuration and Terraform files. 1. In the output directory, review the generated `main.tf`, `variables.tf`, and `import.tf` files as well as any other generated HCL files. Confirm that the output directory contains the expected resources. - The count of discovered resources may not match the count of exported resources. Discovery counts all resources that `cribl-tf-config-exporter` finds via the Cribl API. Export skips the [excluded resources](#excluded-resources), and some default resources are [explicitly omitted](#skipped-default-resources), so `cribl-tf-config-exporter` may discover more resources than it exports. - If needed, update the generated `import.tf` file to [manage `default` resources](#default-resources). 1. In your command line interface, navigate to the output directory. 1. Run `terraform init` to initialize the Terraform project in the output directory. 1. Run `terraform validate` to check syntax accuracy and validity. You may need to manually adjust certain resources in complex configurations. 1. Run `terraform plan` to verify the configuration. 1. Run `terraform import` (or `terraform apply` if you are using import blocks) to bring resources under Terraform management. > The first time you run `terraform plan`, you may see a diff for certain resources (such as `criblio_group` and `criblio_source`). This diff does not mean that the existing Cribl resources are actually changing. Instead, it means that Terraform is reconciling its state with the live configuration of Cribl resources. After you run `terraform apply`, the state is updated and subsequent `terraform plan` executions should show no drift. > {.box .info} ### Copy a Configuration to a New Workspace in Cribl.Cloud {#copy-new-workspace-cloud} Follow these steps to copy a Cribl configuration from a source Workspace to a new target Workspace in Cribl.Cloud (for example, from a dev Workspace to a staging Workspace in the same Organization, or from a Workspace in Organization A to a Workspace in Organization B). The examples depict [authentication using environment variables](terraform-auth#env-vars-cloud), but you can use any of the supported [authentication methods for Cribl.Cloud](terraform-auth#terraform-auth-cloud). 1. Export Cribl resources from the source Workspace: ```bash # Set environment variables for source Workspace export CRIBL_ORGANIZATION_ID="source-org-id" export CRIBL_WORKSPACE_ID="source-workspace-id" export CRIBL_CLIENT_ID="your-client-id" export CRIBL_CLIENT_SECRET="your-client-secret" # Run the cribl-tf-config-exporter CLI tool cribl-tf-config-exporter export --output-dir ./tf ``` 1. Point the Terraform provider at the target Workspace using environment variables as shown below or by updating `providers.tf`: ```bash # Set environment variables for target Workspace export CRIBL_ORGANIZATION_ID="target-org-id" export CRIBL_WORKSPACE_ID="target-workspace-id" export CRIBL_CLIENT_ID="your-client-id" export CRIBL_CLIENT_SECRET="your-client-secret" ``` 1. Replace `import.tf` with a version that contains *only* import blocks for `default` resources. See [Manage `default` Resources](#default-resources) for details. 1. Apply the exported Cribl resources to the target Workspace: ```bash cd tf && terraform init && terraform plan && terraform apply ``` Because `cribl-tf-config-exporter` exports to standard Terraform HCL, the same Terraform modules work against any Workspace. To target a different Workspace, change only the authentication credentials and Workspace IDs and replace `import.tf` with a version that includes only `default` resources. ### Migrate from an On-Prem Deployment to Cribl.Cloud {#migrate-onprem-cloud} Follow these steps to migrate a Cribl configuration from an on-prem deployment to a new Cribl.Cloud deployment. > On-prem deployments export only global resources like Sources, Destinations, Routes, Pipelines, Packs, and Worker Groups and Edge Fleets. Although you can use `cribl-tf-config-exporter` to migrate most of your on-prem configuration, you must configure Cribl.Cloud-only resources for Cribl Search, Cribl Lake, and Lakehouse separately in the new Cribl.Cloud Workspace. > > In addition, some resource configurations differ between on-prem deployments and Cribl.Cloud. For example, on-prem Worker Groups include `onPrem = true`, which is `onPrem = false` for Cribl.Cloud Worker Groups. You must configure any such resources separately when migrating from on-prem to Cribl.Cloud. > {.box .info} The examples depict [authentication using environment variables](terraform-auth#env-vars-cloud) with automatic token management, but you can use any of the supported [authentication methods for Cribl.Cloud](terraform-auth#terraform-auth-cloud). 1. Export Cribl resources from the on-prem deployment: ```bash # Set environment variables for the on-prem deployment export CRIBL_ONPREM_SERVER_URL="https://cribl.example.com" export CRIBL_ONPREM_USERNAME="admin" export CRIBL_ONPREM_PASSWORD="admin" # Run the cribl-tf-config-exporter CLI tool cribl-tf-config-exporter export --server-url https://cribl.example.com --output-dir ./tf ``` 1. Update the environment variables to provide the Cribl.Cloud Organization ID, Workspace ID, and authentication credentials: ```bash # Set environment variables for the Cribl.Cloud Organization and Workspace export CRIBL_ORGANIZATION_ID="your-org-id" export CRIBL_WORKSPACE_ID="your-cloud-workspace-id" export CRIBL_CLIENT_ID="your-client-id" export CRIBL_CLIENT_SECRET="your-client-secret" ``` 1. Replace `import.tf` with a version that contains *only* import blocks for `default` resources. See [Manage `default` Resources](#default-resources) for details. 1. Apply the exported Cribl resources to Cribl.Cloud: ```bash cd tf && terraform init && terraform plan && terraform apply ``` ## Manage Sensitive Data When `cribl-tf-config-exporter` generates Terraform HCL files, it uses placeholders for sensitive data like tokens, secrets, and certificates. These placeholders are variable references that indicate where to supply the actual values. The README.md that `cribl-tf-config-exporter` generates explains how to provide the actual values via `terraform.tfvars` or environment variables. This ensures that sensitive data is not committed to version control and aligns with best practices for managing sensitive data in Terraform. ## Manage `default` Resources {#default-resources} The `import.tf` file that is generated when you run `cribl-tf-config-exporter export` includes import blocks for all exported resources, including: - User-created resources. - Default resources that exist in every Cribl environment, like the `default` Worker Group and Route. If you are migrating to a new Cribl environment (such as a new Workspace or a fresh Cribl.Cloud instance), you must update the generated `import.tf` file so that it includes *only* import blocks for `default` resources that already exist in the new Cribl environment. These import blocks for `default` resources must have matching module addresses in `main.tf`. In addition, `import.tf` must not include import blocks for any user-created resources that do not yet exist in the new environment. If `import.tf` does not contain import blocks for `default` resources with matching module addresses in `main.tf`, Terraform will try to create these resources from `main.tf` and fail because the `default` resources already exist in the new environment. If `import.tf` contains import blocks for user-created resources, the import will fail because the resources do not exist in the new environment. If `terraform plan` or `terraform apply` returns an `already exists` error for a resource, add an import block for that resource in `import.tf` and retry. The following table lists common `default` resources. It is not a complete list because `default` resources vary by Cribl versions, deployment types (Cribl.Cloud or on-prem), and the Cribl products that are in use. | Resource | Module Address (default [output directory structure](#output-dir-structure)) | Import ID | | --------------------------------------------------------- | ------------------------------------------------------------ | ---------------- | | `criblio_group` (default Worker Group) | `module.default_group.criblio_group.default` | `default` | | `criblio_group` (default Edge Fleet, if using Cribl Edge) | `module.default_fleet_group.criblio_group.default_fleet` | `default_fleet` | | `criblio_routes` (default group) | `module.default_routes.criblio_routes.default` | `default` | | `criblio_routes` (default_search, if using Cribl Search) | `module.default_search_routes.criblio_routes.default_search` | `default_search` | | `criblio_routes` (default_fleet, if using Cribl Edge) | `module.default_fleet_routes.criblio_routes.default_fleet` | `default_fleet` | If you use the `--flat` option to omit categorization by Worker Group, Edge Node, or Cribl Search in the [output directory structure](#output-dir-structure), the module addresses differ. Follow this example as a template for `import.tf` when migrating to a new Cribl environment: **Default Output Directory Structure** ```hcl # Import blocks for default resources that exist in every environment. # Include only import blocks for default resources that match module addresses in main.tf. # Module addresses follow the layout: _ (for example, default_group, default_routes). # Add import blocks for additional resources if terraform plan fails with "already exists" error. import { to = module.default_group.criblio_group.default id = "default" } import { to = module.default_fleet_group.criblio_group.default_fleet id = "default_fleet" } import { to = module.default_routes.criblio_routes.default id = "default" } import { to = module.default_search_routes.criblio_routes.default_search id = "default_search" } import { to = module.default_fleet_routes.criblio_routes.default_fleet id = "default_fleet" } ``` **Flat Output Directory Structure** ```hcl # Import blocks for default resources that exist in every environment. # Include only import blocks for default resources that match module addresses in main.tf. # Module addresses follow the layout: _ (for example, default_group, default_routes). # Add import blocks for additional resources if terraform plan fails with "already exists" error. import { to = module.group.criblio_group.group_default id = "default" } import { to = module.group.criblio_group.group_default_fleet id = "default_fleet" } import { to = module.routes.criblio_routes.routes_default_default id = "default" } import { to = module.routes.criblio_routes.routes_default_search_default_search id = "default_search" } import { to = module.routes.criblio_routes.routes_default_fleet_default_fleet id = "default_fleet" } ``` ## Excluded Resources {#excluded-resources} `cribl-tf-config-exporter` does not export the following resource types: - `criblio_commit` - `criblio_deploy` - `criblio_group_system_settings` - `criblio_key` - `criblio_lakehouse_dataset_connection` - `criblio_lookup_file` - `criblio_mapping_ruleset` - `criblio_notification` - `criblio_pack_lookups` - `criblio_search_usage_group` - `criblio_workspace` Exports include only user-created resources. `cribl-tf-config-exporter` does not export the following built-in and default resources: | Resource Type | IDs of Skipped Resources | | ------------- | ------------------------ | | `criblio_notification_target` | `system_email`

`system_notifications` | | `criblio_source`

| `in_syslog`

`in_syslog_default`

`in_syslog_tls` | | `criblio_destination`| `default`

`devnull` | | `criblio_pack` | `HelloPacks` | | `criblio_pack_source` | `test_pack_source`

All Sources in the `HelloPacks` pack | | `criblio_pack_destination` | `default`

`devnull`

All Destinations in the `HelloPacks` pack | | `criblio_event_breaker_ruleset` | Rulesets with `lib="cribl"` | | `criblio_pack_breakers`

`criblio_pack_vars`

`criblio_pack_routes` | All resources in the `HelloPacks` pack | | `criblio_search_dataset`

`criblio_cribl_lake_dataset` | `cribl:default` tag

`cribl_logs`

`cribl_metrics`

`default_events`

`default_logs`

`default_metrics`

`default_spans`

`S3` | | `criblio_search_dataset_provider` | `cribl_leader`

`cribl_edge`

`S3`

`cribl_s3sample_provider`

`cribl_meta`

`cribl_lake` | ### Enterprise Resource Support {#enterprise-resource-support} If the Cribl deployment does not have an [Enterprise license](https://cribl.io/pricing/), `cribl-tf-config-exporter` skips all Enterprise resources. ### Resource Support for On-Prem Deployments {#on-prem-resource-support} In on-prem deployments, `cribl-tf-config-exporter` skips the following resource types because they are available only in Cribl.Cloud: - Search resources (`criblio_search_*`) - Lake resources (`criblio_cribl_lake_*`) - Lakehouse resources In on-prem deployments, errors for these types are expected and do not cause the export to fail. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/terraform-code-examples.md ############################################################ # Cribl Terraform Provider Code Examples The Terraform provider code example in this section demonstrates how to use the [Cribl Terraform provider](https://github.com/criblio/terraform-provider-criblio) to [configure Cribl resources](terraform-configure-resources) in Cribl.Cloud, hybrid, and on-prem deployments. Before using the code example, follow the instructions to [authenticate](terraform-auth) with the Terraform provider. If you prefer, you can configure authentication with environment variables or a credentials file to keep sensitive information out of your Terraform configuration. > ##### About Code Examples > > Code examples require you to authenticate with the Cribl Terraform provider. Read the [Terraform provider authentication documentation](terraform-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available resource arguments. For a complete list of arguments for specific resources, refer to the documentation in the [Terraform Registry](https://registry.terraform.io/providers/criblio/criblio/latest/docs). > {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/terraform-configure-resources.md ############################################################ # Configure Resources with the Cribl Terraform Provider This code example demonstrates how to use the [Cribl Terraform provider](https://github.com/criblio/terraform-provider-criblio) to create the following resources in Cribl Stream: - A Worker Group to manage the configuration. - A [Syslog Source](/stream/sources-syslog/) to receive data on port 9021. - An [S3 Destination](/stream/destinations-s3/) to store processed data. - A [Pipeline](/stream/pipelines/) that filters events and keeps only data in the `eventSource` and `eventID` fields. - A [Route](/stream/routes/) that connects the Source, Pipeline, and Destination. This example also commits and deploys the resource configurations to the Worker Group to make them active. > ##### About Code Examples > > Code examples require you to authenticate with the Cribl Terraform provider. Read the [Terraform provider authentication documentation](terraform-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > For on-prem deployments, if `CRIBL_ONPREM_SERVER_URL` uses `https`, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available resource arguments. For a complete list of arguments for specific resources, refer to the documentation in the [Terraform Registry](https://registry.terraform.io/providers/criblio/criblio/latest/docs). > {.box .info} The Terraform configuration in this example is split into four files that together form one [Terraform module](https://developer.hashicorp.com/terraform/language/modules): - [`variables.tf`](#declare-input-variables) - [`terraform.tfvars`](#set-variable-values) - [`provider.tf`](#configure-terraform-provider) - [`main.tf`](#create-resources) Copy the example files into an empty local working directory as you complete the following sections. When you [run the example](#run-example), Terraform reads the files in your local working directory, resolves dependencies from attribute references (such as `group_id`), and creates resources in a single `terraform apply`. ## Declare Input Variables with `variables.tf` {#declare-input-variables} Copy `variables.tf` from the example into your local working directory. The file declares the input variables for the module. Each `variable` block gives a name, data type, and description for a value that you supply at apply time (for example, the Worker Group ID or S3 bucket name). Sensitive values such as API credentials and AWS keys are marked `sensitive = true` so Terraform does not print them in logs. In the Cribl.Cloud example, this file also declares variables for Organization ID, Workspace name, and API Credential values. The on-prem example declares only the Worker Group and S3 variables because on-prem login credentials are supplied through environment variables or a credentials file as described in [Authenticate in On-Prem Deployments](terraform-auth#terraform-auth-on-prem). **variables.tf (Cribl.Cloud)** ```hcl # User-supplied parameters # # Supply values for the declared variables in this file in terraform.tfvars. # # Required for Cribl.Cloud authentication: # - organization_id: Organization ID # - workspace_id: Workspace name # - client_id: Client ID for your API Credential # - client_secret: Client Secret for your API Credential # # Required for the Worker Group: # - worker_group_id: ID for the new Worker Group (must not already exist) # # Required for the S3 Destination: # - aws_api_key: AWS Access Key ID # - aws_secret_key: AWS Secret Access Key # - aws_bucket_name: S3 bucket name # - aws_region: S3 bucket region, such as us-east-2 # # To create an API Credential, see: # https://docs.cribl.io/cribl-as-code/terraform-auth/#terraform-auth-cloud variable "organization_id" { type = string description = "Cribl.Cloud Organization ID" } variable "workspace_id" { type = string description = "Cribl.Cloud Workspace name" } variable "worker_group_id" { type = string description = "ID for the new Worker Group. Must not already exist in your deployment." } variable "aws_api_key" { type = string description = "AWS Access Key ID for the S3 Destination" sensitive = true } variable "aws_secret_key" { type = string description = "AWS Secret Access Key for the S3 Destination" sensitive = true } variable "aws_bucket_name" { type = string description = "S3 bucket name for the S3 Destination" } variable "aws_region" { type = string description = "AWS region for the S3 bucket, such as us-east-2" } variable "client_id" { type = string description = "Client ID from your Cribl API Credential" sensitive = true } variable "client_secret" { type = string description = "Client Secret from your Cribl API Credential" sensitive = true } ``` **variables.tf (On-Prem)** ```hcl # User-supplied parameters # # Supply values for the declared variables in this file in terraform.tfvars. # # Required for the Worker Group: # - worker_group_id: ID for the new Worker Group (must not already exist) # # Required for the S3 Destination: # - aws_api_key: AWS Access Key ID # - aws_secret_key: AWS Secret Access Key # - aws_bucket_name: S3 bucket name # - aws_region: S3 bucket region, such as us-east-2 variable "worker_group_id" { type = string description = "ID for the new Worker Group. Must not already exist in your deployment." } variable "aws_api_key" { type = string description = "AWS Access Key ID for the S3 Destination" sensitive = true } variable "aws_secret_key" { type = string description = "AWS Secret Access Key for the S3 Destination" sensitive = true } variable "aws_bucket_name" { type = string description = "S3 bucket name for the S3 Destination" } variable "aws_region" { type = string description = "AWS region for the S3 bucket, such as us-east-2" } ``` ## Set Variable Values with `terraform.tfvars` {#set-variable-values} This example uses a `terraform.tfvars` file to supply the values for the input variables declared in [`variables.tf`](#declare-input-variables). Copy `terraform.tfvars` from the example into your local working directory and replace each placeholder with a value for your deployment. Terraform loads `terraform.tfvars` automatically when you run `terraform plan` or `terraform apply`. If you don't want to use a `terraform.tfvars` file to set variable values, you can use one of these methods instead: - Pass values on the command line with `-var` or `-var-file`. - Set `TF_VAR_` environment variables. > Do not commit `terraform.tfvars` or any other files that contain sensitive information to version control. > {.box .warning} **terraform.tfvars (Cribl.Cloud)** ```hcl # Copy this file to terraform.tfvars and replace each placeholder with the value # for your Cribl.Cloud deployment. Do not commit terraform.tfvars to version control. organization_id = "your-organization-id" workspace_id = "your-workspace-name" client_id = "client-id-from-your-api-credential" client_secret = "client-secret-from-your-api-credential" worker_group_id = "id-for-new-worker-group-must-not-already-exist" aws_api_key = "your-aws-access-key-id" aws_secret_key = "your-aws-secret-access-key" aws_bucket_name = "your-s3-bucket-name" aws_region = "your-s3-bucket-region-such-as-us-east-2" ``` **terraform.tfvars (On-Prem)** ```hcl # Copy this file to terraform.tfvars and replace each placeholder with the value # for your on-prem deployment. Do not commit terraform.tfvars to version control. worker_group_id = "id-for-new-worker-group-must-not-already-exist" aws_api_key = "your-aws-access-key-id" aws_secret_key = "your-aws-secret-access-key" aws_bucket_name = "your-s3-bucket-name" aws_region = "your-s3-bucket-region-such-as-us-east-2" ``` ## Configure Terraform Provider with `provider.tf` {#configure-terraform-provider} Copy `provider.tf` from the example into your local working directory. The file configures the [Cribl Terraform provider](https://registry.terraform.io/providers/criblio/criblio/latest/docs) and declares the `criblio` provider source and minimum version in a `terraform` block. - In the **Cribl.Cloud** example, the `provider "criblio"` block sets Organization ID, Workspace name, and API Credential values from the variables you supply in [`terraform.tfvars`](#set-variable-values). - In the **on-prem** example, the `provider "criblio"` block is empty. Configure authentication using environment variables or a credentials file as described in [Authenticate in On-Prem Deployments](terraform-auth#terraform-auth-on-prem). **provider.tf (Cribl.Cloud)** ```hcl # Configure provider # # Authenticates for Cribl.Cloud using organization_id, workspace_id, client_id, # and client_secret declared in variables.tf. Supply their values in terraform.tfvars. # # For other authentication methods, see: # https://docs.cribl.io/cribl-as-code/terraform-auth/ terraform { required_providers { criblio = { source = "criblio/criblio" version = ">= 1.20.138" } } } provider "criblio" { organization_id = var.organization_id workspace_id = var.workspace_id client_id = var.client_id client_secret = var.client_secret } ``` **provider.tf (On-Prem)** ```hcl # Configure provider # # The provider block is empty. Configure authentication using # environment variables or a credentials file as described in # https://docs.cribl.io/cribl-as-code/terraform-auth/#terraform-auth-on-prem. terraform { required_providers { criblio = { source = "criblio/criblio" version = ">= 1.20.138" } } } provider "criblio" { } ``` ## Create Cribl Stream Resources with `main.tf` {#create-resources} Copy `main.tf` from the example into your local working directory. The file defines the Cribl Stream resources that the example creates, in dependency order: 1. **`criblio_group`** creates a new Worker Group. 1. **`criblio_source`** creates a Syslog Source that listens on port 9021. 1. **`criblio_destination`** creates an S3 Destination that uses `aws_bucket_name`, `aws_region`, `aws_api_key`, and `aws_secret_key`. 1. **`criblio_pipeline`** creates a Pipeline with an Eval function that keeps only the `eventSource` and `eventID` fields. 1. **`criblio_routes`** updates the Routing table with a Route from the Syslog Source through the Pipeline to the S3 Destination. The `criblio_routes` resource requires a complete representation of the Routing table, so the example includes a `default` catch-all Route to preserve existing behavior. 1. **`criblio_commit`** commits the Worker Group configuration. 1. **`criblio_config_version`** (data source) reads the version ID produced by the commit. 1. **`criblio_deploy`** deploys the committed configuration to the Worker Group. In the Cribl.Cloud example, the Worker Group is provisioned in AWS (`on_prem = false`). In the on-prem example, the Worker Group sets `on_prem = true` and omits cloud provisioning settings. **main.tf (Cribl.Cloud)** ```hcl # Create Worker Group resource "criblio_group" "example" { id = var.worker_group_id name = var.worker_group_id product = "stream" on_prem = false is_fleet = false worker_remote_access = true estimated_ingest_rate = 2048 # Equivalent to 24 MB/s with 9 Worker Processes provisioned = false cloud = { provider = "aws" region = "us-east-1" # Replace with a different AWS region if desired } } # Create Syslog Source resource "criblio_source" "syslog" { id = "in-syslog-9021" group_id = criblio_group.example.id input_syslog = { id = "in-syslog-9021" type = "syslog" host = "0.0.0.0" tcp_port = 9021 # Replace with a different port number if desired disabled = false send_to_routes = true tls = { disabled = true } } depends_on = [criblio_group.example] } # Create S3 Destination resource "criblio_destination" "s3" { id = "out_s3" group_id = criblio_group.example.id output_s3 = { id = "out_s3" type = "s3" bucket = var.aws_bucket_name region = var.aws_region aws_api_key = var.aws_api_key aws_secret_key = var.aws_secret_key stage_path = "/tmp/cribl_stage" compress = "gzip" compression_level = "best_speed" empty_dir_cleanup_sec = 300 } depends_on = [criblio_group.example] } # Create Pipeline resource "criblio_pipeline" "filter" { id = "my_pipeline" group_id = criblio_group.example.id conf = { async_func_timeout = 1000 functions = [ { id = "eval" filter = "true" disabled = false final = true conf = jsonencode({ remove = ["*"] keep = ["eventSource", "eventID"] }) } ] } depends_on = [criblio_group.example] } # Create Routes resource "criblio_routes" "main" { group_id = criblio_group.example.id id = "default" # Routing table ID (do not change; the supported value is default) routes = [ { name = "your_route" # Replace with the name of the Route description = "This is my new Route" # Replace with the desired Route description pipeline = criblio_pipeline.filter.id output = criblio_destination.s3.id filter = "__inputId=='in-syslog-9021'" final = true disabled = false }, { name = "default" pipeline = "main" output = "default" filter = "true" final = false disabled = false } ] depends_on = [ criblio_source.syslog, criblio_destination.s3, criblio_pipeline.filter, ] } # Commit configuration resource "criblio_commit" "example" { effective = true group = criblio_group.example.id message = "Commit for Cribl Stream example" depends_on = [criblio_routes.main] } # Read config version data "criblio_config_version" "latest" { id = criblio_group.example.id depends_on = [criblio_commit.example] } # Deploy configuration resource "criblio_deploy" "example" { id = criblio_group.example.id version = data.criblio_config_version.latest.items[0] } ``` **main.tf (On-Prem)** ```hcl # Create Worker Group resource "criblio_group" "example" { id = var.worker_group_id name = var.worker_group_id product = "stream" on_prem = true is_fleet = false worker_remote_access = true provisioned = false } # Create Syslog Source resource "criblio_source" "syslog" { id = "in-syslog-9021" group_id = criblio_group.example.id input_syslog = { id = "in-syslog-9021" type = "syslog" host = "0.0.0.0" tcp_port = 9021 # Replace with a different port number if desired disabled = false send_to_routes = true tls = { disabled = true } } depends_on = [criblio_group.example] } # Create S3 Destination resource "criblio_destination" "s3" { id = "out_s3" group_id = criblio_group.example.id output_s3 = { id = "out_s3" type = "s3" bucket = var.aws_bucket_name region = var.aws_region aws_api_key = var.aws_api_key aws_secret_key = var.aws_secret_key stage_path = "/tmp/cribl_stage" compress = "gzip" compression_level = "best_speed" empty_dir_cleanup_sec = 300 } depends_on = [criblio_group.example] } # Create Pipeline resource "criblio_pipeline" "filter" { id = "my_pipeline" group_id = criblio_group.example.id conf = { async_func_timeout = 1000 functions = [ { id = "eval" filter = "true" disabled = false final = true conf = jsonencode({ remove = ["*"] keep = ["eventSource", "eventID"] }) } ] } depends_on = [criblio_group.example] } # Create Routes resource "criblio_routes" "main" { group_id = criblio_group.example.id id = "default" # Routing table ID (do not change; the supported value is default) routes = [ { name = "your_route" # Replace with the name of the Route description = "This is my new Route" # Replace with the desired Route description pipeline = criblio_pipeline.filter.id output = criblio_destination.s3.id filter = "__inputId=='in-syslog-9021'" final = true disabled = false }, { name = "default" pipeline = "main" output = "default" filter = "true" final = false disabled = false } ] depends_on = [ criblio_source.syslog, criblio_destination.s3, criblio_pipeline.filter, ] } # Commit configuration resource "criblio_commit" "example" { effective = true group = criblio_group.example.id message = "Commit for Cribl Stream example" depends_on = [criblio_routes.main] } # Read config version data "criblio_config_version" "latest" { id = criblio_group.example.id depends_on = [criblio_commit.example] } # Deploy configuration resource "criblio_deploy" "example" { id = criblio_group.example.id version = data.criblio_config_version.latest.items[0] } ``` ## Run the Example {#run-example} Complete the preceding sections to copy the example files into your local working directory and set variable values in [`terraform.tfvars`](#set-variable-values). Before you run the example, confirm that [Terraform](https://developer.hashicorp.com/terraform/install) 1.0 or later is installed. **Run Example (Cribl.Cloud)** 1. Open a terminal in your local working directory and run `terraform init` to download and install the provider plugin: ```bash terraform init ``` 1. Review the planned changes: ```bash terraform plan ``` 1. Apply the configuration: ```bash terraform apply ``` 1. Review the execution plan that `terraform apply` displays and type `yes` when Terraform prompts you to apply the changes. **Run Example (On-Prem)** 1. Configure authentication using environment variables or a credentials file as described in [Authenticate in On-Prem Deployments](terraform-auth#terraform-auth-on-prem). 1. Open a terminal in your local working directory and run `terraform init` to download and install the provider plugin: ```bash terraform init ``` 1. Review the planned changes: ```bash terraform plan ``` 1. Apply the configuration: ```bash terraform apply ``` 1. Review the execution plan that `terraform apply` displays and type `yes` when Terraform prompts you to apply the changes. After a successful `terraform apply`, your Cribl Stream deployment has a new Worker Group with a Syslog Source on port 9021, a Pipeline, an S3 Destination, and a Route that connects them. The Worker Group configuration is committed and deployed. ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdks.md ############################################################ # Cribl SDKs (Preview) > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} > Cribl has stopped active development of the Go and TypeScript SDKs and is now open sourcing them as community resources on the [Cribl Community GitHub organization](https://github.com/Cribl-Community). You can continue using the SDKs and build on them, but Cribl support will be limited to critical issues only (such as security vulnerabilities or P0 blockers) for the defined transition period. Support will end on October 1, 2026. If you prefer to stay on a supported integration, consider migrating to the Python SDK, Terraform provider, or direct Cribl API access. > > The SDKs will continue to be available through their new home in the [Cribl Community GitHub organization](https://github.com/Cribl-Community), where you can keep using them, fork them, and extend them based on your own needs. To stay on a supported integration, consider migrating to the Python SDK, Terraform provider, or direct Cribl API access. > {.box .warning} The Cribl SDKs help streamline the process of integrating with Cribl and reduce the need for repetitive tasks. * The control plane SDK provides operational control over Cribl resources for both Cribl.Cloud and on-prem deployments. * The management plane SDK focuses on administrative tasks like configuring and managing Workspaces and is supported only on Cribl.Cloud. Use the [SDK code examples](sdk-code-examples) to start developing with the Cribl Python SDK in both Cribl.Cloud and on-prem deployments. The SDK GitHub repositories also include individual code example files for the [control plane](https://github.com/criblio/cribl_control_plane_sdk_python/tree/main/examples) and [management plane](https://github.com/criblio/cribl_cloud_management_sdk_python/tree/main/examples). For an opinionated starter template using the Cribl Python SDK, refer to the [Cribl as Code Quickstart](https://github.com/criblio/criblascode-quickstart) GitHub repository. The quickstart repo provides copyable examples for creating Worker Groups and installing Packs in Cribl.Cloud. Clone the quickstart repo and follow the instructions to develop a repeatable pipeline for your own deployment. ## GitHub Repositories for the Cribl Python SDKs {#github-python-sdks} Explore the GitHub repositories for the Cribl Python SDKs for installation information and usage examples: - [cribl_control_plane_sdk_python](https://github.com/criblio/cribl_control_plane_sdk_python): GitHub repository: Cribl Python SDK for the control plane (Cribl.Cloud and on-prem) - [cribl_cloud_management_sdk_python](https://github.com/criblio/cribl_cloud_management_sdk_python): GitHub repository: Cribl Python SDK for the management plane (Cribl.Cloud only) ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdks-auth.md ############################################################ # Authenticate with the Cribl SDKs (Preview) > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} > For on-prem deployments, if you're using SSO/OpenID Connect Authentication, you must toggle on **Allow login as Local User** in Cribl (see [Set Up Fallback Access](/iam/sso-on-prem/#fallback-access-on-prem)). You'll need to be a Local user when you authenticate. > > To use `https` for on-prem requests, you must [Configure TLS](/stream/securing-configure-tls/). If you do not configure TLS, use `http` instead. Use `http` only for testing in development environments. In production, configure TLS and use `https` to secure your communications. > {.box .warning} The code examples in this topic demonstrate how to authenticate using the Cribl Python SDKs for the [control plane](https://github.com/criblio/cribl_control_plane_sdk_python) and [management plane](https://github.com/criblio/cribl_cloud_management_sdk_python/tree/main/examples). ## Token Management {#sdks-token-mgmt} All Cribl API requests require you to authenticate with a Bearer token, except `health.get` when the client uses the [global context](api#base-url-global) and `auth.tokens.get`. In Cribl, Bearer tokens are [JSON Web Tokens (JWTs)](https://datatracker.ietf.org/doc/html/rfc7519). You must include a valid Bearer token in the appropriate configuration when initializing your SDK client. The Bearer token verifies your identity and ensures secure access to the requested resources. The SDKs automatically manage the `Authorization` header for all subsequent requests once properly authenticated. - In Cribl.Cloud and hybrid deployments, Bearer tokens are valid for `24` hours. - In on-prem deployments, Bearer tokens expire according to the value you provide for the **Auth token TTL** setting at **Settings** > **Global** > **General Settings** > **API Server Settings** > **Advanced**. The default setting is `3600` seconds (`1` hour). {scale="90%" border="true"} In Cribl.Cloud and hybrid deployments, use the `client_oauth` security scheme. The SDK uses the OAuth credentials that you provide to obtain a Bearer token and refresh the token within its expiration window using the standard OAuth2 flow. In on-prem deployments, use the `bearer_auth` security scheme. The SDK uses the username/password credentials that you provide to obtain a Bearer token. Automatically refreshing the Bearer token within its expiration window requires a callback function as shown in the authentication example. ## Authenticate in Cribl.Cloud and Hybrid Deployments {#sdks-auth-cloud} To authenticate for the control plane or management plane SDK, first create an API Credential. The API Credential provides a **Client ID** and **Client Secret**, which you must provide in your authentication configuration. You can create API Credentials with the `api_credentials.create` method in the [Cribl Python SDK for the management plane](https://github.com/criblio/cribl_cloud_management_sdk_python). However, you must first create the initial API Credential manually in the Cribl UI. This is necessary because you need the `CLIENT_ID` and `CLIENT_SECRET` for an existing API Credential to create an authenticated SDK client to make subsequent requests, including [requests to create new API Credentials](sdk-create-api-credentials). To create an API Credential in the Cribl UI: 1. Log in to Cribl.Cloud as an Owner or an Admin. 1. On the top bar, select **Products**, and then select **Cribl**. 1. In the sidebar, select **Organization**, and then select **API Credentials**. 1. Select **Add Credential**. 1. Enter a **Name** and an optional **Description**. 1. In the **Organization Permissions** drop-down menu, select a [Permission](/iam/permissions#organization) to apply for the API Credential. **Organization Permissions** are available on [certain plan/license tiers](https://cribl.io/pricing/). Without a proper license, all API Credentials are granted the **Admin** Permission. - The **Admin** or **Owner** Permission automatically grants admin access on all Workspaces. - If you choose the **User** Permission, under **Workspace Access**, define the desired [Permissions](/iam/permissions#workspace) for specific [Workspaces](/stream/workspaces) and Cribl products. - To grant read-only access on [individual Cribl Search resources](/search/sharing#share-datasets-dashboards) (for example, for a service account that connects to Cribl Search via API), select the **User** Permission on the Organization, the **Member** Permission on the Workspace, and either the **User** or **Editor** Permission on Cribl Search. The **Admin** Permission automatically grants full access to all Cribl Search resources. - The **Billing Reader** Permission grants read-only access to billing information for the Organization. It does not grant access to Workspaces or products. 1. (Optional) Under **IP Allowlist**, you can restrict API access for the Credential to specific IPv4 Classless Inter-Domain Routing (CIDR) ranges. Select **Add CIDR** and enter the desired range. You can add a maximum of 10 CIDR ranges. 1. Select **Save**. The **API Credentials** page displays the new API Credential within a few seconds. The API Credential includes a **Client ID** and a **Client Secret** that Organization Owners and Admins can use to generate Bearer tokens. Organization Owners and Admins can view, edit, and disable existing API Credentials. Only Owners can delete API Credentials. > The **Client ID** and **Client Secret** are sensitive information and should be kept private. > {.box .info} Next, configure authentication as shown in the following example. Replace the placeholder values in the example request with your OAuth credentials (the **Client ID** and **Client Secret** from the API Credential). Base URLs are initialized during authentication, so make sure to replace the placeholder values for your Organizaton ID and Workspace name as well. If you prefer, you can create and save an `.env` file to keep sensitive information out of your source code. **Python SDK for Control Plane (Cribl.Cloud and Hybrid)** ```python """ Replace the placeholder values for CLIENT_ID, CLIENT_SECRET, ORG_ID, and WORKSPACE_NAME with your Client ID and Secret, Organization ID, and Workspace name. To get your CLIENT_ID and CLIENT_SECRET values, follow the steps at https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. Your Client ID and Secret are sensitive information and should be kept private. NOTE: This example is for Cribl.Cloud and hybrid deployments only. """ import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import Security, SchemeClientOauth # Cribl.Cloud configuration: Replace the placeholder values CLIENT_ID = "your-client-id" # Replace with your OAuth2 Client ID CLIENT_SECRET = "your-client-secret" # Replace with your OAuth2 Client Secret ORG_ID = "your-org-id" # Replace with your Organization ID WORKSPACE_NAME = "main" # Replace with your Workspace name base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" async def main(): # Create authenticated SDK client with OAuth2 client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) client = CriblControlPlane(server_url=base_url, security=security) print(f"✅ Cribl SDK client created for Cribl.Cloud deployment") # Validate connection, and list all git branches response = await client.versions.branches.list_async() branches = "\n\t".join([branch.id for branch in (response.items or [])]) print(f"✅ Client works! Your list of branches:\n\t{branches}") if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: status_code = getattr(error, "status_code", None) if status_code == 401: print("⚠️ Authentication failed! Check your CLIENT_ID and CLIENT_SECRET.") elif status_code == 429: print("⚠️ Uh oh, you've reached the rate limit! Try again in a few seconds.") else: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Management Plane (Cribl.Cloud)** ```python """ Cribl.Cloud Authentication Example This example demonstrates how to configure authentication on Cribl.Cloud using OAuth2 credentials. 1. Create an SDK client with OAuth2 client credentials using the client_oauth security scheme. 2. Automatically handle token exchange and refresh. 3. Validate the connection by checking health status and listing Workspaces. Prerequisites: Replace the placeholder values for ORG_ID, CLIENT_ID, and CLIENT_SECRET with your Organization ID and Client ID and Secret. To get your Client ID and Secret, follow the steps at https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. Your Client ID and Secret are sensitive information and should be kept private. NOTE: This example is for Cribl.Cloud only. It does not require .env file configuration. """ import asyncio from cribl_mgmt_plane import CriblMgmtPlane, errors, models # Cribl.Cloud configuration: Replace the placeholder values CLIENT_ID = "your-client-id" # Replace with your OAuth2 Client ID CLIENT_SECRET = "your-client-secret" # Replace with your OAuth2 Client Secret ORG_ID = "your-org-id" # Replace with your Organization ID # Token URL and audience for Cribl.Cloud OAuth2 TOKEN_URL = "https://login.cribl.cloud/oauth/token" AUDIENCE = "https://api.cribl.cloud" async def main(): # Create authenticated SDK client with OAuth2 client_oauth = models.SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url=TOKEN_URL, audience=AUDIENCE, ) security = models.Security(client_oauth=client_oauth) async with CriblMgmtPlane(security=security) as cmp_client: try: print("✅ Cribl.Cloud Management Plane SDK client created") # Validate connection with health check health_response = await cmp_client.health.get_async() status = health_response.status or "unknown" # type: ignore print(f"✅ Health check passed! Status: {status}") # List all Workspaces for the Organization workspaces_response = await cmp_client.workspaces.list_async( organization_id=ORG_ID ) items = workspaces_response.items # type: ignore count = workspaces_response.count # type: ignore message = f"✅ Client works! Found {count} Workspace(s):" if items else f"✅ Client works! No Workspaces found for Organization {ORG_ID}" print(message) for ws in items: alias_display = f" ({ws.alias})" if ws.alias else "" print(f" • {ws.workspace_id}{alias_display} - {ws.state.value} in {ws.region.value}") except errors.CriblMgmtPlaneError as e: if e.status_code == 401: print("⚠️ Authentication failed! Check your CLIENT_ID and CLIENT_SECRET.") elif e.status_code == 429: print("⚠️ Uh oh, you've reached the rate limit! Try again in a few seconds.") else: print(f"❌ Something went wrong: {e.message}") if __name__ == "__main__": asyncio.run(main()) ``` ## Authenticate in On-Prem Deployments {#sdks-auth-on-prem} To authenticate in on-prem deployments, provide your username and password in the authentication request. Base URLs are initialized during authentication, so make sure to replace the placeholder value for your server URL as well. Your username and password are sensitive information and should be kept private. On-prem deployments use a callback function to refresh the Bearer token when it expires. If you prefer, you can create and save an `.env` file to keep sensitive information out of your source code. **Python SDK for Control Plane (On-Prem)** ```python """ Replace the placeholder values for ONPREM_SERVER_URL, ONPREM_USERNAME, and ONPREM_PASSWORD with your server URL and username/password credentials. Your credentials are sensitive information and should be kept private. NOTE: This example is for on-prem deployments only. """ import asyncio import base64 import json from datetime import datetime, timedelta, timezone from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import Security # On-prem configuration: Replace the placeholder values ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password BASE_URL = f"{ONPREM_SERVER_URL}/api/v1" # Token cache _cached_token = None _token_expires_at = None def _get_jwt_exp(token: str) -> datetime: payload_b64 = token.split(".")[1] padding = "=" * (-len(payload_b64) % 4) payload = json.loads(base64.urlsafe_b64decode(payload_b64 + padding).decode("utf-8")) exp = payload.get("exp") if exp is None: raise ValueError("Token missing 'exp' field") return datetime.fromtimestamp(exp, tz=timezone.utc) async def main(): # Create client for retrieving Bearer token client = CriblControlPlane(server_url=BASE_URL) def callback() -> Security: global _cached_token, _token_expires_at # Check cache now = datetime.now(timezone.utc) if _cached_token and _token_expires_at and (now + timedelta(seconds=3)) < _token_expires_at: return Security(bearer_auth=_cached_token) # Retrieve Bearer token initially and refresh automatically when it expires response = client.auth.tokens.get( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token _token_expires_at = _get_jwt_exp(token) _cached_token = token return Security(bearer_auth=token) # Create authenticated SDK client client = CriblControlPlane(server_url=BASE_URL, security=callback) print(f"✅ Authenticated SDK client created for on-prem server") # Validate connection and list all git branches response = await client.versions.branches.list_async() branches = "\n\t".join([branch.id for branch in (response.items or [])]) print(f"✅ Client works! Your list of branches:\n\t{branches}") if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: status_code = getattr(error, "status_code", None) if status_code == 401: print("⚠️ Authentication failed! Check your USERNAME and PASSWORD.") else: print(f"❌ Something went wrong: {error}") ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdk-code-examples.md ############################################################ # Cribl SDK Code Examples > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} The SDK code examples in this section demonstrate how to use the Cribl Python SDKs for the [control plane](https://github.com/criblio/cribl_control_plane_sdk_python) and [management plane](https://github.com/criblio/cribl_cloud_management_sdk_python) for common use cases. Before using the code examples, follow the instructions to [authenticate](sdks-auth) your SDK requests. If you prefer, you can create and save an `.env` file to keep sensitive information out of your source code. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [SDK authentication documentation](sdks-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The Cribl SDK code examples cover the following use cases: - [Configure Worker Groups](sdk-configure-worker-groups) - [Configure Resources](sdk-configure-resources) - [Add a Cribl Search Pack and Create a Lake Dataset](sdk-search-pack-lake-dataset) - [Create New API Credentials](sdk-create-api-credentials) (management plane) ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdk-configure-worker-groups.md ############################################################ # Configure Worker Groups with the Cribl SDK > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} These code examples cover common use cases for using the [Cribl Python SDK for the control plane](https://github.com/criblio/cribl_control_plane_sdk_python) to configure [Worker Groups](/stream/deploy-distributed/#concepts). They demonstrate how to [create](#create-worker-group-sdk), [scale](#scale-worker-group-sdk), and [replicate](#replicate-worker-group-sdk) Worker Groups, as well as how to retrieve all Worker Groups to [confirm](#confirm-worker-group-sdk) their configurations. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [SDK authentication documentation](sdks-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} The code examples for [creating](#create-worker-group-sdk) and [scaling](#scale-worker-group-sdk) a Worker Group in Cribl.Cloud include the `estimatedIngestRate` property, which allows you to configure Worker Groups for optimal performance. For each supported `estimatedIngestRate` value, the following table maps the corresponding throughput and number of Worker Processes: | `estimatedIngestRate` | Throughput | Worker Processes | | --------------------- | ---------- | ---------------- | | 1024 | 12 MB/s | 6 | | 2048 | 24 MB/s | 9 | | 3072 | 36 MB/s | 14 | | 4096 | 48 MB/s | 21 | | 5120 | 60 MB/s | 30 | | 7168 | 84 MB/s | 45 | | 10240 | 120 MB/s | 62 | | 13312 | 156 MB/s | 93 | | 15360 | 180 MB/s | 186 | ## Create a Worker Group {#create-worker-group-sdk} This example creates a new Worker Group in Cribl Stream. In the Cribl.Cloud example, the [`estimatedIngestRate`](#est-ingest-rates-sdk) is set to `2048`, which is equivalent to a maximum of 24 MB/s with nine Worker Processes. **Python SDK for Control Plane (Cribl.Cloud)** ```python """ Create a Worker Group - Creates a new Worker Group in Cribl Stream. - Commits and deploys the Worker Group configuration to make it active. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Enterprise account. - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication and creating and deploying a Worker Group. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for Cribl Stream # resource configurations and API payloads in this file from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ConfigGroup, ConfigGroupCloud, CloudProvider, Security, SchemeClientOauth, ProductsCore, EstimatedIngestRateOptionsConfigGroup, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and Worker Group # definition block. Replace the placeholder values before executing # this file. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name WORKER_GROUP_ID = "your-group" # Replace with the ID to use for the new Worker Group CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential # URL block # Builds the base URL and Worker Group-specific URL to use for the # API requests that this file makes using the ORG_ID, WORKSPACE_NAME, # and WORKER_GROUP_ID provided in the user-supplied parameters block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Estimated ingest rate block # Sets the maximum estimated ingest throughput tier for the new Worker Group # using EstimatedIngestRateOptionsConfigGroup. RATE24_MB_PER_SEC is the 24 MB/s # tier, equivalent to 24 MB/s maximum estimated ingest rate with 9 Worker # Processes. This value is passed as estimated_ingest_rate to groups.create in # the Create Worker Group block. ESTIMATED_INGEST_RATE = EstimatedIngestRateOptionsConfigGroup.RATE24_MB_PER_SEC # Worker Group definition block # The configuration for a new Worker Group that uses the WORKER_GROUP_ID # provided in the user-supplied parameters block. The settings in this # configuration are passed to groups.create in the Create Worker Group block, # with ESTIMATED_INGEST_RATE from the estimated ingest rate block. group = ConfigGroup( id=WORKER_GROUP_ID, name="my-worker-group", description="Cribl.Cloud Worker Group", cloud=ConfigGroupCloud(provider=CloudProvider.AWS, region="us-west-2"), worker_remote_access=True, is_fleet=False, is_search=False, on_prem=False, provisioned=False, ) # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials, # creates the Worker Group, and commits and deploys the configuration. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer # token and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # Create Worker Group block # Checks for a Worker Group with the WORKER_GROUP_ID provided in the # user-supplied parameters block and exits if it already exists. # Otherwise, creates the Worker Group using settings from the Worker Group # definition block and ESTIMATED_INGEST_RATE from the Estimated ingest # rate block and prints a confirmation message. worker_group_response = cribl.groups.get(id=group.id, product=ProductsCore.STREAM) if worker_group_response.items and len(worker_group_response.items) > 0: print(f"❌ Worker Group already exists: {group.id}. Try a different group ID.") return cribl.groups.create( product=ProductsCore.STREAM, id=group.id, name=group.name, description=group.description, cloud=group.cloud, worker_remote_access=group.worker_remote_access, is_fleet=group.is_fleet, is_search=group.is_search, on_prem=group.on_prem, estimated_ingest_rate=ESTIMATED_INGEST_RATE, provisioned=group.provisioned, ) print(f"✅ Worker Group created: {group.id}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the # Deploy block. Raises an exception if the API returns no commit. # Otherwise, prints a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for create Worker Group example", effective=True, files=["."], server_url=group_url, ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print( f"✅ Committed configuration changes to the group: {group.id}, " f"commit ID: {version}" ) # Deploy block # Pushes the committed configuration version (using the commit ID from # the Commit block) to the Cribl Stream Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=group.id, version=version, ) print(f"✅ Worker Group changes deployed: {group.id}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Control Plane (On-Prem Deployment)** ```python """ Create a Worker Group - Creates a new Worker Group in Cribl Stream. NOTE: This example is for on-prem deployments only. Required to use this example: - An Enterprise license. - A server URL, which is used to build the base URL for the SDK calls. - A username and password, which are used to authenticate the SDK calls. The username and password credentials are sensitive information and should be kept private. """ # Import block # Imports asyncio so that the file can await the on-prem token request and # other asynchronous control plane calls (Worker Group create, commit, deploy). # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports Security (Bearer token wrapper after username/password login), # generated model types for Cribl Stream resources, ProductsCore for # product identifiers, and other API payloads from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ProductsCore, Security # User-supplied parameters block # Values to use in the URL block, Authentication block, and Worker Group # configuration block. Replace the placeholder values before executing # this file. ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password WORKER_GROUP_ID = "your-worker-group-id" # URL block # Builds the base URL and Worker Group-specific URL to use for the # API requests that this file makes using the ONPREM_SERVER_URL and # WORKER_GROUP_ID provided in the user-supplied parameters block. base_url = f"{ONPREM_SERVER_URL}/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your username and password, # creates the Worker Group, and commits and deploys the configuration. async def main(): # Authentication block # Constructs CriblControlPlane with the base_url from the URL block and # calls the on-prem authentication endpoint with the username and password # from the user-supplied parameters block. # Retrieves the Bearer token from the on-prem authentication endpoint # response and wraps the token in Security. # Reconstructs CriblControlPlane as an authenticated SDK client using the # same base_url and Security (which holds the Bearer token). cribl = CriblControlPlane(server_url=base_url) response = await cribl.auth.tokens.get_async( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token security = Security(bearer_auth=token) cribl = CriblControlPlane(server_url=base_url, security=security) # Create Worker Group block # Checks for a Worker Group with the WORKER_GROUP_ID provided in the # user-supplied parameters block and exits if it already exists. # Otherwise, creates the Worker Group and prints a confirmation message. worker_group_response = cribl.groups.get(id=WORKER_GROUP_ID, product=ProductsCore.STREAM) if worker_group_response.items and len(worker_group_response.items) > 0: print(f"❌ Worker Group already exists: {WORKER_GROUP_ID}. Try a different group ID.") return cribl.groups.create( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, name="my-worker-group", description="My Worker Group description", worker_remote_access=True, is_fleet=False, is_search=False, on_prem=True, ) print(f"✅ Worker Group created: {WORKER_GROUP_ID}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the # Deploy block. Raises an exception if the API returns no commit. # Otherwise, prints a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for Cribl Stream example for creating a Worker Group", server_url=group_url, effective=True, files=["."], ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from # the Commit block) to the Cribl Stream Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, version=version, ) print(f"✅ Worker Group changes deployed: {WORKER_GROUP_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ## Scale a Worker Group {#scale-worker-group-sdk} The Cribl.Cloud example scales a Worker Group to an [`estimatedIngestRate`](#est-ingest-rates-sdk) of 4096, which is equivalent to a maximum of 48 MB/s with 21 Worker Processes. The example also sets provisioned to `True` to activate Cribl.Cloud resources. The on-prem example assumes the Syslog Source load balancer (LB) is enabled on a Cribl Stream system with 6 physical cores hyperthreaded (12 vCPUs). Because the Syslog Source LB reserves an additional core, the example scales the Worker process count from the default to `-3`: two cores for system/API overhead plus one for the LB process, so the system spawns nine Worker Processes. For more information, see [Optimize a Distributed Deployment or Hybrid Group](/stream/scaling#optimize-a-distributed-deployment-or-hybrid-group) and [Choose a Process Count](/stream/scaling#choose-a-process-count). The on-prem example also updates the Worker Group system settings, commits and deploys the changes, and restarts the Worker Group to apply the changes. > The request bodies for the `groups.update` (Cribl.Cloud) and `system.settings.cribl.update` (on-prem) methods require a **complete** representation of the Worker Group or settings, respectively, that you want to update. These methods do not support partial updates. Cribl removes any omitted fields when updating the Worker Group or settings. > {.box .warning} **Python SDK for Control Plane (Cribl.Cloud)** ```python """ Scale (Provision) a Worker Group - Verifies that a Worker Group exists in Cribl Stream. - Updates estimated ingest rate and provisioning for the Worker Group. - Commits and deploys the Worker Group configuration to make it active. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Enterprise account (if you are scaling a non-default Worker Group). - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. - An existing Worker Group ID (WORKER_GROUP_ID) to scale. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication, scaling a Worker Group, and committing and # deploying the configuration. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for Cribl Stream # resource configurations and API payloads in this file from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ProductsCore, SchemeClientOauth, Security, EstimatedIngestRateOptionsConfigGroup, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and Scale Worker Group # block. Replace the placeholder values before executing this file. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name WORKER_GROUP_ID = "your-cloud-worker-group-id" # Replace with the Worker Group ID to scale CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential # URL block # Builds the base URL and Worker Group-specific URL to use for the API requests # that this file makes using the ORG_ID, WORKSPACE_NAME, and WORKER_GROUP_ID # from the user-supplied parameters block. The Worker Group URL is used for the # Commit block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Estimated ingest rate block # Target tier after scaling, using EstimatedIngestRateOptionsConfigGroup. # RATE48_MB_PER_SEC is the 48 MB/s tier, equivalent to 48 MB/s maximum estimated # ingest rate with 21 Worker Processes. This value is written to # estimated_ingest_rate in the Scale Worker Group block. SCALED_ESTIMATED_INGEST_RATE = EstimatedIngestRateOptionsConfigGroup.RATE48_MB_PER_SEC # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials, # verifies the Worker Group, updates scaling fields, and commits and deploys the # configuration. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer token # and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # Verify Worker Group block # Fetches the Worker Group using WORKER_GROUP_ID from the user-supplied # parameters block and exits if it does not exist so that scaling does # not run against a missing Worker Group. worker_group_response = cribl.groups.get(id=WORKER_GROUP_ID, product=ProductsCore.STREAM) if not worker_group_response.items or len(worker_group_response.items) == 0: print(f"❌ Worker Group not found: {WORKER_GROUP_ID}. Create the Worker Group first.") return group = worker_group_response.items[0] if not group or not group.id: print(f"❌ Worker Group not found: {WORKER_GROUP_ID}. Create the Worker Group first.") return # Scale Worker Group block # Sets estimated_ingest_rate to SCALED_ESTIMATED_INGEST_RATE from the Estimated # ingest rate block and provisioned to True, then persists the Worker Group with # groups.update and prints a confirmation message. group.estimated_ingest_rate = SCALED_ESTIMATED_INGEST_RATE group.provisioned = True cribl.groups.update( product=ProductsCore.STREAM, id=group.id, id_param=group.id, name=group.name, description=group.description, cloud=group.cloud, worker_remote_access=group.worker_remote_access, is_fleet=group.is_fleet, is_search=group.is_search, on_prem=group.on_prem, estimated_ingest_rate=group.estimated_ingest_rate, provisioned=group.provisioned, ) print(f"✅ Worker Group scaled and provisioned: {group.id}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the Deploy # block. Raises an exception if the API returns no commit. Otherwise, prints # a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for scale Worker Group example", effective=True, files=["."], server_url=group_url, ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {group.id}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from the # Commit block) to the Cribl Stream Worker Group so that Workers load and run # that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=group.id, version=version, ) print(f"✅ Worker Group changes deployed: {group.id}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Control Plane (On-Prem Deployment)** ```python """ Scale (Optimize) Worker Process settings - Verifies that an on-prem Worker Group exists in Cribl Stream. - Reads current system settings for the Worker Group. - Applies optimized Worker Process settings. - Updates system settings, commits, deploys, and restarts the Worker Group so that Workers pick up the changes. NOTE: This example is for on-prem deployments only. Required to use this example: - An Enterprise license. - A server URL, which is used to build the base URL for the SDK calls. - A username and password, which are used to authenticate the SDK calls. The username and password credentials are sensitive information and should be kept private. - An existing Worker Group to scale. The Cribl documentation provides more information about optimizing Worker Processes: https://docs.cribl.io/stream/scaling/#optimize-a-distributed-deployment-or-hybrid-group """ # Import block # Imports asyncio so that the file can await the on-prem token request and # other asynchronous control plane calls (settings read/update, commit, deploy, # restart). # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports Security (Bearer token wrapper after username/password login), # ProductsCore for product identifiers, WorkersTypeSystemSettingsConf for # Worker Process tuning fields, and other API payloads from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ProductsCore, Security, WorkersTypeSystemSettingsConf, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and other blocks. # Replace the placeholder values before executing this file. ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password WORKER_GROUP_ID = "your-worker-group-id" # URL block # Builds the base URL and Worker Group-specific URL to use for the API requests # that this file makes using the ONPREM_SERVER_URL and WORKER_GROUP_ID provided # in the user-supplied parameters block. The Worker Group URL is used for # system settings and commit calls. base_url = f"{ONPREM_SERVER_URL}/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your username and password, verifies # the Worker Group, reads and updates system settings for Worker Processes, # commits and deploys the configuration, then restarts the Worker Group. async def main(): # Authentication block # Constructs CriblControlPlane with the base_url from the URL block and # calls the on-prem authentication endpoint with the username and password # from the user-supplied parameters block. # Retrieves the Bearer token from the on-prem authentication endpoint # response and wraps the token in Security. # Reconstructs CriblControlPlane as an authenticated SDK client using the # same base_url and Security (which holds the Bearer token). cribl = CriblControlPlane(server_url=base_url) response = await cribl.auth.tokens.get_async( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token security = Security(bearer_auth=token) cribl = CriblControlPlane(server_url=base_url, security=security) # Verify Worker Group block # Fetches the Worker Group using WORKER_GROUP_ID from the user-supplied # parameters block and exits if it does not exist so that scaling does # not run against a missing Worker Group. worker_group_response = cribl.groups.get(id=WORKER_GROUP_ID, product=ProductsCore.STREAM) if not worker_group_response.items or len(worker_group_response.items) == 0: print(f"⚠️ Worker Group not found: {WORKER_GROUP_ID}. Please create it first.") return print(f"✅ Found Worker Group: {WORKER_GROUP_ID}") # Get system settings block # Loads the current Cribl system settings for the Worker Group using # group_url from the URL block. Raises an exception if no settings row is # returned. Prints the current Worker Process count, memory, and minimum # settings for visibility before changes. current_settings = cribl.system.settings.cribl.list(server_url=group_url) current_conf = current_settings.items[0] if current_settings.items else None if not current_conf: raise Exception("Failed to retrieve current system settings") print(f"📊 Current Worker Process settings:") print(f" Worker Process count: {current_conf.workers.count}") print(f" Memory: {current_conf.workers.memory} MB") print(f" Minimum Worker Processes: {current_conf.workers.minimum}") # Optimize Worker Process settings block # Builds WorkersTypeSystemSettingsConf for an example host: # Process count = -3 (six physical cores hyperthreaded for 12 vCPUs; # reserves 2 cores for system/API overhead plus 1 for the load # balancer process) # Memory: 2048 MB (default; 2 GB per Worker Process) # Minimum: 2 (spawn at least two Worker Processes) workers_config = WorkersTypeSystemSettingsConf( count=-3, # Negative number specifies the number of CPU cores to reserve for system/API overhead memory=2048, # Amount of heap memory available to each Worker Process, in MB minimum=2, # Minimum number of Worker Processes to spawn ) # Update system settings block # Copies the current system configuration and replaces the workers # section with workers_config from the optimize Worker Process settings # block, then persists the merged configuration with system.settings.cribl.update # using group_url from the URL block. updated_conf = current_conf.model_copy(update={"workers": workers_config}) cribl.system.settings.cribl.update( **updated_conf.model_dump(exclude_none=False), server_url=group_url, ) print(f"\n✅ Worker Process settings optimized:") print(f" Worker Process count: {workers_config.count}") print(f" Memory: {workers_config.memory} MB per Worker Process") print(f" Minimum Worker Processes: {workers_config.minimum}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the Deploy # block. Raises an exception if the API returns no commit. Otherwise, prints # a confirmation message. commit_response = cribl.versions.commits.create( message="Optimize Worker Process settings", effective=True, files=["."], server_url=group_url, ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the Worker Group: {WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from the # Commit block) to the Cribl Stream Worker Group so that Workers load and run # that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, version=version, ) print(f"✅ Worker Group changes deployed: {WORKER_GROUP_ID}") # Restart Worker Group block # Triggers a restart for the Worker Group using group_url from the URL block # so that Workers reload with the deployed system settings. print(f"\n🔄 Restarting Worker Group to apply changes...") cribl.system.settings.restart(server_url=group_url) print(f"✅ Worker Group restarted successfully") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ## Replicate a Worker Group {#replicate-worker-group-sdk} This example creates a replica Worker Group in Cribl Stream by cloning an existing Worker Group configuration. The request body uses the `source_group_id` parameter to specify the Worker Group to clone. The replica Worker Group inherits the configuration from the source Worker Group, including settings and resources like Sources, Destinations, and Pipelines. To run this example, you must have at least one existing Worker Group named `my-worker-group` in Cribl Stream to use as the source Worker Group. **Python SDK for Control Plane (Cribl.Cloud)** ```python """ Replicate a Worker Group - Verifies that a source Worker Group exists in Cribl Stream. - Creates a replica Worker Group cloned from the source with the same configuration. - Commits and deploys the replica Worker Group configuration to make it active. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Enterprise account. - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. - An existing Worker Group to replicate. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication, replicating a Worker Group, and committing and # deploying the replica configuration. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for Cribl Stream # resource configurations and API payloads in this file from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( CloudProvider, ConfigGroupCloud, EstimatedIngestRateOptionsConfigGroup, ProductsCore, SchemeClientOauth, Security, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and Replicate Worker # Group block. Replace the placeholder values before executing this file. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name SOURCE_WORKER_GROUP_ID = "my-worker-group" # Replace with the ID of the Worker Group to clone REPLICA_WORKER_GROUP_ID = "my-replica-worker-group" # Replace with the ID for the new replica Worker Group CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential # URL block # Builds the base URL and replica Worker Group-specific URL to use for the API # requests that this file makes using the ORG_ID, WORKSPACE_NAME, and # REPLICA_WORKER_GROUP_ID from the user-supplied parameters block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" group_url = f"{base_url}/m/{REPLICA_WORKER_GROUP_ID}" # Estimated ingest rate block # Sets the maximum estimated ingest throughput tier for the replica Worker Group # using EstimatedIngestRateOptionsConfigGroup. RATE24_MB_PER_SEC is the 24 MB/s # tier, equivalent to 24 MB/s maximum estimated ingest rate with 9 Worker # Processes. This value is passed as estimated_ingest_rate to groups.create in # the Replicate Worker Group block. ESTIMATED_INGEST_RATE = EstimatedIngestRateOptionsConfigGroup.RATE24_MB_PER_SEC # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials, # verifies the source Worker Group, creates the replica, and commits and deploys # the replica configuration. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer token # and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # Verify source Worker Group block # Fetches the source Worker Group using SOURCE_WORKER_GROUP_ID from the # user-supplied parameters block. Exits with a message if the group does not # exist so replication does not run without a valid clone source. source_group_response = cribl.groups.get( id=SOURCE_WORKER_GROUP_ID, product=ProductsCore.STREAM ) if not source_group_response.items or len(source_group_response.items) == 0: print(f"❌ Source Worker Group not found: {SOURCE_WORKER_GROUP_ID}. Create the source Worker Group first.") return # Replicate Worker Group block # Checks for a Worker Group with REPLICA_WORKER_GROUP_ID from the user-supplied # parameters block and exits if it already exists. Otherwise, creates the # replica using groups.create with source_group_id set to the source Worker # Group ID, cloud settings, and ESTIMATED_INGEST_RATE from the Estimated # ingest rate block, then prints a confirmation message. replica_group_response = cribl.groups.get( id=REPLICA_WORKER_GROUP_ID, product=ProductsCore.STREAM ) if replica_group_response.items and len(replica_group_response.items) > 0: print(f"❌ Replica Worker Group already exists: {REPLICA_WORKER_GROUP_ID}. Try a different Worker Group ID.") return cribl.groups.create( product=ProductsCore.STREAM, id=REPLICA_WORKER_GROUP_ID, name="my-replica-worker-group", description=f"Worker Group cloned from {SOURCE_WORKER_GROUP_ID} with identical configuration", cloud=ConfigGroupCloud(provider=CloudProvider.AWS, region="us-east-1"), worker_remote_access=True, is_fleet=False, is_search=False, on_prem=False, estimated_ingest_rate=ESTIMATED_INGEST_RATE, source_group_id=SOURCE_WORKER_GROUP_ID, ) print(f"✅ Worker Group replicated: {REPLICA_WORKER_GROUP_ID} (cloned from {SOURCE_WORKER_GROUP_ID})") # Commit block # Records a new version of the replica Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the Deploy # block. Raises an exception if the API returns no commit. Otherwise, prints # a confirmation message. Uses group_url from the URL block. commit_response = cribl.versions.commits.create( message="Commit for replicate Worker Group example", effective=True, files=["."], server_url=group_url, ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {REPLICA_WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from the # Commit block) to the Cribl Stream replica Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=REPLICA_WORKER_GROUP_ID, version=version, ) print(f"✅ Worker Group changes deployed: {REPLICA_WORKER_GROUP_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Control Plane (On-Prem Deployment)** ```python """ Replicate a Worker Group - Verifies that a source Worker Group exists in Cribl Stream. - Creates a replica Worker Group cloned from the source with the same configuration. - Commits and deploys the replica Worker Group configuration to make it active. NOTE: This example is for on-prem deployments only. Required to use this example: - An Enterprise license. - A server URL, which is used to build the base URL for the SDK calls. - A username and password, which are used to authenticate the SDK calls. The username and password credentials are sensitive information and should be kept private. - An existing Worker Group to replicate. """ # Import block # Imports asyncio so that the file can await the on-prem token request and # other asynchronous control plane calls (Worker Group replicate, commit, # deploy). # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports Security (Bearer token wrapper after username/password login), # ProductsCore for product identifiers, and other API payloads from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ProductsCore, Security # User-supplied parameters block # Values to use in the URL block, Authentication block, and Replicate Worker # Group block. Replace the placeholder values before executing this file. ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password SOURCE_WORKER_GROUP_ID = "my-worker-group" # Replace with the ID of the Worker Group to clone REPLICA_WORKER_GROUP_ID = "my-replica-worker-group" # Replace with the ID for the new replica Worker Group # URL block # Builds the base URL and replica Worker Group-specific URL to use for the # API requests that this file makes using the ONPREM_SERVER_URL and # REPLICA_WORKER_GROUP_ID from the user-supplied parameters block. base_url = f"{ONPREM_SERVER_URL}/api/v1" group_url = f"{base_url}/m/{REPLICA_WORKER_GROUP_ID}" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your username and password, verifies # the source Worker Group, creates the replica, and commits and deploys the # replica configuration. async def main(): # Authentication block # Constructs CriblControlPlane with the base_url from the URL block and # calls the on-prem authentication endpoint with the username and password # from the user-supplied parameters block. # Retrieves the Bearer token from the on-prem authentication endpoint # response and wraps the token in Security. # Reconstructs CriblControlPlane as an authenticated SDK client using the # same base_url and Security (which holds the Bearer token). cribl = CriblControlPlane(server_url=base_url) response = await cribl.auth.tokens.get_async( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token security = Security(bearer_auth=token) cribl = CriblControlPlane(server_url=base_url, security=security) # Verify source Worker Group block # Fetches the source Worker Group using SOURCE_WORKER_GROUP_ID from the # user-supplied parameters block and exits if it does not exist so that # replication does not run without a valid source Worker Group. source_group_response = cribl.groups.get(id=SOURCE_WORKER_GROUP_ID, product=ProductsCore.STREAM) if not source_group_response.items or len(source_group_response.items) == 0: print(f"❌ Source Worker Group not found: {SOURCE_WORKER_GROUP_ID}. Create the source Worker Group first.") return # Replicate Worker Group block # Checks for a Worker Group with REPLICA_WORKER_GROUP_ID from the user-supplied # parameters block and exits if it already exists. Otherwise, creates the # replica using groups.create with source_group_id set to the source Worker # Group ID, then prints a confirmation message. replica_group_response = cribl.groups.get(id=REPLICA_WORKER_GROUP_ID, product=ProductsCore.STREAM) if replica_group_response.items and len(replica_group_response.items) > 0: print(f"❌ Replica Worker Group already exists: {REPLICA_WORKER_GROUP_ID}. Try a different group ID.") return cribl.groups.create( product=ProductsCore.STREAM, id=REPLICA_WORKER_GROUP_ID, name="my-replica-worker-group", description=f"Worker Group cloned from {SOURCE_WORKER_GROUP_ID} with identical configuration", worker_remote_access=True, is_fleet=False, is_search=False, on_prem=True, source_group_id=SOURCE_WORKER_GROUP_ID, ) print(f"✅ Worker Group replicated: {REPLICA_WORKER_GROUP_ID} (cloned from {SOURCE_WORKER_GROUP_ID})") # Commit block # Records a new version of the replica Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the Deploy # block. Raises an exception if the API returns no commit. Otherwise, prints # a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for Cribl Stream example for replicating a Worker Group", server_url=group_url, effective=True, files=["."], ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {REPLICA_WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from the # Commit block) to the Cribl Stream replica Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=REPLICA_WORKER_GROUP_ID, version=version, ) print(f"✅ Worker Group changes deployed: {REPLICA_WORKER_GROUP_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ## Confirm Worker Group Configurations {#confirm-worker-group-sdk} Use this example to retrieve a list of all Worker Groups in Cribl Stream so that you can review and confirm their configurations. **Python SDK for Control Plane (Cribl.Cloud)** ```python """ List Worker Groups - Lists all Worker Group configurations for Cribl Stream in a Workspace. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication and listing Worker Groups. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for Cribl Stream # resource configurations and API payloads in this file from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ProductsCore, SchemeClientOauth, Security, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and List Worker Groups # block. Replace the placeholder values before executing this file. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential # URL block # Builds the base URL to use for the API requests that this file makes using the # ORG_ID and WORKSPACE_NAME provided in the user-supplied parameters block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials and # lists Worker Groups for Cribl Stream. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer token # and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # List Worker Groups block # Calls groups.list for Cribl Stream (ProductsCore.STREAM). If the response # includes items, prints each Worker Group configuration; otherwise prints # that no Worker Groups were found. worker_groups_response = cribl.groups.list(product=ProductsCore.STREAM) if worker_groups_response and worker_groups_response.result.items: print(f"✅ List of Worker Group Configurations:") for group in worker_groups_response.result.items: print(group) # Print the entire configuration for each Worker Group else: print(f"❌ No Worker Groups found.") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Control Plane (On-Prem Deployment)** ```python """ List Worker Groups - Lists all Worker Group configurations for Cribl Stream. NOTE: This example is for on-prem deployments only. Required to use this example: - A server URL, which is used to build the base URL for the SDK calls. - A username and password, which are used to authenticate the SDK calls. The username and password credentials are sensitive information and should be kept private. """ # Import block # Imports asyncio so that the file can await the on-prem token request and # other asynchronous control plane calls (listing Worker Groups). # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports Security (Bearer token wrapper after username/password login), # ProductsCore for product identifiers, and other API payloads from the # cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ProductsCore, Security, ) # User-supplied parameters block # Values to use in the URL block, Authentication block, and List Worker Groups # block. Replace the placeholder values before executing this file. ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password # URL block # Builds the base URL to use for the API requests that this file makes using the # ONPREM_SERVER_URL provided in the user-supplied parameters block. base_url = f"{ONPREM_SERVER_URL}/api/v1" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your username and password and lists # Worker Groups for Cribl Stream. async def main(): # Authentication block # Constructs CriblControlPlane with the base_url from the URL block and # calls the on-prem authentication endpoint with the username and password # from the user-supplied parameters block. # Retrieves the Bearer token from the on-prem authentication endpoint # response and wraps the token in Security. # Reconstructs CriblControlPlane as an authenticated SDK client using the # same base_url and Security (which holds the Bearer token). cribl = CriblControlPlane(server_url=base_url) response = await cribl.auth.tokens.get_async( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token security = Security(bearer_auth=token) cribl = CriblControlPlane(server_url=base_url, security=security) # List Worker Groups block # Calls groups.list for Cribl Stream (ProductsCore.STREAM). If the response # includes items, prints each Worker Group configuration; otherwise prints # that no Worker Groups were found. worker_groups_response = cribl.groups.list(product=ProductsCore.STREAM) if worker_groups_response and worker_groups_response.result.items: print(f"✅ List of Worker Group Configurations:") for group in worker_groups_response.result.items: print(group) # Print the entire configuration for each Worker Group else: print(f"❌ No Worker Groups found.") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdk-configure-resources.md ############################################################ # Configure Resources with the Cribl SDK > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} This code example demonstrates how to use the [Cribl Python SDK for the control plane](https://github.com/criblio/cribl_control_plane_sdk_python) to create the following resources in Cribl Stream: - A Worker Group to manage the configuration. - A [Syslog Source](/stream/sources-syslog/) to receive data on port 9021. - An [S3 Destination](/stream/destinations-s3/) to store processed data. - A [Pipeline](/stream/pipelines/) that filters events and keeps only data in the `eventSource` and `eventID` fields. - A [Route](/stream/routes/) that connects the Source, Pipeline, and Destination. This example also deploys the resource configurations to a Worker Group to make them active. > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [SDK authentication documentation](sdks-auth) to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > For on-prem deployments, to use `https` in request URLs, you must [Configure TLS](/stream/securing-configure-tls/). > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} **Python SDK for Control Plane (Cribl.Cloud)** ```python """ Configure Resources - Creates a new Worker Group in Cribl Stream. - Creates several resources in the new Worker Group: - Syslog Source to receive data on port 9021. - S3 Destination to store processed data. - Pipeline that filters events and keeps only data in the eventSource and eventID fields. - Updates the Routing table with a Route that sends matching events from the Source through the Pipeline to the Destination. - Commits and deploys the configuration to make it active. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Enterprise account. - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. - AWS S3 values for AWS_API_KEY, AWS_SECRET_KEY, AWS_BUCKET_NAME, and AWS_REGION, which are used to configure an S3 Destination. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication and creating and deploying resources. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for Cribl Stream # resource configurations and API payloads in this file from the # cribl_control_plane.models subpackage. # # Imports List (for list annotations) and the cast static typing helper from # the standard library typing module. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( ProductsCore, CreateInputInputSyslogSyslog2, CreateInputInputSyslogType2, CreateOutputOutputS3, CreateOutputTypeS3, CompressionOptions2, CompressionLevelOptions, Pipeline, RouteConf, RouteConfInput, PipelineConf, ConfInput, PipelineFunctionEval, PipelineFunctionEvalID, PipelineFunctionConf, FunctionConfSchemaEval, TLSSettingsServerSideType, Security, SchemeClientOauth, ConfigGroupCloud, CloudProvider, EstimatedIngestRateOptionsConfigGroup ) from typing import List, cast # User-supplied parameters block # Values to use in the URL block, Authentication block, and resource # configuration blocks. Replace the placeholder values before executing # this file. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name WORKER_GROUP_ID = "your-group" # Replace with the ID to use for the new Worker Group CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential SYSLOG_PORT = 9021 # Replace with a different port number if desired AWS_API_KEY = "your-aws-access-key-id" # Replace with your AWS Access Key ID AWS_SECRET_KEY = "your-aws-secret-access-key" # Replace with your AWS Secret Access Key AWS_BUCKET_NAME = "your-s3-bucket-name" # Replace with your S3 bucket name AWS_REGION = "your-s3-bucket-region" # Replace with your S3 bucket region, such as us-east-2 # URL block # Builds the base URL and Worker Group-specific URL to use for the # API requests that this file makes using the ORG_ID, WORKSPACE_NAME, # and WORKER_GROUP_ID provided in the user-supplied parameters block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Source definition block # The configuration for a new Syslog Source that listens on all interfaces, # has TLS disabled, and uses the SYSLOG_PORT value provided in the # user-supplied parameters block. This configuration is passed to the API # in the Create Source block. syslog_source = CreateInputInputSyslogSyslog2( id="in-syslog-9021", type=CreateInputInputSyslogType2.SYSLOG, host="0.0.0.0", tcp_port=SYSLOG_PORT, tls=TLSSettingsServerSideType(disabled=True), ) # Destination definition block # The configuration for a new S3 Destination that uses gzip + fast # compression, stages under /tmp/cribl_stage, and uses the AWS_BUCKET_NAME, # AWS_REGION, AWS_SECRET_KEY, and AWS_API_KEY from the user-supplied # parameters block. This configuration is passed to the API in the # Create Destination block. s3_destination = CreateOutputOutputS3( id="out_s3", type=CreateOutputTypeS3.S3, bucket=AWS_BUCKET_NAME, stage_path="/tmp/cribl_stage", region=AWS_REGION, aws_secret_key=AWS_SECRET_KEY, aws_api_key=AWS_API_KEY, compress=CompressionOptions2.GZIP, compression_level=CompressionLevelOptions.BEST_SPEED, empty_dir_cleanup_sec=300, ) # Pipeline definition block # The configuration for a new Pipeline with one Eval function that keeps only # eventSource and eventID. This configuration is passed to the API in the # Create Pipeline block. pipeline = Pipeline( id="my_pipeline", conf=PipelineConf( async_func_timeout=1000, functions=cast( List[PipelineFunctionConf], [ PipelineFunctionEval( filter_="true", conf=FunctionConfSchemaEval( remove=["*"], keep=["eventSource", "eventID"], ), id=PipelineFunctionEvalID.EVAL, final=True, ) ], ), ), ) # Route definition block # The configuration for a Route that matches only events from the Syslog Source and sends them through the Pipeline to the S3 Destination. Allows other Routes to run after it (final=False). route = RouteConf( final=False, id="default", # Routing table ID (do not change; the supported value is default) name="your_route", # Replace with the name of the Route pipeline=pipeline.id, output=s3_destination.id, filter_=f"__inputId=='{syslog_source.id}'", description="This is my new Route", # Replace with the desired description for the Route ) # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials, # creates the Worker Group and Stream resources, updates the Routing table, # and commits and deploys the configuration. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer # token and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # Create Worker Group block # Checks for a Worker Group with the WORKER_GROUP_ID provided in the # user-supplied parameters block and exits if it already exists. # Otherwise, creates the Worker Group and prints a confirmation message. worker_group_response = cribl.groups.get(id=WORKER_GROUP_ID, product=ProductsCore.STREAM) if worker_group_response.items and len(worker_group_response.items) > 0: print( f"❌ Worker Group already exists: {WORKER_GROUP_ID}. Try a different Worker Group ID." ) return cribl.groups.create( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, on_prem=False, worker_remote_access=True, is_fleet=False, is_search=False, name=WORKER_GROUP_ID, estimated_ingest_rate=EstimatedIngestRateOptionsConfigGroup.RATE12_MB_PER_SEC, cloud=ConfigGroupCloud( provider=CloudProvider.AWS, region="us-east-1" ), ) print(f"✅ Worker Group created: {WORKER_GROUP_ID}") # Create Source block # Creates a Syslog Source (based on the Source definition block) in the # new Worker Group and prints a confirmation message. cribl.sources.create(request=syslog_source, server_url=group_url) print(f"✅ Syslog source created: {syslog_source.id}") # Create Destination block # Creates an S3 Destination (based on the Destination definition block) # in the new Worker Group and prints a confirmation message. cribl.destinations.create(request=s3_destination, server_url=group_url) print(f"✅ S3 Destination created: {s3_destination.id}") # Create Pipeline block # Creates a Pipeline (based on the Pipeline definition block) in the new # Worker Group and prints a confirmation message. cribl.pipelines.create(id=pipeline.id, conf=ConfInput.model_validate(pipeline.conf.model_dump()), server_url=group_url) print(f"✅ Pipeline created: {pipeline.id}") # Update Routing table block # Fetches the current list of Routes and raises an exception if the API # returns nothing or the first Routes entry has no ID. Otherwise, prepends # the new Route (based on the Route definition block), saves the updated # Routing table, and prints a confirmation message. routes_list_response = cribl.routes.list(server_url=group_url) if not routes_list_response or not routes_list_response.result.items: raise Exception("No Routes found") routes = routes_list_response.result.items[0] if not routes or not routes.id: raise Exception("No Routes found") routes.routes = [route] + (routes.routes or []) routes_input = [ RouteConfInput.model_validate(r.model_dump()) for r in routes.routes ] cribl.routes.update( id_param=routes.id, id=routes.id, routes=routes_input, server_url=group_url ) print(f"✅ Route added: {route.id}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the # Deploy block. Raises an exception if the API returns no commit. # Otherwise, prints a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for Cribl Stream example", effective=True, files=["."], server_url=group_url ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from # the Commit block) to the Cribl Stream Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, version=version ) print(f"✅ Worker Group changes deployed: {WORKER_GROUP_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` **Python SDK for Control Plane (On-Prem Deployment)** ```python """ Configure Resources - Creates a new Worker Group in Cribl Stream. - Creates several resources in the new Worker Group: - Syslog Source to receive data on port 9021. - S3 Destination to store processed data. - Pipeline that filters events and keeps only data in the eventSource and eventID fields. - Updates the Routing table with a Route that sends matching events from the Source through the Pipeline to the Destination. - Commits and deploys the configuration to make it active. NOTE: This example is for on-prem deployments only. Required to use this example: - An Enterprise license. - A server URL, which is used to build the base URL for the SDK calls. - A username and password, which are used to authenticate the SDK calls. The username and password credentials are sensitive information and should be kept private. - AWS S3 values for AWS_API_KEY, AWS_SECRET_KEY, AWS_BUCKET_NAME, and AWS_REGION, which are used to configure an S3 Destination. """ # Import block # Imports asyncio so that the file can await the on-prem token request and # other asynchronous control plane calls (create resources, commit, deploy). # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports Security (Bearer token wrapper after username/password login), # generated model types for Cribl Stream resources, ProductsCore for # product identifiers, and other API payloads from the # cribl_control_plane.models subpackage. # # Imports List (for list annotations) and the cast static typing helper from # the standard library typing module. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import ( Security, ProductsCore, CreateInputInputSyslogSyslog2, CreateInputInputSyslogType2, CreateOutputOutputS3, CreateOutputTypeS3, CompressionOptions2, CompressionLevelOptions, Pipeline, RouteConf, RouteConfInput, PipelineConf, ConfInput, PipelineFunctionEval, PipelineFunctionEvalID, PipelineFunctionConf, FunctionConfSchemaEval, TLSSettingsServerSideType, ) from typing import List, cast # User-supplied parameters block # Values to use in the URL block, Authentication block, and resource # configuration blocks. Replace the placeholder values before executing # this file. ONPREM_SERVER_URL = "http://localhost:9000" # Replace with your server URL ONPREM_USERNAME = "admin" # Replace with your username ONPREM_PASSWORD = "admin" # Replace with your password WORKER_GROUP_ID = "your-worker-group-id" SYSLOG_PORT = 9021 # Replace with a different port number if desired AWS_API_KEY = "your-aws-access-key-id" # Replace with your AWS Access Key ID AWS_SECRET_KEY = "your-aws-secret-access-key" # Replace with your AWS Secret Access Key AWS_BUCKET_NAME = "your-s3-bucket-name" # Replace with your S3 bucket name AWS_REGION = "your-s3-bucket-region" # Replace with your S3 bucket region, such as us-east-2 # URL block # Builds the base URL and Worker Group-specific URL to use for the # API requests that this file makes using the ONPREM_SERVER_URL and # WORKER_GROUP_ID provided in the user-supplied parameters block. base_url = f"{ONPREM_SERVER_URL}/api/v1" group_url = f"{base_url}/m/{WORKER_GROUP_ID}" # Source definition block # The configuration for a new Syslog Source that listens on all interfaces, # has TLS disabled, and uses the SYSLOG_PORT value provided in the # user-supplied parameters block. This configuration is passed to the API # in the Create Source block. syslog_source = CreateInputInputSyslogSyslog2( id="in-syslog-9021", type=CreateInputInputSyslogType2.SYSLOG, host="0.0.0.0", tcp_port=SYSLOG_PORT, tls=TLSSettingsServerSideType(disabled=True), ) # Destination definition block # The configuration for a new S3 Destination that uses gzip + fast # compression, stages under /tmp/cribl_stage, and uses the AWS_BUCKET_NAME, # AWS_REGION, AWS_SECRET_KEY, and AWS_API_KEY from the user-supplied # parameters block. This configuration is passed to the API in the # Create Destination block. s3_destination = CreateOutputOutputS3( id="out_s3", type=CreateOutputTypeS3.S3, bucket=AWS_BUCKET_NAME, stage_path="/tmp/cribl_stage", region=AWS_REGION, aws_secret_key=AWS_SECRET_KEY, aws_api_key=AWS_API_KEY, compress=CompressionOptions2.GZIP, compression_level=CompressionLevelOptions.BEST_SPEED, empty_dir_cleanup_sec=300, ) # Pipeline definition block # The configuration for a new Pipeline with one Eval function that keeps only # eventSource and eventID. This configuration is passed to the API in the # Create Pipeline block. pipeline = Pipeline( id="my_pipeline", conf=PipelineConf( async_func_timeout=1000, functions=cast( List[PipelineFunctionConf], [ PipelineFunctionEval( filter_="true", conf=FunctionConfSchemaEval( remove=["*"], keep=["eventSource", "eventID"], ), id=PipelineFunctionEvalID.EVAL, final=True, ) ], ), ), ) # Route definition block # The configuration for a Route that matches only events from the Syslog Source and sends them through the Pipeline to the S3 Destination. Allows other Routes to run after it (final=False). route = RouteConf( final=False, id="default", # Routing table ID (do not change; the supported value is default) name="your_route", # Replace with the name of the Route pipeline=pipeline.id, output=s3_destination.id, filter_=f"__inputId=='{syslog_source.id}'", description="This is my new Route", # Replace with the desired description for the Route ) # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your username and password, # creates the Worker Group and Stream resources, updates the Routing table, # and commits and deploys the configuration. async def main(): # Authentication block # Constructs CriblControlPlane with the base_url from the URL block and # calls the on-prem authentication endpoint with the username and password # from the user-supplied parameters block. # Retrieves the Bearer token from the on-prem authentication endpoint # response and wraps the token in Security. # Reconstructs CriblControlPlane as an authenticated SDK client using the # same base_url and Security (which holds the Bearer token). cribl = CriblControlPlane(server_url=base_url) response = await cribl.auth.tokens.get_async( username=ONPREM_USERNAME, password=ONPREM_PASSWORD ) token = response.result.token security = Security(bearer_auth=token) cribl = CriblControlPlane(server_url=base_url, security=security) # Create Worker Group block # Checks for a Worker Group with the WORKER_GROUP_ID provided in the # user-supplied parameters block and exits if it already exists. # Otherwise, creates the Worker Group and prints a confirmation message. worker_group_response = cribl.groups.get(id=WORKER_GROUP_ID, product=ProductsCore.STREAM) if worker_group_response.items and len(worker_group_response.items) > 0: print( f"❌ Worker Group already exists: {WORKER_GROUP_ID}. Try a different Worker Group ID." ) return cribl.groups.create( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, on_prem=True, worker_remote_access=True, is_fleet=False, is_search=False, ) print(f"✅ Worker Group created: {WORKER_GROUP_ID}") # Create Source block # Creates a Syslog Source (based on the Source definition block) in the # new Worker Group and prints a confirmation message. cribl.sources.create(request=syslog_source, server_url=group_url) print(f"✅ Syslog source created: {syslog_source.id}") # Create Destination block # Creates an S3 Destination (based on the Destination definition block) # in the new Worker Group and prints a confirmation message. cribl.destinations.create(request=s3_destination, server_url=group_url) print(f"✅ S3 Destination created: {s3_destination.id}") # Create Pipeline block # Creates a Pipeline (based on the Pipeline definition block) in the new # Worker Group and prints a confirmation message. cribl.pipelines.create(id=pipeline.id, conf=ConfInput.model_validate(pipeline.conf.model_dump()), server_url=group_url) print(f"✅ Pipeline created: {pipeline.id}") # Update Routing table block # Fetches the current list of Routes and raises an exception if the API # returns nothing or the first Routes entry has no ID. Otherwise, prepends # the new Route (based on the Route definition block), saves the updated # Routing table, and prints a confirmation message. routes_list_response = cribl.routes.list(server_url=group_url) if not routes_list_response or not routes_list_response.result.items: raise Exception("No Routes found") routes = routes_list_response.result.items[0] if not routes or not routes.id: raise Exception("No Routes found") routes.routes = [route] + (routes.routes or []) routes_input = [ RouteConfInput.model_validate(r.model_dump()) for r in routes.routes ] cribl.routes.update( id_param=routes.id, id=routes.id, routes=routes_input, server_url=group_url ) print(f"✅ Route added: {route.id}") # Commit block # Records a new version of the Worker Group configuration, marks that # version as effective, and captures the commit ID to use in the # Deploy block. Raises an exception if the API returns no commit. # Otherwise, prints a confirmation message. commit_response = cribl.versions.commits.create( message="Commit for Cribl Stream example", effective=True, files=["."], server_url=group_url ) if not commit_response.items or len(commit_response.items) == 0: raise Exception("Failed to commit configuration changes") version = commit_response.items[0].commit print(f"✅ Committed configuration changes to the group: {WORKER_GROUP_ID}, commit ID: {version}") # Deploy block # Pushes the committed configuration version (using the commit ID from # the Commit block) to the Cribl Stream Worker Group so that Workers load # and run that version, then prints a confirmation message. cribl.groups.deploy( product=ProductsCore.STREAM, id=WORKER_GROUP_ID, version=version ) print(f"✅ Worker Group changes deployed: {WORKER_GROUP_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdk-search-pack-lake-dataset.md ############################################################ # Add a Cribl Search Pack and Create a Lake Dataset with the Cribl SDK > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} This code example demonstrates how to use the [Cribl Python SDK for the control plane](https://github.com/criblio/cribl_control_plane_sdk_python) to: - Add the [Search Pack](/search/packs/) named [Cribl Search AWS VPC Flow Logs](https://packs.cribl.io/packs/cribl-search-aws-vpc-flow-logs) from the Cribl Packs Dispensary. - Create a [Lake Dataset](/lake/datasets/) with a basic configuration: Dataset ID, Cribl Lake [storage location](/lake/storage-locations/), retention period of 30 days, and [Direct Access (HTTP)](/lake/direct-access-http/) disabled. This example includes the Pack URL for Cribl Search AWS VPC Flow Logs, which is used as the value of the `source` parameter. To get the URL for a different Pack, see [Get the URL for a Search Pack](#get-pack-url). > ##### About Code Examples > > Code examples use Bearer token authentication. Read the [SDK authentication documentation](sdks-auth) to learn how to configure authentication. The API Credential that you use to obtain the Bearer token must have the necessary [Permissions](/iam/permissions) for the operations in the code examples. > > Replace the variables in code examples with the corresponding information for your Cribl deployment. > > Cribl Search and Cribl Lake are available only on Cribl.Cloud, so this page does not include examples for on-prem deployments. > > Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the [API Reference](/api-reference). > {.box .info} **Python SDK for Control Plane (Cribl.Cloud)** ```python """ Add a Cribl Search Pack and Create a Lake Dataset - Installs the Cribl Search AWS VPC Flow Logs Pack from the Cribl Packs Dispensary (https://packs.cribl.io/packs/cribl-search-aws-vpc-flow-logs). - Creates a Lake Dataset with basic settings where you can store VPC flow log data. Executing this file does not ingest data. After you execute this file, update the AWS VPC Flow Logs Analysis Dashboard in the Pack to replace the default default dataset="cribl_search_sample" references with the DATASET_ID value used in this file. NOTE: This example is for Cribl.Cloud deployments only. Required to use this example: - A Cribl.Cloud Organization ID and Workspace name, which are used to build the base URL for the SDK calls. - The Client ID and Secret for a Cribl.Cloud API Credential, which are used to authenticate the SDK calls. To get the Client ID and Secret, follow https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. The Client ID and Secret are sensitive information and should be kept private. """ # Import block # Imports asyncio so that the file can run an asynchronous control plane # sequence for authentication, Pack installation, and Lake Dataset creation. # # Imports CriblControlPlane as the API client from the cribl_control_plane # SDK package. # # Imports model classes that provide the Python types used for API payloads # in this file from the cribl_control_plane.models subpackage. import asyncio from cribl_control_plane import CriblControlPlane from cribl_control_plane.models import Security, SchemeClientOauth # User-supplied parameters block # Values to use in the URL block, Authentication block, and resource # configuration blocks. Replace the placeholder values before executing # this file. # The PACK_URL, PACK_ID, and DATASET_ID example values are specific to the # Cribl Search AWS VPC Flow Logs Pack. To install a different Pack, follow # https://docs.cribl.io/cribl-as-code/api-search-pack-lake-dataset/#get-pack-url # and update the values for PACK_URL, PACK_ID, and DATASET_ID. ORG_ID = "your-org-id" # Replace with the Organization ID WORKSPACE_NAME = "your-workspace-name" # Replace with the Workspace name CLIENT_ID = "your-client-id" # Replace with the Client ID for the API Credential CLIENT_SECRET = "your-client-secret" # Replace with the Client Secret for the API Credential PACK_URL = "https://packs.cribl.io/dl/cribl-search-aws-vpc-flow-logs/0.1.1/cribl-search-aws-vpc-flow-logs-0.1.1.crbl" PACK_ID = "cribl-search-aws-vpc-flow-logs" LAKE_ID = "default" DATASET_ID = "aws-vpc-flow-logs-dataset" # URL block # Builds the base URL and Cribl Search group URL to use for the API requests # that this file makes using the ORG_ID and WORKSPACE_NAME provided in the # user-supplied parameters block. base_url = f"https://{WORKSPACE_NAME}-{ORG_ID}.cribl.cloud/api/v1" search_group_url = f"{base_url}/m/default_search" # Workflow block # The async function that contains the full automation and runs when you # execute this file. Authenticates using your Cribl.Cloud API Credentials, # installs the Search Pack, and creates a Lake Dataset. async def main(): # Authentication block # Creates an OAuth client (SchemeClientOauth) that exchanges CLIENT_ID and # CLIENT_SECRET from the user-supplied parameters block for a Bearer # token and wraps the client in Security. # Constructs the SDK client CriblControlPlane to make authenticated API # requests using the base_url from the URL block and Security, which holds # the Bearer token. client_oauth = SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url="https://login.cribl.cloud/oauth/token", audience="https://api.cribl.cloud", ) security = Security(client_oauth=client_oauth) cribl = CriblControlPlane(server_url=base_url, security=security) # Install Pack block # Installs the Cribl Search Pack (based on the User-supplied parameters # block) using search_group_url from the URL block and prints a # confirmation message. cribl.packs.install( request={ "source": PACK_URL, "id": PACK_ID, }, server_url=search_group_url, ) print(f"✅ Installed Search Pack {PACK_ID} from Cribl Packs Dispensary") # Create Lake Dataset block # Creates a Lake Dataset (based on the User-supplied parameters block) # using the base URL from the URL block and prints a confirmation message. cribl.lakes.datasets.create( lake_id=LAKE_ID, id=DATASET_ID, retention_period_in_days=30, http_da_used=False, storage_location_id="cribl_lake", ) print(f"✅ Created Lake Dataset: {DATASET_ID}") # Script entry block # Starts the async function main() with the standard library helper # asyncio.run and prints an error message if the run fails. Runs only when you # execute this file as the main script (not when another file imports it). if __name__ == "__main__": try: asyncio.run(main()) except Exception as error: print(f"❌ Something went wrong: {error}") ``` ## Get the URL for a Search Pack {#get-pack-url} To add a Search Pack from the [Cribl Packs Dispensary](https://packs.cribl.io/) or the [Dispensary GitHub Repository](https://github.com/criblpacks), provide the Pack URL as the value for the `source` parameter in your request. The URL must be the direct URL location of the `.crbl` file for the Pack. Read [Pack Repositories](/stream/packs/#pack-repositories) to learn about the differences between the Cribl Packs Dispensary and the Dispensary GitHub Repository. Here's how to get a Pack's URL from the Cribl Packs Dispensary: 1. Search the [Cribl Packs Dispensary](https://packs.cribl.io/) to find the Pack that you want to add. Select the Pack's tile to open the Pack sidebar. 1. Open the developer tools for your browser and select the **Network** tab. 1. At the upper-right of the Pack sidebar, select the download icon. 1. In your browser's developer tools, in the **Name** column, select the entry for the Pack's `.crbl` file and the **Headers** tab. Copy the **Request URL**: the copied URL is the value to provide for the `source` parameter in your request. ![Location of Pack URL in Browser's Developer Tools](pack_url_pack_dispensary.png) {scale="75%" border="true"} To get a Pack's URL from the Dispensary GitHub Repository: 1. Search the [Dispensary GitHub Repository](https://github.com/criblpacks) to find the repository for the Pack that you want to add. Select the Pack's repository to open it. 1. In the right sidebar, select **Releases**. 1. On the **Releases** page, find the release that you want to use and expand the **Assets** section. 1. In the **Assets** section, find the `.crbl` file for the Pack. Right-click the `.crbl` file and select the option to copy the link. The copied link URL is the value to provide for the `source` parameter in your request. ![Location of `.crbl` File Link to Use as the Pack URL](pack_url_dispensary_github.png) {scale="85%" border="true"} ############################################################ # SOURCE: https://docs.cribl.io/cribl-as-code/sdk-create-api-credentials.md ############################################################ # Create API Credentials with the Cribl SDK > ##### Preview Feature {#preview} > > The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete. > > Please continue to submit feedback through normal Cribl [support channels](/support/), but assistance might be limited while the features remain in Preview. > {.box .info} These code examples demonstrate how to use the [Cribl Python SDK for the management plane](https://github.com/criblio/cribl_cloud_management_sdk_python/) to create two new API Credentials: one with the [**Admin** Role](#sdk-admin-all) at all levels and one with the [Editor Role at the product level on a single Workspace](#sdk-editor-one-workspace). To use these examples, you must first create an API Credential manually in the Cribl UI. This is necessary because you need the `CLIENT_ID` and `CLIENT_SECRET` for an existing API Credential to create an authenticated SDK client for subsequent requests, including requests to create new API Credentials. Read [Authenticate in Cribl.Cloud and Hybrid Deployments](sdks-auth#sdks-auth-cloud) to create an API Credential in the Cribl UI and retrieve a Bearer token. > ##### About the Code Example > > Code examples use Bearer token authentication. Read the [SDK authentication documentation](sdks-auth) to learn how to configure authentication. The Bearer token must be granted [Organization Owner or Admin Permissions](/iam/permissions#organization). > > Replace the variables in the example with the corresponding information for your Cribl deployment. > > The resource configurations in the example does not include all available body parameters. For a complete list of body parameters for each resource, refer to the endpoint documentation in the [API Reference](/api-reference). > {.box .info} ## Create an API Credential with Admin Role at All Levels {#sdk-admin-all} The following example creates an API Credential with **Admin** at all levels (Organization, all Workspaces, and all Cribl products in all Workspaces). For this request, you only need to specify `admin` as the Organization Role. The API Credential automatically [inherits](/iam/permissions#inheritance-org) the **Admin** Role at lower levels from the Organization-level Role. The example also includes the optional `ipAllowlist` body parameter to demonstrate how to restrict API access for the API Credential to a specific IPv4 CIDR range. Replace the placeholder value with your range. Omitting `ipAllowlist` allows access for all IPs. The comment block at the beginning of the example includes instructions for using the new API Credential for subsequent SDK requests. **Python SDK for Management Plane (Cribl.Cloud)** ```python """ Create a Cribl.Cloud API Credential Example (Organization Admin) This example demonstrates how to create a new API Credential with the Admin Role on an Organization. The Admin Role is effective across the Organization, including all Workspaces and all products (no Workspace or product matrix is required). 1. Create an SDK client with OAuth2 client credentials using the client_oauth security scheme. 2. Create a new API Credential with Organization-level Admin and an optional IP allowlist to restrict API access for the API Credential to the specified IPv4 CIDR range. Prerequisites: Replace the placeholder values for ORG_ID, CLIENT_ID, and CLIENT_SECRET with your Organization ID and the Client ID and Secret for an existing API Credential. You need these values for an existing API Credential to authenticate this script. To get the Client ID and Secret for an existing API Credential, follow the steps at https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. To use the new API Credential for later SDK calls, you need its client_id and client_secret. When create succeeds, the object returned from api_credentials.create(...) includes client_id, client_secret, name, and the other APICredentialCreateResponseSchema fields. Read the new client_secret as response.client_secret on that same object. The API returns client_secret only in the create response (not in GET responses). Do not print or log the client_secret. Pass the client_id and client_secret for the new API Credential into client_oauth when you construct the CriblMgmtPlane client for later SDK calls. Client Secrets are sensitive information and should be kept private. """ from cribl_mgmt_plane import CriblMgmtPlane, errors, models # Cribl.Cloud configuration: Replace the placeholder values CLIENT_ID = "your-client-id" # Replace with the OAuth2 Client ID for an existing API Credential CLIENT_SECRET = "your-client-secret" # Replace with the OAuth2 Client Secret for an existing API Credential ORG_ID = "your-org-id" # Replace with the Organization ID # Token URL and audience for Cribl.Cloud OAuth2 TOKEN_URL = "https://login.cribl.cloud/oauth/token" AUDIENCE = "https://api.cribl.cloud" IP_ALLOWLIST = ["203.0.113.0/24"] # Replace with your IPv4 CIDR range. def main(): # Create authenticated SDK client with OAuth2 with CriblMgmtPlane( security=models.Security( client_oauth=models.SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url=TOKEN_URL, audience=AUDIENCE, ), ), ) as cmp_client: try: response = cmp_client.api_credentials.create( organization_id=ORG_ID, name="Auto-Manage-Workspaces", description="Used for automated Workspace management", enabled=True, roles={"organization_role": models.OrganizationRole.ADMIN}, ip_allowlist=IP_ALLOWLIST, ) print( "✅ Created API Credential " f"name={response.name!r} client_id={response.client_id!r}" # type: ignore ) except errors.CriblMgmtPlaneError as e: if e.status_code == 401: print("⚠️ Authentication failed! Check your CLIENT_ID and CLIENT_SECRET.") elif e.status_code == 429: print("⚠️ Uh oh, you've reached the rate limit! Try again in a few seconds.") else: print(f"❌ Something went wrong: {e.message}") if __name__ == "__main__": main() ``` ## Create an API Credential with Product-Level Editor Role in One Workspace {#sdk-editor-one-workspace} The following example creates an API Credential with specific Roles at the Organization, Workspace, and product levels: - **User** on the [Organization](/iam/permissions#organization). - **User** on the `main` [Workspace](/iam/permissions#workspace). - **Editor** on all Cribl [products](/iam/permissions#product-perm) in the `main` Workspace. The example also includes the optional `ipAllowlist` body parameter to demonstrate how to restrict API access for the API Credential to a specific IPv4 CIDR range. Replace the placeholder value with your range. Omitting `ipAllowlist` allows access for all IPs. The Cribl Python SDK for the management plane does not support configuring Roles for API Credentials at the resource level. For API Credentials that do not inherit resource-level Roles from higher levels, use the Cribl UI to [share Cribl Search resources](/search/sharing#share-datasets-dashboards) as needed. See inheritance details for [Dataset Providers and Datasets](/iam/permissions#search-dataset-perm), [Dashboards](/iam/permissions#inheritance-search-dashboards), and [Notebooks](/iam/permissions#inheritance-search-notebooks). The comment block at the beginning of the example includes instructions for using the new API Credential for subsequent SDK requests. **Python SDK for Management Plane (Cribl.Cloud)** ```python """ Create a Cribl.Cloud API Credential Example (Organization and Workspace User, Product Editor) This example demonstrates how to create a new API Credential with the User Role on an Organization and a Workspace, and the Editor Role on all Products. 1. Create an SDK client with OAuth2 client credentials using the client_oauth security scheme. 2. Create a new API Credential with: - User Role on the Organization and the `main` Workspace. - Editor on all Cribl products in the `main` Workspace. - An optional IP allowlist to restrict API access for the API Credential to the specified IPv4 CIDR range. Use the returned client_id and client_secret for the new API Credential in subsequent requests. The client_secret is only returned on create. Prerequisites: Replace the placeholder values for ORG_ID, CLIENT_ID, and CLIENT_SECRET with your Organization ID and the Client ID and Secret for an existing API Credential. You need these values for an existing API Credential to authenticate this script. To get the Client ID and Secret for an existing API Credential, follow the steps at https://docs.cribl.io/cribl-as-code/sdks-auth/#sdks-auth-cloud. To use the new API Credential for later SDK calls, you need its client_id and client_secret. When create succeeds, the object returned from api_credentials.create(...) includes client_id, client_secret, name, and the other APICredentialCreateResponseSchema fields. Read the new client_secret as response.client_secret on that same object. The API returns client_secret only in the create response (not in GET responses). Do not print or log the client_secret. Pass the client_id and client_secret for the new API Credential into client_oauth when you construct the CriblMgmtPlane client for later SDK calls. Client Secrets are sensitive information and should be kept private. """ from cribl_mgmt_plane import CriblMgmtPlane, errors, models # Cribl.Cloud configuration: Replace the placeholder values CLIENT_ID = "your-client-id" # Replace with the OAuth2 Client ID for an existing API Credential CLIENT_SECRET = "your-client-secret" # Replace with the OAuth2 Client Secret for an existing API Credential ORG_ID = "your-org-id" # Replace with the Organization ID # Token URL and audience for Cribl.Cloud OAuth2 TOKEN_URL = "https://login.cribl.cloud/oauth/token" AUDIENCE = "https://api.cribl.cloud" IP_ALLOWLIST = ["203.0.113.0/24"] # Replace with your IPv4 CIDR range. # All product identifiers exposed by this SDK for workspace-scoped roles. ALL_CRIBL_PRODUCTS = ( models.Product.STREAM, models.Product.SEARCH, models.Product.LAKE, models.Product.EDGE, ) def main(): main_workspace_editor_products = [ models.ProductRoleSchema(product=product, role=models.Role.EDITOR) for product in ALL_CRIBL_PRODUCTS ] roles = models.APICredentialRolesSchema( organization_role=models.OrganizationRole.USER, workspaces=[ models.WorkspaceRoleSchema( workspace_id="main", workspace_role=models.WorkspaceRole.USER, products=main_workspace_editor_products, ), ], ) # Create authenticated SDK client with OAuth2 with CriblMgmtPlane( security=models.Security( client_oauth=models.SchemeClientOauth( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, token_url=TOKEN_URL, audience=AUDIENCE, ), ), ) as cmp_client: try: response = cmp_client.api_credentials.create( organization_id=ORG_ID, name="Product-Editor", description="Editor Role on all Cribl Products", enabled=True, roles=roles, ip_allowlist=IP_ALLOWLIST, ) print( "✅ Created API Credential " f"name={response.name!r} client_id={response.client_id!r}" # type: ignore ) except errors.CriblMgmtPlaneError as e: if e.status_code == 401: print("⚠️ Authentication failed! Check your CLIENT_ID and CLIENT_SECRET.") elif e.status_code == 429: print("⚠️ Uh oh, you've reached the rate limit! Try again in a few seconds.") else: print(f"❌ Something went wrong: {e.message}") if __name__ == "__main__": main() ``` ## Store and Protect the Client Secret {#store-client-secret-sdk} When `api_credentials.create` succeeds, the returned object includes `client_id` and `client_secret` for the new API Credential. Pass them to `SchemeClientOauth` when you create a `CriblMgmtPlane` client for the new credential as described in [Authenticate in Cribl.Cloud and Hybrid Deployments](sdks-auth#sdks-auth-cloud). The `api_credentials.list` and `api_credentials.get` methods **do not** return `client_secret`. Only the `api_credentials.create` response includes it. Save `client_secret` to your secret storage when you create a new API Credential or use automation to write it to a secrets manager. You cannot retrieve the `client_secret` later. The `client_secret` is sensitive information and should be kept private. ## Rotate API Credentials {#rotate-api-creds-sdk} On a `CriblMgmtPlane` client, `api_credentials` exposes `create`, `list`, `get`, `update`, and `delete`. Those operations wrap the same routes documented in the [management plane API Reference](/cribl-as-code/api-reference/management-plane/). To rotate with the SDK: 1. Call `api_credentials.create` and get the new `clientId` and `clientSecret` from the response. 1. Replace the old `clientId` and `clientSecret` values with the new values wherever they are used. 1. In Python, pass the new `client_id` and `client_secret` to `SchemeClientOauth` when you construct the next `CriblMgmtPlane` client. 1. Confirm that the old `clientId` and `clientSecret` values are replaced and validate the new values. 1. Call `api_credentials.delete` to delete the old credential. Rotate API Credentials on a schedule and when access requirements change to limit how long a credential is usable. Use one API Credential per integration with only the Roles that each integration requires. That way, rotating one credential does not affect other workloads or integrations that authenticate with other API Credentials. ############################################################ # SOURCE: https://docs.cribl.io/apps/quickstart.md ############################################################ # Quick Start: Build and Install Your First App This guide walks you through creating, previewing, and deploying your first App. With an AI (artificial intelligence) coding assistant, you can move from a blank project to a working App in your Cribl.Cloud Organization in a few minutes. ## Before You Begin You need the following: - A Cribl.Cloud Organization. - **Workspace Administrator** access in the Organization (or in a dedicated App development Workspace) where you use **Create App** and **Live Preview**. See [Roles, Permissions, and Governance](admin-guide#roles-permissions-and-governance) in the Admin Guide. - **[Node.js](https://nodejs.org/)** (22.22.2 or later) on your local machine. - A terminal (macOS Terminal, a Linux shell, or Windows with Git Bash or WSL). - An AI coding assistant, such as [Cursor](https://cursor.sh/) or [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview). The scaffolded project is designed to work with these tools. ### Browser Permissions for Live Preview For Live Preview, use Chrome, Edge, or Firefox. Safari blocks the embedded HTTP dev server on localhost when the Cribl UI is HTTPS. You can still test by packaging and installing the App. Live Preview loads your App from a development server on your machine (often at a loopback address such as `127.0.0.1`). The Cribl UI is served over HTTPS, so the browser can treat that as the public Cribl origin reaching your local network or local device. Recent Google Chrome and Microsoft Edge versions may block the connection until you explicitly allow it. For background, see [Local Network Access in Chrome](https://developer.chrome.com/blog/local-network-access) and [Local Network Access in Microsoft Edge](https://learn.microsoft.com/en-us/deployedge/ms-edge-local-network-access). 1. If the browser shows a permission prompt for your Cribl site, select **Allow**. The exact label may refer to local network or devices on your machine, depending on the browser and operating system. 2. If Live Preview stays blank and you do not see a prompt, open your browser's site settings for your Cribl URL and enable access to the local network (or equivalent wording) for that origin. 3. On macOS, also check **System Settings** > **Privacy & Security** > **Local Network** and ensure your browser is allowed to access the local network. See [Control access to your local network on Mac](https://support.apple.com/guide/mac-help/control-access-to-your-local-network-on-mac-mchla4f49138/mac). This requirement applies to Live Preview and other workflows where the embedded App is served from your computer. Installed Apps that load entirely from Cribl normally do not need this permission. ## Step 1: Open Apps and Describe What You Are Building 1. On the top bar within any Cribl product, select **Apps**. ![Apps menu item on the Cribl product top bar](apps-top-nav.png) {scale="60%" border="true"} 2. Select **Create App**. On the **Create your app** screen, describe what you want to start building. Then select **Next**. ![Create your app screen with purpose field and Next](create-app-intent.png) {scale="80%" border="true"} ## Step 2: Enter App Metadata On the next screen, enter **App ID**, **Display Name**, **Description**, **Author**, **Version**, and **Minimum Cribl version**. See [1. Create and Scaffold](builder-guide#1-create-and-scaffold) for details on each field. Select **Next**. ![App metadata form in the Create App wizard](create-app-metadata.png) {scale="80%" border="true"} ## Step 3: Scaffold the Project From the CLI Command The wizard **Next Steps** list shows how to scaffold the App from a terminal on your machine. It tells you to run `npm run dev` after scaffolding and to return to Cribl to select **Live Preview** when the server is ready. The **Live Preview** control is on this same step. 1. Open a terminal. Go to the parent folder where you want this App's project folder created. 2. Select the tab that matches how you want to work: **Using Cursor**, **Using Claude**, or **Generic**. Each tab shows a command for that workflow. 3. Select **Copy Script**, paste the command into your terminal, and run it. For **Using Cursor** and **Using Claude**, the command uses CLI options to scaffold the App and launch Cursor or Claude Code. If the editor does not open, the scaffold remains in the project folder. For **Generic**, the command scaffolds the project without launching an editor. Open your editor and assistant yourself. You still start the local development server from the project directory with `npm run dev`, as described in Step 4. The command creates a folder named after your **App ID**. The folder contains a Node.js starter project, including: - A sample App you can extend immediately, built with Capra, Cribl's design system for embedded Apps. The scaffold installs Capra packages from the public npm registry. See [Capra UI (Default)](builder-guide#capra-ui-default) in the Builder Guide. - A local development proxy that routes API calls to Cribl securely. - The OpenAPI specification so your AI assistant knows which Cribl APIs are documented and available to the App. - `AGENTS.md`, the instruction file your coding assistant follows. It covers authentication, the documented Cribl APIs, and the key-value (KV) store, which must hold API keys and secrets as encrypted entries. For UI work, it sets Capra as the default design system and links to [Capra documentation](https://capra.cribl.io) and [AI-readable Capra docs](https://capra.cribl.io/llms.txt). For REST paths, quotas, and encryption rules, see [The KV Store](builder-guide#the-kv-store) in the Builder Guide. - `CLAUDE.md`, which points Claude Code at `AGENTS.md`. Cursor reads `AGENTS.md` directly, so both tools follow the same rules. Leave the **Create App** wizard open in the browser while you run the dev server and open Live Preview from this step. ![Scaffold step with tabs, Copy Script, and Live Preview](create-app-scaffold-live-preview.png) {scale="80%" border="true"} ## Step 4: Run the Dev Server and Open Live Preview Use Chrome, Edge, or Firefox for Live Preview. Safari blocks the embedded HTTP dev server on localhost when the Cribl UI is HTTPS. See [Browser Support](/apps/#browser-support). 1. In the scaffolded project directory, start the local development server as the wizard reminds you to do: ```bash npm run dev ``` Keep this terminal session running. 2. Return to the **Create App** wizard in Cribl (the scaffold and Live Preview step from the previous section). 3. Select **Live Preview** to open the embedded preview pane. Your starter App appears inside Cribl. The preview uses live reload: when your AI assistant changes code locally, the Cribl view updates without a full page refresh. If you later use Live Preview in a different **Workspace**, **Organization**, or deployment (for example, switching between Cribl.Cloud and a local environment), stop the development server and run `npm run dev` again first. Otherwise the App might not initialize in the preview iframe. ## Step 5: Generate the App This is where you shape the App for your use case. Cursor reads `AGENTS.md`. Claude Code reads `CLAUDE.md`, which points it to `AGENTS.md`. Either file gives the assistant context on Apps limits and APIs, including the default Capra design system and Capra Page Templates. For Capra component APIs, ground the assistant in [capra.cribl.io/llms.txt](https://capra.cribl.io/llms.txt) or the guidance in [Capra UI (Default)](builder-guide#capra-ui-default) in the Builder Guide. 1. In your AI assistant, describe what you want to build. You can paste this prompt verbatim: > "Create an App that displays a table of Worker Groups, the number of Worker Nodes, and the number of integrations running in each Worker Group." 2. Press **Enter** and let the tool build a plan and write the code. When the run finishes, check the Live Preview window. The preview updates to show a working table that queries your live Cribl data. To extend the App, continue prompting. For example: *"Now let me select a Worker Group to see its list of integrations and view their configurations."* Describe the behavior you want, confirm it in Live Preview, and repeat as needed. Expect several iterations: assistants can drift from Apps rules, so paste console errors back into the tool and ground changes in `AGENTS.md`. For a fuller discussion, see [Expectations for Agent-Assisted Development](builder-guide#expectations-for-agent-assisted-development) in the Builder Guide. ## Step 6: Deploy {#step-6-deploy} When you are satisfied with the App, publish it from the preview. 1. Select **Deploy** in the corner of **Live Preview**. This packages the App locally and uploads it to Cribl in one step. Each time, the UI shows a **Confirm deploy** modal with fixed copy. Acknowledge it to finish the deploy. 2. In the terminal, stop the development server with **Ctrl+C**. **Share and discovery:** Teammates might not see the App until an administrator assigns the **App user** access level. See [Share Access to Installed Apps](admin-guide#share-access-to-installed-apps-app-rbac) in the Admin Guide. ## Step 7: Launch Your App 1. On the top bar, select **Apps**. 2. Select your App to open it. The App runs inside Cribl, so you don't need a local server. ## Continue Local Development To resume work on an App you already created: 1. Open the local project folder and run `npm run dev` again. 2. In the Cribl UI, go to **Apps** > **Create App** and advance through the wizard until you reach the scaffold and **Live Preview** step (use the same **App ID** as the existing project when the wizard asks for metadata). 3. Select **Live Preview** to reconnect the local server to the UI. ## Troubleshooting {#troubleshooting} | **Problem** | Resolution | |---------|------------| | **Live Preview shows an empty screen** | On Safari, use Chrome, Edge, or Firefox for Live Preview, or test with a packaged install. See [Browser Support](/apps/#browser-support). Otherwise verify that the dev server is running (`npm run dev`). Confirm your browser allows the Cribl origin to access your local network or local device (see [Browser Permissions for Live Preview](#browser-permissions-for-live-preview)). In your browser Developer Tools, attach the console to the iframe context and check for errors. If you recently switched **Workspaces**, **Organizations**, or environments, stop the server (**Ctrl+C**) and start `npm run dev` again. | | **`npm` errors or warnings** | Confirm you're on Node.js **22.22.2** or later (for example with `nvm install 22.22.2` and `nvm use 22.22.2`, or the equivalent in your version manager). Open a new terminal and run the `npm` command again. | | **The scaffold does not open in Cursor or Claude Code** | The CLI can launch Cursor or Claude Code when you use the corresponding command from the wizard. If the editor does not open, the scaffold remains in the project folder. Open it manually. Confirm that `cursor` or `claude` is on your `PATH`. For Claude Code, use an interactive terminal. | | **Changes don't appear in the iframe** | Confirm that the dev server is still running. If you changed build configuration, reload the full Cribl browser tab. | | **Deploy fails** | Ensure that `npm run dev` is still running. Packaging reads the bundle from your local dev server. | | **App not visible after deploy** | Stop the local server, then refresh the **Apps** list. If some accounts still cannot see the App, an administrator needs to assign the **App user** access level. See [Share Access to Installed Apps](admin-guide#share-access-to-installed-apps-app-rbac) in the Admin Guide. | | **API calls return 403 after deploy** | You might lack the required access for the resources the App requests. See [Understand Permissions and Errors](user-guide#understand-permissions-and-errors) in the User Guide and [Permissions and Access](builder-guide#permissions-and-access) in the Builder Guide. | ############################################################ # SOURCE: https://docs.cribl.io/apps/runtime-and-security.md ############################################################ # Runtime, Architecture, and Security This reference summarizes how Apps handles execution boundaries, credentials, outbound traffic, and role separation between authoring and deployment. It complements the procedural guides: - Build, package, and integrate APIs: [Builder Guide](builder-guide). - Publish an App and pursue certification: [Publish an App to the Cribl Marketplace](publish-to-marketplace) and [Certify an App](certified-apps). - Install checks, KV administration, and governance: [Admin Guide](admin-guide). ## Where App Code Runs ### App UI After an administrator installs a package, Cribl delivers the App UI (HTML, JavaScript, and assets) to the member's browser and renders it inside an isolated iframe. Client-side logic runs in that iframe. The Cribl product shell owns navigation and chrome outside the iframe. For iframe restrictions (storage, cookies, and similar), see [Runtime Model and Sandbox](builder-guide#runtime-model-and-sandbox) in the Builder Guide. ### Backend Functions Apps can also declare backend functions, which Cribl deploys to Cribl-managed compute and runs outside the browser. Cribl invokes only functions declared in the package, including scheduled invocations that POST to the same handler. For the authoring contract, see [Backend Functions](builder-guide#backend-functions) in the Builder Guide. For deployment status and recovery, see [Backend Deployment Status](admin-guide#backend-deployment-status) in the Admin Guide. ### Live Preview (Development) During **Live Preview**, the iframe loads your App from a local development server on the builder's machine (often a loopback URL). The same Cribl session still mediates Cribl API calls and KV access through the platform proxies. Only the static UI bundle is served locally. Browser and OS permissions for local network access apply. See [Browser Permissions for Live Preview](quickstart#browser-permissions-for-live-preview) in the Quick Start. ## Cribl APIs and Identity ### App UI Calls From App UI code, you call Cribl REST endpoints with `fetch()` using relative URLs. Cribl intercepts those requests, attaches the signed-in member's authentication context, and enforces authorization. App UI calls use user-based permissions or strict policy permissions. For both models and for how an administrator chooses one, see [How API Access Works When a Member Runs an App](admin-guide#how-api-access-works-when-someone-runs-an-app) in the Admin Guide. A declaration does not authorize that same call outside the App. ### Backend Function Calls Backend functions do not impersonate the member who invoked them. Cribl authorizes their API calls with the installed App's grants from `policies.yml`, plus access to the App's own KV store, proxy, and schedule paths. These grants apply to every backend function the App declares, including scheduled invocations. The handler's `context.caller.userId` identifies the invoking member for attribution. It does not give the function that member's roles or permissions. For who assigns the **App user** access level, see [Share Access to Installed Apps](admin-guide#share-access-to-installed-apps-app-rbac) in the Admin Guide. For error-handling patterns in App code, see [Permissions and Access](builder-guide#permissions-and-access) in the Builder Guide. ## Credentials and the KV Store - Store API keys, tokens, passwords, and other secrets in the Apps KV store with the query parameter `encrypted=true` on writes. Encrypted values are write-only from the browser: reads return a redacted placeholder, so secrets are not exposed to App JavaScript or the network in clear text from KV reads. - Plain (unencrypted) KV values are visible in contexts that can call the KV API for that App. Do not use them for sensitive material. See [The KV Store](builder-guide#the-kv-store) in the Builder Guide. - Organization Administrators can seed or edit keys from **App Settings** > **Key-Value Stores**. Treat that surface as part of your credential lifecycle and least-privilege model. ## Outbound HTTP and `proxies.yml` Calls to external hosts from App UI or backend function code use `fetch()` with full URLs. Cribl routes them through a server-side proxy that: - Allows only hosts, paths, and options in the App's effective configuration: the hosts packaged in `proxies.yml` plus the hosts an administrator authorized on **App Settings** > **External API Access**. App code cannot widen that list. - Applies SSRF protections and declared timeouts. - Can inject headers (for example `Authorization`) from encrypted KV using expressions resolved on the server, so tokens do not need to live in client code. Sensitive headers set only from App code are not a substitute for `headers.inject`. See [External APIs and `proxies.yml`](builder-guide#external-apis-and-proxiesyml) in the Builder Guide. Administrators review declared hosts during install or upgrade, and can authorize additional hosts afterward. See [Review App Capabilities](admin-guide#review-app-capabilities) and [External API Access Tab](admin-guide#external-api-access-tab) in the Admin Guide. ## Third-Party Services and AI Apps does not ship a built-in large language model (LLM) or background AI runtime. If an App calls an external model or SaaS API, that appears as normal proxied outbound HTTP subject to `proxies.yml` and administrator review. AI-assisted authoring on a developer workstation only produces the bundle. It does not change execution rules in Cribl. Certified Apps that use AI have additional disclosure and data-handling requirements. See [Responsible Use of AI](certified-apps#responsible-use-of-ai). ## Packaging and Install-Time Checks Distributable Apps are `.tgz` archives with validated layout, size limits, and safe extraction rules (for example blocked symlinks and path traversals). See [Install an App](admin-guide#install-an-app) and [Validation Checks](admin-guide#validation-checks) in the Admin Guide. ## Roles: Authoring Versus Deployment - Workspace Administrator in a Workspace is sufficient to use **Create App**, **Live Preview**, and **Deploy** from **Live Preview** in that Workspace. That role is scoped to the Workspace. It is not the same as Organization-wide Administrator. - Organization Administrator (the Administrator role in the Admin Guide) installs, upgrades, and removes Apps and manages **App Settings** across the Organization's policy. A recommended pattern for enterprises is a dedicated development Workspace where builders are Workspace Administrators. Use separate staging and production Workspaces where an Administrator imports the same versioned package when you promote. See [Multiple App Builders in Your Organization](admin-guide#multiple-app-builders-in-your-organization) and [Development and Release Workflow for Customer Apps](admin-guide#development-and-release-workflow-for-customer-apps) in the Admin Guide. ## Observability Cribl logs structured events for App-originated API and proxy traffic. It writes backend function `console` output to `app-backend.log` with the App ID, function name, and invocation ID. Administrators can correlate activity using these identifiers and documented log fields. See [Monitoring, Logging, and Auditing](admin-guide#monitoring-logging-and-auditing) in the Admin Guide. For aligning App UI requests with browser **Network** traffic during pre-production validation, see [Observe API and Proxy Traffic During Validation](admin-guide#observe-api-and-proxy-traffic-during-validation) in the Admin Guide. ############################################################ # SOURCE: https://docs.cribl.io/apps/builder-guide.md ############################################################ # Builder Guide: Designing and Building Apps Use this guide to design, build, and ship Apps. It covers how Apps run, how they store state, how they call APIs, and how you package and deploy them. It assumes you've completed the [Quickstart](/apps/quickstart) and are ready to go deeper. Local development requires [Node.js](https://nodejs.org/) 22.22.2 or later, as described in [Before You Begin](/apps/quickstart#before-you-begin) in the Quickstart. > Browse published Apps in the [Cribl Marketplace](/apps/#cribl-marketplace). For community App source and examples, see the [Cribl Community](https://github.com/orgs/Cribl-Community/repositories) GitHub organization. {.box .success} ## App Structure Before you start building, decide how much your App needs to do. Start small. A single-screen App that solves one problem well is more useful than a sprawling App that tries to do everything. You can always add views later. **Single-screen Apps:** Use these for a focused dashboard, a simple form-driven workflow (for example, look up a value, trigger an action), or a single API interaction behind a purpose-built UI. **Multi-step Apps:** Use these when you need to guide users through a sequential workflow, combine data from multiple Cribl APIs or external services, or maintain complex state across multiple views. ## Runtime Model and Sandbox The App UI runs as an embedded web application inside an isolated iframe in the Cribl UI. Treat the client-side App as an API client running in a constrained browser environment. Apps can also declare backend functions that Cribl runs server-side. For a security-review-oriented summary of these execution boundaries, see [Runtime, Architecture, and Security](runtime-and-security). - The Cribl shell owns global navigation and chrome. - Your App UI runs in the iframe as a standalone Single Page Application (SPA). - All client-side reads and writes go through the documented Cribl APIs. - Persistent App state lives in the Apps KV store. ### Iframe Sandbox Constraints Because your App runs in an isolated iframe, certain standard browser capabilities are restricted to ensure security and Cribl UI stability. | Capability | Available? | Platform Alternative | |-----------|-----------|-------------| | `fetch()` to Cribl APIs | ✅ | Handled seamlessly by the Cribl fetch proxy. | | `localStorage` / `sessionStorage` | ❌ | Not available in the sandbox. Use the KV store API. | | `IndexedDB` | ❌ | Not available in the sandbox. Use the KV store API. | | Cookies | ❌ | Not needed, auth is proxied automatically. | | File downloads | ✅ | ``, Blob URLs. | | Popups / new tabs | ✅ | `window.open()`, ``. | | Canvas with same-origin images | ❌ | Fetch images through the proxy. | ### Signed-In User Identity {#signed-in-user-identity} Cribl injects `window.getCriblUser()` into the App iframe at runtime. The function returns a memoized Promise that resolves to the signed-in member's profile with the following fields: - `id` - `username` - `email` (optional) - `firstName` (optional) - `lastName` (optional) - `initials` (optional) `getCriblUser()` works for installed Apps and for **Live Preview**. Call it once on startup. Repeated calls return the same resolved value. ```javascript const user = await window.getCriblUser(); // user.id, user.username, ... ``` Use the returned `id` when you need to distinguish members - for example, to include it in a KV key for per-member preferences. The KV store is not user-scoped by default. You choose how to namespace keys. `getCriblUser()` provides identity only. It does not return roles or permissions. See [Adapt the UI to the Signed-In Member](#adapt-the-ui-to-the-signed-in-member). ## The AI-First Developer Workflow The fastest way to build with Apps is using AI coding assistants (like Cursor, GitHub Copilot, or Claude). Apps provides explicit guardrails to help your AI write Apps-compliant code, preventing it from hallucinating APIs or breaking sandbox constraints. ### Expectations for Agent-Assisted Development Agent-assisted (or "vibe-coded") development is not the same as writing every line yourself. Assistants optimize for common web patterns and can still propose changes that break Apps rules, even when `AGENTS.md` is in the project. Plan to iterate: a first green build or successful preview is a checkpoint, not necessarily done. Typical missteps to watch for include: - Using `localStorage`, `sessionStorage`, `IndexedDB`, or cookies instead of the KV store. - Calling Cribl URLs or HTTP methods that are not in the bundled OpenAPI specification, or inventing request shapes the proxy cannot satisfy. - Omitting an external hostname from `proxies.yml`, or adding headers in App code that Cribl strips (use `headers.inject` for secrets instead). - Refactoring UI or fetch code in a way that drops iframe-safe patterns that already worked in an older revision. When output is wrong, tighten your guidance. Paste console or network errors. Say what you clicked or loaded. Quote the relevant bullets from `AGENTS.md` or this guide so the tool realigns to documented behavior. For prompting habits that reduce thrash, see [Further Reading on Prompting and AI-Assisted Delivery](#further-reading-on-prompting-and-ai-assisted-delivery). ### 1. Create and Scaffold {#1-create-and-scaffold} **Create App** and **Live Preview** require a **Workspace Administrator**. See [Roles, Permissions, and Governance](admin-guide#roles-permissions-and-governance) in the Admin Guide. First, define the App in the Cribl UI to generate your scaffold command. The metadata step stores values in the App manifest and shows them in the **Apps** inventory (for example, **ID**, **Display name**, **Version**, and **Author**). - **App ID** - Stable folder name and deep-link segment (`/apps/a//...`). Prefer a short slug (letters, digits, hyphens). Keep it fixed once others bookmark links or automation depends on the path. - **Display Name** - Human-readable title in the **Apps** list. Plain language is fine. It does not need to match the App ID. - **Description** - What the App does so admins and users can judge fit when browsing installed Apps. - **Author** - Person, team, or company that builds or maintains the App. - **Version** - Initial semantic version in `package.json`. `npm run package` bumps it when you ship (see [4. Package, Version, and Deploy](#4-package-version-and-deploy)). - **Minimum Cribl version** - Earliest Cribl release you wrote and tested against so admins can judge compatibility. 1. In the Cribl UI, go to **Apps** > **Create App** from the top bar. 2. On the **Create your app** screen, describe what you want to build, then select **Next**. 3. Enter **App ID**, **Display Name**, **Description**, **Author**, **Version**, and **Minimum Cribl version**, then select **Next**. 4. On the scaffold step, open a terminal and go to the parent folder where you want this App's project folder created. Select **Using Cursor**, **Using Claude**, or **Generic**, then select **Copy Script**. Paste the CLI command into the terminal and run it. 5. Leave the **Create App** wizard open in the browser through **Live Preview**. For the full sequence, see the [Quickstart](/apps/quickstart). ### 2. Initialize Your AI Assistant The scaffold ships the platform rules your assistant must follow in `AGENTS.md`, which covers: - Authentication and the documented Cribl APIs. - The KV store, which replaces `localStorage` and must hold every API key and secret with `encrypted=true`. - Iframe and sandbox rules, along with the other platform constraints. - Capra, Cribl's design system, as the UI stack for new work unless you direct the assistant to a different library or pattern. See [Capra UI (Default)](#capra-ui-default). Your assistant reaches those rules through the file it reads. Cursor reads `AGENTS.md`. Claude Code reads `CLAUDE.md`, which the scaffold points at `AGENTS.md`. Before you start iterative AI-assisted coding, confirm that Cursor has loaded `AGENTS.md`, or that Claude Code has loaded `CLAUDE.md`. ### 3. Develop With Live Preview Iterate on your code locally while previewing it live inside the Cribl UI context. For Live Preview, use Chrome, Edge, or Firefox. See [Browser Support](/apps/#browser-support). The preview iframe loads your dev server from your machine (typically loopback). Browsers can block that path from an HTTPS Cribl tab until the user allows local network or local device access for the Cribl origin. If Live Preview is blank, confirm those permissions in the browser (and on macOS, under **System Settings** > **Privacy & Security** > **Local Network** for the browser). See [Browser Permissions for Live Preview](quickstart#browser-permissions-for-live-preview) in the Quickstart. 1. Start your local dev server by running `npm run dev` in your project directory. 2. In the Cribl UI, on the **Create App** wizard step that shows the scaffold instructions, select **Live Preview**. The preview pane opens in that flow. 3. The App loads in an iframe inside Cribl and hot-reloads instantly as you or your AI assistant make code changes. Live Preview binds your local dev server to the Cribl UI session where you opened it. After you switch **Workspaces**, **Organizations**, or move between a local deployment and Cribl.Cloud, stop the server (**Ctrl+C** in the terminal). Run `npm run dev` again before the next Live Preview. If you skip that restart, the App can fail to initialize in the iframe. ### 4. Package, Version, and Deploy When you are ready to distribute your App, do not manually tar or zip directories. Use the provided build tooling. The version line you set at create time seeds `package.json` and the packaged manifest. For metadata you enter at create time, see [1. Create and Scaffold](#1-create-and-scaffold). 1. Run `npm run package` in your terminal. 2. This compiles your App, auto-increments the patch version in `package.json`, and produces a valid `.tgz` archive. *(You can override the version bump using `npm run package -- --minor`, `npm run package -- --major`, or `npm run package -- --version x.y.z` for an explicit semantic version.)* #### Deliver the Package to Your Administrator {#share-the-package} The installable release is the `.tgz` from `npm run package`, not your Git repository. Keep source in Git for review and versioning. Give administrators the bundle or a URL they can import when members should run the App in a Workspace. - **Import or upgrade (typical for staging and production):** Send the `.tgz` to an Organization administrator. They use **Add App** > **Import from File** for a new App ID, or **Upgrade** on **Installed** for a new version of an existing App. Import again in each Workspace where members should run the App. **Upgrade** preserves **Share** settings. See [Install an App](admin-guide#install-an-app) and [Development and Release Workflow for Customer Apps](admin-guide#development-and-release-workflow-for-customer-apps) in the Admin Guide. - **Deploy from Live Preview:** In **Live Preview**, select **Deploy** to package and install in one step into the Workspace where you are previewing the App. See [Step 6: Deploy](quickstart#step-6-deploy) in the [Quick Start: Build and Install Your First App](quickstart). **Deploy** suits fast iteration in a dev Workspace. An administrator may need to assign the **App user** access level after **Deploy**. See [Share Access to Installed Apps](admin-guide#share-access-to-installed-apps-app-rbac) in the Admin Guide. Do not build or share a custom `.tgz` for Apps that Cribl publishes in the **Cribl Marketplace**. Administrators install those Apps from the catalog. See [Install from the Cribl Marketplace](admin-guide#install-from-cribl-marketplace) in the Admin Guide. To submit an App that you built for public listing in the Cribl Marketplace, see [Publish an App to the Cribl Marketplace](publish-to-marketplace). After publication, you can also [certify the App](certified-apps). ### 5. Upgrade an Existing App Project {#upgrade-an-existing-app-project} Upgrade an existing local App project to adopt the latest scaffold tooling and guidance without creating a new project or manually comparing scaffolds. The upgrade updates platform-managed files while preserving your App source and other developer-owned content. Before upgrading, make sure the App project is under version control and commit all changes. The upgrade is designed to avoid breaking changes, but it cannot account for every project customization. A clean commit lets you review or revert the upgrade if needed. 1. From the App project directory, run the upgrade with the latest `@cribl/apps` CLI: ```bash npx @cribl/apps@latest upgrade ``` 2. Install the project's dependencies: ```bash npm install ``` 3. Review the changed files, then run `npm run dev` and test the App in **Live Preview**. The upgrade can: - Move an older App from its bundled packaging scripts to the `@cribl/apps` packaging tools. - Add `config/policies.yml` when the project does not already contain that file. The upgrade does not overwrite an existing `policies.yml`. - Refresh the platform-managed section of `AGENTS.md`. Content outside the managed markers remains unchanged. The command validates managed files before it applies versioned migrations. If your changes conflict with a migration, the command identifies the file and stops without applying any migrations. Resolve the conflict, then run `npx @cribl/apps@latest upgrade` again. You can safely rerun the command on an up-to-date project. ## Backend Functions Use backend functions when an App needs server-side logic, such as scheduled work or logic that should not run in the browser. Each function is an HTTP endpoint that runs on the Cribl platform. Every installable App requires `static/index.html`, but this file can be minimal when the App primarily uses backend functions. New App scaffolds include a sample function. To build an App without backend functions, delete `config/backend.yml` and the `backend/` directory. ### Declare Backend Functions Declare each function in `config/backend.yml`: ```yaml runtime: js endpoints: - name: refreshLookup script: backend/refresh-lookup.ts description: Refreshes configured lookup sources. timeout: 45 memory: 256 ``` The manifest supports these settings: - `runtime`: Required. The supported value is `js`. - `name`: Required. A unique route segment for the function. - `script`: Required. A path to the function's source file, relative to the project root. - `description`: Optional text that explains the function. This text does not affect execution. - `timeout`: Optional execution timeout in seconds. The default is `30`, and the allowed range is `1` through `900`. - `memory`: Optional memory limit in MB. The default is `256`, and the allowed range is `1` through `1024`. Additional manifest properties do not change how Cribl routes or runs a function. ### Write a Handler Each source file must export an asynchronous `onRequest` function that accepts a web-standard [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and returns a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response): ```typescript export async function onRequest(request, context) { const response = await fetch('/api/v1/system/info'); const info = await response.json(); return new Response(JSON.stringify({ appId: context.appId, info, }), { headers: { 'content-type': 'application/json' }, }); } ``` The `context` argument includes: - `appId`: The installed App ID. - `installationId`: The stable installation ID. - `invocationId`: The ID for this invocation. Use it to correlate logs. - `caller.userId`: The opaque ID of the member who invoked the function. Use it for attribution, not authorization. The function does not inherit that member's roles. Keep work that requires configuration, network access, or secrets inside `onRequest`. The build process loads each module to verify its export, so module-level code runs during the build. ### Build and Package Functions Write handlers as ECMAScript modules. You can use TypeScript, npm dependencies, and relative imports. When you run `npm run build`, `apps build`: - Type-checks files under `backend/`. - Bundles each function and its dependencies into one CommonJS `.js` file under `backend-build/`. - Leaves `node:*` built-in module imports external to the bundle. - Confirms that each bundle exports `onRequest`. - Rejects a bundle larger than 5 MB. Do not edit or commit `backend-build/`. The packaging command adds the generated bundles to the `.tgz` archive and updates the packaged `backend.yml` paths. Cribl does not install npm dependencies or resolve relative imports when it deploys the package, so always use the scaffolded build and package commands. During import, Cribl also verifies that each declared script exists, does not exceed 5 MB, and uses a path that stays inside the App package. ### Call a Backend Function From the App UI, call the function through the App API base URL. Cribl automatically scopes the request to the current App: ```javascript const response = await fetch( `${window.CRIBL_API_URL}/endpoints/refreshLookup`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ source: 'daily-feed' }), }, ); ``` The deployed route is `/api/v1/a//endpoints/`. Request bodies can contain up to 5 MB, and response bodies can contain up to 6 MB. Cribl rejects a request that exceeds its limit and returns an error when a function produces an oversized response. Cribl authorizes backend function calls for the installed App, not as the member who invoked the function: - Declare required Cribl API paths in `config/policies.yml`. These grants apply to every backend function in the App. - Declare external hosts in `config/proxies.yml`. Backend functions also receive access to the App's own KV store, proxy, and schedule paths. - Use relative URLs with `fetch()` for Cribl APIs and full HTTPS URLs for external APIs. Do not declare permissions in `backend.yml`. The declarations in `policies.yml` and `proxies.yml` apply to the entire App. ### Schedule a Backend Function To run a function on a schedule, declare the schedule in `config/schedules.yml`, not in `backend.yml`. Scheduled functions can run when no one has the App open. At fire time, Cribl sends a `POST` request to the same `onRequest` handler used for HTTP calls. Do not create a separate `onSchedule` handler. Read `scheduledFor` from the JSON body. ```yaml refresh-hourly: endpoint: refreshLookup cronSchedule: '0 * * * *' # bodyExpression: '{ scheduleId, scheduledFor, source: "daily-feed" }' ``` Each record supports these settings: - Top-level key: Required. The schedule ID. By default, an App can declare up to 25 schedules. An administrator can set the limit as high as 100. - `endpoint`: Required. Must match a function `name` in `backend.yml`. - `cronSchedule`: Required. A five-field UTC cron expression. There is no seconds field and no timezone. - `bodyExpression`: Optional JavaScript that creates the request body at fire time. It can use `scheduleId`, `scheduledFor`, `appId`, and `endpoint`. The default maximum length is 4,096 characters. An administrator can set the maximum as high as 16,384 characters. If you omit it, the body contains `scheduleId` and `scheduledFor`. A schedule runs when it is present in the package. There is no enable or disable field. To stop a package-declared schedule, ship a new package that omits it, then have an administrator [upgrade the App](admin-guide#upgrade-an-app). An App can also create, update, or delete schedules dynamically through the App-scoped Schedule API. App UI calls and backend functions can make those calls without a declaration in `policies.yml`. A package upgrade reconciles the installed schedules with `config/schedules.yml` and can overwrite dynamically changed package schedules or remove dynamic schedules that are absent from the package. After installation, administrators can inspect these declarations on **App Settings** > **Schedules**. See [Schedules Tab](admin-guide#schedules-tab) in the Admin Guide. ### Log From a Backend Function Use `console.debug`, `console.log`, `console.info`, `console.warn`, or `console.error` in a handler. Cribl writes the output to `app-backend.log` and adds the App ID, function name, and invocation ID. Do not log secrets or raw credentials. Log delivery is best effort. A timeout, out-of-memory failure, or hard crash can stop the function before Cribl flushes its buffered log entries. Administrators can use the App ID and invocation ID to find a function's logs. See [Monitoring, Logging, and Auditing](admin-guide#monitoring-logging-and-auditing). ## State and Storage The iframe runs in a sandboxed context without `allow-same-origin`. Do not use `localStorage`, `sessionStorage`, `IndexedDB`, or cookies. Doing so can cause your App to fail at runtime. Apps provides a KV store as your only persistent store. ### The KV Store Each App has its own key-value store for persisting state, configuration, and secrets. Apps isolates KV data per App, so each request from your App code applies only to that App's keys. **REST shape:** From App code, call `fetch()` with relative URLs `/api/v1/kvstore/`. Replace `` with any string your App owns (for example `settings` or `user-preferences`). `PUT` sends the raw body as the value. `GET` returns the stored string. Values are opaque to Cribl, so you typically stringify structured data before you write it and parse it after you read. **Values:** A value can be any string you can send in the request body, not only small structured settings. Cribl treats the payload as opaque bytes for storage. In practice, Apps persist everything from short flags to large serialized documents, including multi-megabyte artifacts. If you store large values, load them asynchronously and keep the UI responsive. See [Async hydration patterns](#async-hydration-patterns). **Quota:** Each App can store up to 1,000 keys by default. To raise the limit, contact [Cribl Support](/support/). > **API keys and credentials:** Always write API keys, bearer tokens, passwords, and any other secret material to KV with **`encrypted=true`**. Plain (unencrypted) KV values are visible to anyone in your Organization who can use the KV APIs for that App context, not only to members who open your App UI. Encryption is required for secrets and is the supported way to reference them from `proxies.yml` with `${kv...}` expressions resolved on the server. {.box .warning} **Secrets:** On `PUT`, append `encrypted=true` for every credential. Encrypted entries are write-only from the client. Reads return a redacted placeholder. Do not store secrets without encryption. **Key-Value Stores UI:** **Administrators** can pre-seed, edit, clone, or delete keys under **App Settings** > **Key-Value Stores**. Clone is available only for unencrypted entries. The **External API Access** tab in **App Settings** lists the external hosts the App may call, and administrators can authorize additional hosts there. Organization-wide policy is described in [External API Access](admin-guide#external-api-access) in the Admin Guide. Keys you create in **Key-Value Stores** share the same namespace as `/api/v1/kvstore/...` calls from App code. In the UI, add API keys and tokens only as encrypted entries. #### Example: Write and Read `settings` From App Code This snippet is ordinary App JavaScript (for example inside a React effect or handler). It writes a stringified configuration object under the key `settings`, then reads that key back. ```javascript // Write a setting (values are opaque strings; use JSON for structured data) const settingsPayload = JSON.stringify({ theme: 'dark', refreshInterval: 30 }); await fetch('/api/v1/kvstore/settings', { method: 'PUT', headers: { 'Content-Type': 'text/plain;charset=UTF-8' }, body: settingsPayload, }); // Read it back const resp = await fetch('/api/v1/kvstore/settings'); const raw = await resp.text(); const settings = JSON.parse(raw); ``` ### Async Hydration Patterns Because KV access is async, plan for "no data yet" on initial render: - **Loading gate:** Wrap your root component in a loader that fetches required KV keys before rendering the main App. - **Write-after-hydrate:** Track a `hasHydrated` flag to prevent default local state from overwriting stored KV values during the initial load. ## API Calls and Data Flow ### Platform APIs from the App UI To call Cribl REST APIs from the App UI, use standard `fetch()` with relative URLs. Cribl intercepts the request, injects the signed-in member's auth headers, and routes it. Only call documented endpoints from the [OpenAPI specification and API Reference](/cribl-as-code/api-reference/). Calls from backend functions use the App's grants instead; see [Call a Backend Function](#call-a-backend-function). ### External APIs and `proxies.yml` To call external services, use standard `fetch()` with the full URL. Cribl intercepts the request and routes it through a server-side proxy. Declare every external domain your App always needs in a `proxies.yml` file at your project root. Cribl enforces this declaration at runtime, ensuring administrators know exactly what external endpoints your App communicates with. For domains that vary by customer, such as an identity provider tenant, omit those domains from `proxies.yml`. An administrator authorizes them after install on **App Settings** > **External API Access**, so you do not package a release per customer. Your App cannot widen its own access. See [External API Access Tab](admin-guide#external-api-access-tab) in the Admin Guide. ```yaml api.openai.com: paths: allowlist: - /v1/responses headers: inject: Authorization: '`Bearer ${kv.api_key}`' timeout: 30000 ``` #### Host and Path Matching Top-level keys in `proxies.yml` are hostnames. Each key must be an exact hostname. Wildcards are not supported for hostnames. If a service uses multiple hostnames, declare each one separately. `paths` controls which URL paths are allowed on a declared hostname: - **`paths.allowlist`:** The request path must start with at least one listed prefix. If you omit `paths`, all paths on that hostname are allowed. - **`paths.blocklist`:** The request path must not start with any listed prefix. `blocklist` takes precedence over `allowlist`. - **`/`:** Allows all paths on that hostname. - **A path prefix such as `/v2/`:** Allows any path that starts with that prefix (for example `/v2/data/report.json`). `headers.allowlist` and `headers.blocklist` support `*` glob patterns for header names (for example `x-amz-*`). That is separate from hostname and path rules. The following example declares three hostnames for the same service and allows all paths on each host. Use the same `paths` rules on every hostname you add. ```yaml api1.example.com: paths: allowlist: - / api2.example.com: paths: allowlist: - / api3.example.com: paths: allowlist: - / ``` To allow only a specific API version on one host, use a narrower prefix: ```yaml api1.example.com: paths: allowlist: - /v2/ ``` Sensitive headers set by App code are always stripped from outgoing requests for security. Use `headers.inject` in your `proxies.yml` to securely add credentials stored in the KV store. ## Routing and Deep Links Routing runs entirely inside your iframe using a client-side router (React Router, Vue Router, and so on) that integrates with `window.history`. To allow users to bookmark specific views or share them with teammates, support deep linking by encoding minimal state into the URL. In Safari, client-side routing in the iframe behaves differently than in Chrome, Edge, or Firefox. See [Browser Support](/apps/#browser-support). When a user opens a deep link, the host route uses this pattern: `/apps/a//` For example: `/apps/a/my-app/settings/general?tab=advanced`. Cribl restores the path segment below `/apps/a//`, plus the query string and hash, inside the iframe on load. Your App's router reads that URL and renders the correct view. ## Permissions and Access Who can create Apps, install packages, launch installed Apps, and assign the **App user** access level is described in [Roles, Permissions, and Governance](admin-guide#roles-permissions-and-governance) in the Admin Guide. What an open App can call in Cribl depends on its permission model. See [Declare In-Product API Permissions Your App Needs](#declare-in-product-api-permissions-your-app-needs). For the backend authorization model, see [Call a Backend Function](#call-a-backend-function). ### Adapt the UI to the Signed-In Member {#adapt-the-ui-to-the-signed-in-member} The App UI runs as the signed-in member. You can tailor views and actions to that member instead of showing the same experience to everyone. - **Identity:** Use [`getCriblUser()`](#signed-in-user-identity) for who is signed in (for example, display name or per-member KV keys). - **Permissions:** Through the [OpenAPI specification and API Reference](/cribl-as-code/api-reference/), you can read the signed-in member's roles and effective policy. These calls reflect that member's own access in Cribl. They do not list the endpoints `policies.yml` allows inside the App. You do not pass a user ID, and you cannot query another member's access. - **Adaptive UI:** Store per-member settings in KV with keys that include the member's `id`. When the App uses strict policy permissions, show the actions `policies.yml` declares. Handle 403 responses for calls that are not declared. ### Declare In-Product API Permissions Your App Needs Ship policy metadata in your bundle when the App UI or backend functions call Cribl REST endpoints. The authoring template provides `config/policies.yml`. Keep its declarations limited to the API paths and methods the App needs, so administrators can review them during **Add App** > **Import** and **Upgrade**. `config/policies.yml` lists each Cribl API path and the HTTP methods the App can use on that path: ```yaml policies: - object: '/system/info' actions: ['GET'] - object: '/products/stream/groups' actions: ['GET'] - object: '/products/stream/groups/*' actions: ['GET'] - object: '/m/:gid/system/projects/*' actions: ['*'] ``` - `object` is a path that starts with `/`. The value matches that exact path. To match child paths, add `/*` or a parameter such as `:gid`. - `actions` lists `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, or `*`. `*` allows every method on that path. - When the App calls a Worker path that starts with `/w/:wid`, declare that path and the matching `/m/:gid` path. Cribl checks Worker API requests against the group path. - Do not use `${}` or `{}` in a path. Do not declare a path that starts with `/a/` or `/apps`. Cribl rejects the package. - The App's own KV store, proxy, backend function, and schedule paths do not need an entry. A new project includes a sample `GET` grant for `/system/info`. Replace that entry with the paths the App calls. For a project that has no `config/policies.yml`, run [Upgrade an Existing App Project](#upgrade-an-existing-app-project). Then replace the sample entry with every Cribl API path the App UI and backend functions call, and package a new release. An administrator turns on strict policy permissions after that file is complete. See [Change an App's Permission Model](admin-guide#limit-an-existing-app-to-policiesyml) in the Admin Guide. Set `cribl.appAuthMode` in `package.json` to `policiesOnly` for strict policy permissions, or to `legacy` for user-based permissions. See [How API Access Works When a Member Runs an App](admin-guide#how-api-access-works-when-someone-runs-an-app) in the Admin Guide for how installation and upgrade apply that value. - With strict policy permissions, an omitted App UI declaration returns HTTP 403 for every member. - With user-based permissions, an omitted declaration succeeds when the member's product permissions allow it. For backend calls, `policies.yml` grants apply to every declared function instead of the invoking member's roles. Without a required grant, that call is denied. The App's own KV store, proxy, backend function, and schedule paths are available without a declaration. Keep declarations minimal and aligned to real UI flows. - Handle 403 responses explicitly: catch 403 status codes and explain why the call failed. Do not let one failed call render an empty screen for the entire App. - Dim or disable unavailable actions: if you can determine permissions via a preflight call, disable buttons rather than letting members hit a wall. - Document required access: in the App README or first-run screen, list the endpoints in `policies.yml` and any product permissions the App needs. ## Logging and Troubleshooting - **Logging:** Log significant events (API failures, destructive actions) with context, but do not log secrets or raw credentials. - **DevTools:** Use your browser's DevTools to inspect network requests and console output. Attach DevTools to the iframe context, not the top-level Cribl shell. - **Debug with your AI assistant:** Copy failing console messages, stack traces, or redacted network error bodies from the iframe context. Paste them into your coding assistant with a short description of what you were doing. Because the assistant already has your repository, it can often propose a fix quickly. It does not run inside Cribl, so it may guess about Apps behavior. When a suggestion looks off, ask it to reconcile the change with `AGENTS.md`, the [OpenAPI specification and API Reference](/cribl-as-code/api-reference/), and the [Runtime Model and Sandbox](#runtime-model-and-sandbox) and [External APIs and `proxies.yml`](#external-apis-and-proxiesyml). - **Stale preview:** If you change your build tooling configuration, perform a full browser reload of the Cribl tab to re-establish the Live Preview connection. - **Preview after switching context:** If you move between **Workspaces**, **Organizations**, or local and cloud deployments while using Live Preview, restart the local development server (`npm run dev`) so the App can initialize cleanly in the new context. - **Server logs:** Cribl records structured access for proxied traffic. Work with your Cribl administrator to correlate server-side logs with your App if you need request-level forensics. - **`npm` errors or warnings:** Confirm you're on Node.js **22.22.2** or later (for example with `nvm install 22.22.2` and `nvm use 22.22.2`, or your version manager's equivalent). Open a new terminal and retry the `npm` command. - **The scaffold does not open in Cursor or Claude Code:** The CLI can launch Cursor or Claude Code when you use the corresponding command from the wizard. If the editor does not open, the scaffold remains in the project folder. Open it manually. Confirm that `cursor` or `claude` is on your `PATH`. For Claude Code, use an interactive terminal. ## Capra UI (Default) {#capra-ui-default} Capra is Cribl's design system for embedded Apps. New scaffolds install Capra from the public npm registry and configure the design system by default, including a sample UI and `AGENTS.md` guidance for coding assistants. Capra provides the default design system, while still giving teams the flexibility to use or layer in their own UI stack when needed. The design system and Capra's React components are separate choices. You can use Capra design tokens and styling with your own components, keep Capra components for UI that matches Cribl accessibility and UX patterns, or replace Capra with another UI library entirely. See [UX Guidelines](#ux-guidelines) when you change either layer. For installation, component APIs, design guidance, and token usage, see [Capra documentation](https://capra.cribl.io). For AI-assisted development, point your coding assistant at [capra.cribl.io/llms.txt](https://capra.cribl.io/llms.txt), an AI-readable index of that documentation. Your scaffolded `AGENTS.md` and `CLAUDE.md` both reference the index and tell the assistant to load the Page Templates it lists before writing UI. ## UX Guidelines - **Default to Capra:** For new Apps, use Capra components and design tokens so your UI stays aligned with Cribl accessibility and UX patterns. See [Capra UI (Default)](#capra-ui-default). - **Bring your own UI when needed:** You can build with your own components while keeping Capra tokens and styling, or replace Capra entirely. You still own layout, behavior, and styling. Follow iframe rules in `AGENTS.md` and the [Runtime Model and Sandbox](#runtime-model-and-sandbox), and tell your assistant clearly when you are not using Capra components so it does not reintroduce Capra-only assumptions. - **Make primary actions obvious:** Treat destructive actions explicitly with confirmation dialogs and clear danger styling. - **Write clear error messages:** Tell the member exactly what failed, whether they can fix it themselves, and when they need to talk to an administrator. ## Further Reading on Prompting and AI-Assisted Delivery These resources are not specific to Cribl, but they match how teams iterate with coding assistants: - Anthropic's [Prompt engineering overview](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) and [Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) are thorough reference material. - Teresa Torres summarizes an end-to-end process for AI-assisted building in [Vibe coding best practices](https://www.producttalk.org/vibe-coding-best-practices/). The article covers gotchas, testing, and debugging. Cribl does not maintain it. It's an independent product-management perspective you can adapt alongside this guide. ############################################################ # SOURCE: https://docs.cribl.io/apps/publish-to-marketplace.md ############################################################ # Publish an App to the Cribl Marketplace Use this guide to prepare and submit an App for listing in the Cribl Marketplace. Before you submit an App: - You have built an App that solves a common problem and provides a clear, focused user experience. - Plan to support the App after publication. - Create a profile and sign in to the [Cribl Marketplace](https://packs.cribl.io/apps) with Google authentication. - Review and accept the Developer Terms when prompted. For guidance on developing and packaging an App, see the [Builder Guide](builder-guide). ## Prepare the App Before you package the App: - Run vulnerability scans, such as `npm audit`, and resolve high- and critical-severity issues. Cribl rejects Apps with unresolved high- or critical-severity issues. - Verify that the `name` in `package.json` is unique and does not conflict with the ID of a published App. - Use a human-readable display name that identifies the App's function, such as `Datacenter Monitoring`. - In `package.json`, add tags for the Cribl products that the App uses. For example: ```json "Tags": { "products": ["Stream", "Lake", "Search"] } ``` - Provide a safe default configuration for first-time installation. - Remove hard-coded secrets and credentials. - Test upgrades from supported older versions. - Complete the customer-facing `README.md`. Use `npm run package` to create the `.tgz` archive for submission. For packaging instructions, see [Package, Version, and Deploy](builder-guide#4-package-version-and-deploy) in the Builder Guide. ## Write the README Before you submit an App, provide a customer-facing `README.md` that explains what the App does, who it is for, how to install and configure it, and how to get support. ### App Title and Summary Provide the App name and a one-sentence description of its purpose. Write a summary that can also serve as the Cribl Marketplace overview or App detail description. ### What This App Does Describe: - The primary problem or workflow that the App addresses. - Its key capabilities and benefits. - Its intended users, such as administrators, analysts, platform owners, builders, or end users. - The supported Cribl products and deployment types, such as Stream, Edge, Search, Lake, Cribl.Cloud, or hybrid environments. ### When to Use This App List the main use cases and scenarios where the App provides value. Focus on the problem and the expected outcome. ### Before You Install Document: - Required Cribl products, versions, or deployment types. - Required permissions or user roles. - Required external systems, APIs, accounts, or services. - Required configuration values, credentials, datasets, or Workspace settings. - Known limits, feature flags, quotas, or environment requirements. ### Installation Provide clear installation instructions. Tell users to install from the Cribl Marketplace when the App is listed there. If you support manual installation, explain how to install the appropriate release package from the App repository. For the administrator's Cribl Marketplace installation flow, see [Install from the Cribl Marketplace](admin-guide#install-from-cribl-marketplace) in the Admin Guide. ### Configuration Explain every setting that users must provide after installation. Identify required and optional settings, provide examples and safe defaults, and explain whether each setting applies per user, per App, or across a shared environment. ### How to Use Describe the typical workflow from opening the App through completing its primary action. Include a first-run checklist and explain the expected output or results. ### Permissions and External Access Document the Cribl API endpoints and external services that the App requires. Use `config/policies.yml` and `config/proxies.yml` as sources. Explain what the product permissions and external service calls accomplish. If the App does not make external calls, state that explicitly. For guidance on these declarations, see [Declare In-Product API Permissions Your App Needs](builder-guide#declare-in-product-api-permissions-your-app-needs) and [External APIs and `proxies.yml`](builder-guide#external-apis-and-proxiesyml) in the Builder Guide. ### Data and Storage Explain what data the App stores, reads, or changes. Include persistent storage, shared data, KV keys, cleanup behavior, and any usage limits or quotas. ### Support Model Identify who owns support and maintenance. Provide a support contact, email address, Slack channel, GitHub issues page, or another support path. ### Known Limitations and Troubleshooting Document unsupported scenarios, known limitations, common configuration issues, permission errors, external connectivity problems, and environment-specific considerations. ## Handle Data Securely Do not extract, copy, export, or transmit customer data for an unrelated secondary purpose. Do not send customer data to developer-controlled systems, personal storage, test environments, or third-party services. Document these security details: - Authentication and authorization behavior. - Required permissions, limited to the minimum the App needs. - How the App stores and handles secrets. - External hosts, paths, headers, and methods. - Network calls that use the approved proxy configuration. - Known vulnerabilities and mitigations. - A security reporting contact. For the Apps security model, see [Runtime, Architecture, and Security](runtime-and-security). ## Support and Remediation Obligations App builders must provide a contact method and a link to a ticketing system that allow you to: - Monitor reported issues. - Provide fixes within required security remediation windows. If the App falls outside the applicable SLA, Cribl may send a warning email. If the issue is not addressed after two additional follow-ups, Cribl may delist the App. ### Security Remediation SLAs | Severity | Required Fix SLA | | --- | --- | | Critical | Within 10 days | | High | Within 4 weeks | The remediation clock applies to delivering the required fix, not only acknowledging or triaging the issue. Newly discovered vulnerabilities affecting a published App must be remediated within these windows, or the App may be delisted. Certified Apps have additional support and remediation requirements, including Medium and Low security SLAs. See [Certify an App](certified-apps). ## Submit the App 1. Sign in to the [Cribl Marketplace](https://packs.cribl.io/apps) with Google authentication. 1. Select **Publish App**. 1. Under **App Bundle**, upload the `.tgz` archive and accept the Developer Terms. 1. Select **Submit**. The App remains unavailable in the Cribl Marketplace until Cribl approves it. Cribl contacts you if the submission requires changes. ## Transfer Ownership Transfer a listed App when the owner changes, for example when an author leaves a team. A certified App stays certified. 1. Sign in to the [Cribl Marketplace](https://packs.cribl.io/apps) and open the App. 1. Select **Configure**, then **Change Owner**. 1. Enter the **New owner email** and an optional **Message**. 1. Select **Change Owner**. The request expires in 24 hours. The new owner receives an email and opens the App to select **Accept App Ownership** or **Reject App Ownership**. While the request is pending, select **Cancel Ownership Request** to withdraw it. You remain the owner if the new owner declines, if you cancel the request, or if the request expires. After publication, continue to monitor the App for security vulnerabilities. If a high- or critical-severity vulnerability occurs, work with Cribl to remediate it. Cribl can remove an App when its publisher does not remediate security vulnerabilities promptly. To certify the App after publication, see [Certify an App](certified-apps). ############################################################ # SOURCE: https://docs.cribl.io/apps/certified-apps.md ############################################################ # Certify an App A Cribl Certified App meets Cribl's standards for compatibility, performance, reliability, security remediation, and developer support. A Cribl Certified App is ready for business-critical use, and the Cribl Marketplace marks it with a Cribl Certified badge. You request certification once for an App, after it is listed. Certification applies to the App, so each new version that Cribl approves for listing is certified as well. Cribl can remove certification if the App stops meeting these requirements. Before you pursue certification, [publish the App in the Cribl Marketplace](publish-to-marketplace). ## Support Baselines As the publisher of a Certified App, provide a contact method and a link to a ticketing system so that you can: - Monitor reported issues and respond within the applicable support baseline. - Provide fixes within the required remediation windows for security-related bugs. - Address critical- and high-severity functionality bugs. - Keep Cribl informed when an issue requires additional investigation or remediation time. - Respond to critical customer support issues within 24 hours, five days a week, during your local business hours. If an App falls outside the applicable service-level agreement (SLA), Cribl sends a warning email. If the issue remains unaddressed after two more follow-ups, Cribl can remove the App's certification. ### Security Remediation SLAs For security-related bugs in a Cribl Certified App, meet these remediation deadlines. Critical and High windows also apply to any App listed in the Cribl Marketplace. Certified Apps add Medium and Low windows: | Severity | Required Fix SLA | | --- | --- | | Critical | Within 10 days | | High | Within 4 weeks | | Medium | Within 12 weeks | | Low | Within 25 weeks | The remediation clock applies to delivering the fix, not only acknowledging or triaging the issue. Remediate newly discovered vulnerabilities within these deadlines to avoid having the App delisted. ## Data Expectations A Certified App must collect, process, and retain only the customer data necessary to provide its documented functionality. - Keep customer data within the App's intended processing boundary and the approved Cribl services or destinations that the App requires. - Do not extract, copy, export, or transmit customer data outside the App for unrelated analytics, debugging, development, marketing, model training, or another secondary purpose. - Do not send customer data to developer-controlled systems, personal storage, test environments, or third-party services unless the App requires the destination. Document and approve the destination through the applicable configuration and review process. For the Apps data and credential boundaries, see [Runtime, Architecture, and Security](runtime-and-security). ## Responsible Use of AI If an App uses an AI or machine learning service, use that service safely, transparently, and only for the App's documented purpose. - Document the AI provider, model, or service. Include its purpose, data inputs, outputs, retention behavior, processing location, and any subprocessors that handle customer data. - Send only the minimum data required for the AI feature. Redact credentials, secrets, unnecessary identifiers, and unrelated customer content before submission. - Do not send raw customer data to an AI service for model training, evaluation, or product improvement unless the customer explicitly authorizes that use and you clearly disclose it. - Use approved, declared integrations for AI services. Route external calls through the App's approved proxy configuration, and restrict hosts, paths, headers, and methods to what the App requires. For how Apps handle external AI services, see [Third-Party Services and AI](runtime-and-security#third-party-services-and-ai). ## Certification Checklist Before you request certification, validate the following areas. ### Upgrade Compatibility - Test upgrades across older App versions. - Preserve expected behavior and supported upgrade paths in the new version. ### Backend Functions If the App uses backend functions, make sure that the functions are appropriately sized, bounded, observable, and limited to the capabilities they need. #### Right-Size Compute Allocation - Declare endpoint-specific `memory` and `timeout` values in `config/backend.yml` based on representative workload measurements. Do not use the maximum values by default. - Keep the p95 execution duration at or below 80 percent of the declared timeout and peak memory usage at or below 80 percent of the declared memory allocation. Document and justify exceptions. - Test normal and peak workloads, including invocation frequency, concurrent requests, scheduled jobs per run, payload size, execution duration, and memory usage. - Bound pagination, batch sizes, fan-out, and concurrency. Make sure that every invocation can finish within its declared timeout. For configuration details, see [Backend Functions](builder-guide#backend-functions) in the Builder Guide. ### Enforce Least Privilege - Declare every Cribl API route and HTTP method that the frontend or a backend function requires in `config/policies.yml`. - Request the narrowest route and method set that satisfies the App's behavior. Avoid broad resource wildcards unless they are necessary and documented. - Remove unused grants, and update `config/policies.yml` whenever a new function or workflow introduces an API call. For policy guidance, see [Declare In-Product API Permissions Your App Needs](builder-guide#declare-in-product-api-permissions-your-app-needs) in the Builder Guide. ## Request Certification After your App is listed, request certification. Certification is separate from publication, so an App can be listed without being certified. To request certification: 1. Sign in to the [Cribl Marketplace](https://packs.cribl.io/apps). 1. On your listed App, select **Configure**. 1. Select **Request Certification**. The App shows **Under Certification** until Cribl decides. **Request Certification** is available on a listed App that is not certified and has no open request. Cribl emails you when the request is accepted or rejected. A rejection email includes the reason. After a rejection, the App stays listed, and you can request certification again. ## New Versions You do not request certification again for a new version. On your listed App, select **Configure**, then **Publish new version**, and confirm that the version still meets the [Certification Checklist](#certification-checklist). When Cribl approves the new version for listing, the new version is certified if the App was certified. If a certification request is open, it continues for the new version. If Cribl does not approve the new version, it is not published, and the previous listed version remains available. ## Retain Certification To retain certification for your App, continue to meet the applicable SLA requirements. When someone reports the current version, Cribl reviews the report and can: - Remove the App from the Cribl Marketplace. - Remove the App's certification. - Reject the report and leave the listing unchanged. ############################################################ # SOURCE: https://docs.cribl.io/apps/admin-guide.md ############################################################ # Admin Guide: Enable and Manage Apps Learn how to install, upgrade, remove, and govern Apps in your Organization, as well as how to configure App settings and monitor behavior. Before you roll an App out broadly, complete [Observe API and Proxy Traffic During Validation](#observe-api-and-proxy-traffic-during-validation) in a non-production Workspace. For how App builders package Apps and declare external APIs, see the [Builder Guide](builder-guide). ## The App Management UI To manage Apps, navigate to **Apps** from the top bar. When you have permission to create Apps and temporary Apps from local development exist (for example **Live Preview** scaffolding), the page shows two tabs: - **Installed:** Apps that have been packaged and deployed. These are the Apps that members interact with and run. - **Development:** Temporary Apps from local development. Delete those entries from this tab. Use **Installed** to upgrade Apps or open **App Settings**. When no **Development** Apps are registered, or you do not have permission to create Apps, you see the installed Apps list directly without tabs. Organization administrators install, upgrade, and remove Apps. Members open Apps they are allowed to run from the **Installed** inventory. ## Install an App As an administrator, you can install Apps in these ways: - **[Cribl Marketplace](/apps/#cribl-marketplace):** Install an App from the in-product catalog. See [Install from the Cribl Marketplace](#install-from-cribl-marketplace). - **Import through Add App:** Install a custom `.tgz` or a package from a URL or Git repository. See [Import Through Add App](#import-through-add-app). - **Deploy from Live Preview:** A builder with a local development App uses **Deploy** in **Live Preview** to install into the Workspace where they are previewing. See [Deploy from Live Preview](#deploy-from-live-preview). - **Terraform:** Use the [`criblio_app`](https://registry.terraform.io/providers/criblio/criblio/latest/docs/resources/app) resource to install from Git, a file, or a URL, or to create a minimal App scaffold. See the [provider example](https://github.com/criblio/terraform-provider-criblio/tree/main/examples/apps). ### Review App Capabilities {#review-app-capabilities} Cribl summarizes what an App declares, so that you can assess it before you approve an install and review it again later. A summary covers the Cribl API permissions the App requests, its backend functions, and the external hosts it reaches. Per-App **App Settings** also covers schedules. During install review, the summary includes executable files Cribl flagged in the package. Each summary opens with a plain-language statement built from those declarations. Read the statement first, then select a count card to review the corresponding details: - **Permissions:** Declared Cribl API permissions. - **Backend Functions:** Declared functions. When schedule information is available, the card also shows how many functions run on a schedule. - **Schedules:** Declared schedule IDs, functions, cron expressions, and body expressions. This card appears only in per-App **App Settings**. - **External API Access:** External hosts the App can call. Before installation, these are the hosts the package declares. After installation, the tab also includes hosts an administrator authorized. See [External API Access Tab](#external-api-access-tab). - **Flagged Files:** Executable files the pre-install check found in the package. Keep these limitations in mind: - The summary reports what an App **declares**, not what it does at runtime. Before you rely on an App in production, compare its declarations against live traffic. See [Observe API and Proxy Traffic During Validation](#observe-api-and-proxy-traffic-during-validation). - **Schedule information** is not available during the pre-install check. As a result, **Review App** does not identify scheduled functions. Review schedule information on the **Cribl Marketplace** detail page before installation. After installation, use **App Settings** > **Backend Functions** for a summary or **Schedules** for complete details. - **Flagged Files** appears only in **Review App**, because only the pre-install check examines the package contents. ### Install from the Cribl Marketplace {#install-from-cribl-marketplace} The **Cribl Marketplace** is the in-product catalog of published Apps built by Cribl and the community. Before you install, you can [find certified Apps](/apps/#find-certified-apps) or filter by publisher. For how App builders submit Apps to the catalog, see [Publish an App to the Cribl Marketplace](publish-to-marketplace). 1. Open an App in the **Cribl Marketplace**. Review the capability summary on **Overview**, then select its cards to open the available capability tabs. See [Review App Capabilities](#review-app-capabilities). 2. Select **Install**. Cribl runs pre-install checks. You already reviewed the App's declarations on the detail page, so the **Review App** modal opens only for flagged executable files. In that case, it shows only those files. Cribl shows an App as already installed from the **Cribl Marketplace** only when the App ID matches (case-insensitive) and that ID was installed from the catalog. The same ID installed from a file or URL is tracked separately. If the App ID is already in use, install fails with HTTP 409. [Upgrade the App](#upgrade-an-app) or remove the conflicting install first. ### Import Through Add App {#import-through-add-app} Use **Add App** > **Import from File** when you have a `.tgz` from an App builder. If your Organization hosts packages internally, you can also use **Import from URL** or **Import from Git** when those options are enabled. 1. Select **Add App** > **Import from File** (or **Import from URL** / **Import from Git** when available). 2. Choose the `.tgz` package. 3. Cribl runs a **pre-install check** on the archive. How the flow continues depends on what the check finds: - **Capabilities or flagged files present:** The check might find declared outbound hosts (`proxies.yml`), declared in-product API permissions (for example `policies.yml`), declared backend functions, or **flagged** executable files. If it does, the **Review App** modal shows a capability summary and a tab for each finding. Review the details, then confirm that you accept the App. See [Review App Capabilities](#review-app-capabilities). - **None of those findings:** If the check does not surface material that requires review, there is no **Review App** step. Continue with the install summary and confirmation. 4. Review the install summary (Display Name, ID, Version, Author, declared external endpoints, and any declared in-product API permissions shown for that package). 5. Confirm the import. ### Deploy from Live Preview {#deploy-from-live-preview} When a builder selects **Deploy** in **Live Preview**, Cribl packages the local development App. It then installs that package into the Workspace where **Live Preview** is running. That path does **not** run the same pre-install file review as **Add App** > **Import**. You are installing a bundle built on the builder's machine. If the App declares backend functions, Cribl starts deploying them after **Deploy** returns. See [Backend Deployment Status](#backend-deployment-status). Other members cannot open the deployed App until you assign the **App user** access level. See [Share Access to Installed Apps](#share-access-to-installed-apps-app-rbac). Each time you deploy, the UI shows a **Confirm deploy** modal with fixed (static) copy. You must acknowledge it before the deploy completes. The modal appears on every deploy. ### Validation Checks During import, Cribl validates the package. If a required check fails, the UI displays a descriptive error. **Archive and size limits:** - Compressed archive must not exceed 100 MB. **Security and contents:** - Symlinks, hard links, and path traversals (absolute paths, `..` segments) are blocked. - All extracted directories are forced to `0755` and files to `0644`. Executable bits are stripped. **Metadata and configuration:** - `package.json` must include at minimum `name` and `version`, and mark the bundle as an App under `cribl` (for example, `"cribl": { "type": "app" }`). - App ID must not conflict with any existing Pack or App name. - `proxies.yml` (if present) must include required fields. Declared domains are not resolved at install time, and domain keys are not validated as IP literals during install. The server-side proxy middleware applies server-side request forgery (SSRF) protection and other access rules when the App makes outbound requests. SSRF protection blocks requests that would cause the proxy to reach unintended internal targets. - A nonempty `backend.yml` must declare at least one valid backend function. Each declared script must exist in the package, use a path that stays inside the App, and not exceed 5 MB. ## Upgrade an App Upgrades are handled by installing a newer package for the same App ID. 1. In the App's row, open the actions menu (three dots) and select **Upgrade**. 2. Upload the new `.tgz` package. 3. Review the version changes and confirm the upgrade. The same **pre-install check** and **Review App** modal behavior apply to the upgrade package as to **Add App** > **Import**. Installs from the **Cribl Marketplace** follow the narrower review described in [Install from the Cribl Marketplace](#install-from-cribl-marketplace). **Upgrade behavior:** - UI assets and App logic are replaced with the new version. - KV store data and settings are preserved. Configuration saved through the App UI carries over seamlessly. - Best practice: Test upgrades in a staging Workspace first, especially if release notes from the App builder indicate major version changes. See [Development and Release Workflow for Customer Apps](#development-and-release-workflow-for-customer-apps). ## License Limits {#app-license-limits} Installing or upgrading an App that declares backend functions or outbound hosts requires an Enterprise license/plan. Saving hosts on **App Settings** > **External API Access** also requires an Enterprise license/plan. Without an Enterprise license/plan, Cribl blocks installation and upgrade of an App that declares backend functions or outbound hosts, and blocks saving hosts on **External API Access**. When Cribl blocks an upgrade, the installed App version stays unchanged. **Live Preview** can still run backend functions and outbound hosts. A Free or Standard plan can install an App that does not declare backend functions or outbound hosts. ## Backend Deployment Status {#backend-deployment-status} Installing an App, upgrading it, or selecting **Deploy** in **Live Preview** can start a backend deployment for Apps that declare backend functions. That deployment continues after the install, upgrade, or **Deploy** action finishes. Cribl reports backend deployment status in the **Apps** inventory: - **Deploying...** means the deployment was submitted or is in progress. Cribl refreshes in-progress status while you remain on the page. - **Error** means the deployment failed. Select the status to review the reported reasons. - No backend status appears after a successful deployment or for an App without backend functions. When you open an installed App whose backend is still deploying, Cribl shows **We're setting up your App** instead of the App UI. The page updates automatically when deployment succeeds, or you can select **Refresh App** to check again. If deployment fails, Cribl shows **App failed to deploy**, the reported failure reason, and **Redeploy** instead of the App UI. Select **Redeploy** to retry the backend from the currently installed package. The App UI remains unavailable until the deployment succeeds. Users without permission to deploy Apps see the failure but not the **Redeploy** action. **Live Preview** is the exception: it keeps the App UI open while its backend deploys, so no deployment screen appears there. While Cribl packages and installs the App, **Live Preview** shows a **Deploying app...** notification and keeps **Deploy** pending. Track the backend deployment itself from the App's row in the **Apps** inventory. To retry a failed backend, select **Deploy** again in **Live Preview**, or open that App from the **Apps** inventory to use **Redeploy**. ## Delete an App 1. In the App's row, open the actions menu and select **Delete**. 2. Review the confirmation details and confirm. **Delete behavior:** - The App UI, assets, and entry points are removed from the deployment. - After delete, KV data and settings are removed with the App. Reinstalling starts with empty KV. ## Configure Organization App Settings Use **Settings > Global Settings > App Settings** to turn Apps on or off for the Organization and configure App backend and scheduling limits. This page is separate from per-App **App Settings** (see [Manage App Settings](#manage-app-settings)). 1. Select **Settings > Global Settings > App Settings**. 1. Confirm that **Enable Apps** is toggled on. It is on by default. When you toggle it off, Cribl does not register the Apps routes. 1. Configure these limits as needed: - **Maximum concurrent backend function executions:** Concurrent backend function invocations across all Apps on the Leader. The default is `100`. Additional requests receive an HTTP 429 response when the Leader reaches the limit. - **Leader requests limit:** Maximum Leader API requests each App backend can make per minute. The default is `50`, and the allowed range is `1` through `1,000`. - **Scheduled Jobs:** Maximum schedules per App. The default is `25`, and the allowed range is `1` through `100`. - **Payload expression size per request:** Maximum length of a schedule's `bodyExpression`, in characters. The default is `4,096`, and the allowed range is `1` through `16,384`. - **Job Concurrency:** Maximum concurrent scheduled jobs across all Apps on the Leader. The default is `50`, and the allowed range is `1` through `100`. 1. Select **Save**, then confirm the server restart. Changes take effect after the Leader restarts. ## Manage App Settings Per-App **App Settings** is where you review an installed App's metadata and capabilities, manage its KV store, and authorize external hosts. For how App code calls the KV API, encryption rules, and REST paths, see [The KV Store](builder-guide#the-kv-store) in the Builder Guide. Open **App Settings** from the Apps inventory row menu (**Settings**) or from the gear icon in the App toolbar. **General** opens by default. **Key-Value Stores**, **Permissions**, and **External API Access** are always available. **Backend Functions** and **Schedules** appear when the App declares backend functions. See [Review App Capabilities](#review-app-capabilities). The **General** tab includes the capability summary. The summary states whether the App runs with the user's permissions or only with the permissions defined in `policies.yml`. Select a card to open the corresponding capability tab. See [How API Access Works When a Member Runs an App](#how-api-access-works-when-someone-runs-an-app). ### General Tab The **General** tab lists read-only fields for the installed App: - **App ID**, **Display Name**, **Description**, **Author**, and **Version** come from the installed package. App builders set these in `package.json`. To change them after install, package a new release and [upgrade the App](#upgrade-an-app). - **Source** shows how you installed the App: **File** for **Import from File**, **Cribl Marketplace** for Marketplace installs, or the URL or package file name for other **Add App** import paths and **Deploy** from **Live Preview**. [Upgrade](#upgrade-an-app) or reinstall the App to change it. ### Key-Value Stores Tab 1. Open **App Settings** as described above. 2. Select **Key-Value Stores**. From this tab, you can: - **Seed configurations:** Add initial `settings` JSON objects that the App needs on its first run. - **Store secrets:** Add API keys and external tokens only as encrypted entries. Encrypted values are redacted in the UI and can only be referenced server-side. They are never exposed to the browser. Do not rely on plain KV values for credentials. - **Edit, clone, or delete:** Manage existing keys from the **Actions** (`...`) menu on each row. **Edit** opens an existing pair so you can change it. **Clone** starts a new pair from an unencrypted one. Give the clone a unique **Key** before you save. Saving with the original key overwrites that entry. Clone does not appear for encrypted entries, because the stored value is redacted and cannot be copied. **Delete** removes the pair after you confirm. **Quota:** Each App can store up to 1,000 keys by default. If an App requires more, contact [Cribl Support](/support/) to request a quota increase. ### Backend Functions Tab {#backend-functions-tab} 1. Open **App Settings** as described above. 1. Select **Backend Functions**. This read-only tab appears only when the App declares backend functions. Each row shows the function name, a description when provided, and a **Scheduled** tag when a schedule invokes that function. To change what the App ships, install a new package. See [Backend Functions](builder-guide#backend-functions) in the Builder Guide. ### Schedules Tab {#schedules-tab} The read-only **Schedules** tab appears when the App declares backend functions, even if it declares no schedules. When the App has schedules, the table lists: - **Schedule ID** - **Function** - **Cron (UTC)** - **Body Expression** (a dash when the App omits one) When the App declares no schedules, the tab shows an empty state. Use **Backend Functions** to see which functions are scheduled. Use **Schedules** to inspect when and how each scheduled invocation runs. The tab does not provide controls to create, edit, pause, enable, disable, or delete schedules. A declared schedule runs according to its cron expression. To change package-declared schedules, install a new package. Authorized callers can also create, update, and delete schedules through the App-scoped Schedule API. App builders declare package schedules in `config/schedules.yml`. See [Schedule a Backend Function](builder-guide#schedule-a-backend-function) in the Builder Guide. ### External API Access Tab Use this tab to see every external host the App is allowed to call, and to authorize hosts the App package does not include. An App builder declares the hosts an App always needs in `proxies.yml`. They cannot know the domains that are specific to your Organization, such as your own identity provider tenant. Rather than waiting for the builder to ship a new package for each customer, authorize those hosts yourself after install. Because this is an administrator surface, an App can never widen its own external access. To add a host, open **External API Access**, add an object to the array the editor already shows, and select **Save**. Do not replace the array with only the new host: ```json { "id": "login.okta.com", "timeout": 15000, "paths": { "allowlist": ["/"] } } ``` Each entry's `id` is the hostname. The remaining fields are the same declarations App builders use in `proxies.yml`; see [External APIs and `proxies.yml`](builder-guide#external-apis-and-proxiesyml) in the Builder Guide for `timeout`, path, and header rules. Keep this in mind as you edit: - Editing requires the same permission as [**Create App**](#who-can-create-preview-and-package-apps). Other administrators can open the tab but cannot change it. - **Save** writes the array as the administrator-managed hosts. To drop a host you added earlier, delete its entry and save. Hosts that shipped in the App package stay in effect even if you omit them. If you delete a packaged host, it returns after you save. To remove a packaged host, ask the App builder for a new package. To manage the same configuration outside the UI, use `GET` and `PUT /api/v1/apps/{id}/proxies`. `GET` returns every host currently in effect. `PUT` replaces only the administrator-managed hosts with the `items` array you send. Packaged hosts remain if you omit them. ## External API Access Apps can call external, third-party APIs through a server-side proxy. External API access is enabled by default for your Organization. Cribl still enforces declared hosts, paths, and options on every request: - **Declared hosts only:** Outbound calls succeed only for the hosts packaged in `proxies.yml` plus the hosts you authorize on **App Settings** > **External API Access**. The request path and options must also match those declarations. Requests to any other host are blocked with a 403 response. Apps that only call Cribl APIs are unaffected. - **Secure handling:** Allowed traffic uses the server-side proxy with SSRF protections, declared timeouts, and optional credential injection from KV so secrets are not exposed to the browser. App state and Cribl API traffic remain within Cribl unless a developer configured outbound calls that persist data elsewhere. That behavior follows the App and its declared hosts. Before you rely on an App in production, confirm declared hosts during **import** (see [Install an App](#install-an-app)) and again on **App Settings** > **External API Access**. Then compare live traffic to those declarations in a non-production Workspace. See [Observe API and Proxy Traffic During Validation](#observe-api-and-proxy-traffic-during-validation). ## Roles, Permissions, and Governance Apps uses your Organization's standard Cribl RBAC for Stream, Edge, Search, and Lake APIs. For installed Apps, Cribl also enforces per-App access: you choose which members and teams may open each installed App. For a consolidated summary of where App code runs, how credentials and outbound calls are handled, and how that relates to these roles, see [Runtime, Architecture, and Security](runtime-and-security). ### Who Can Create, Preview, and Package Apps Only Workspace Administrators can use **Create App**, **Live Preview**, and **Deploy** from **Live Preview**. These flows require the same privileges as installing an App because **Live Preview** registers a develop App in the Organization behind the scenes. Product-level permissions for Stream, Edge, Search, or Lake--including **Editor** or **Admin**--do not grant **Create App**, **Live Preview**, or **Deploy** by themselves. **Workspace Administrator** in that Workspace is still required. ### Who Can Install and Manage Apps Only Organization administrators can install, upgrade, and delete Apps and can open **App Settings** (including **General**, **Key-Value Stores**, **Permissions**, **Backend Functions**, **Schedules**, and **External API Access**). Treat installs and upgrades as privileged changes that can affect Organization data, backend functions, and outbound integrations. Authorizing external hosts on [**External API Access**](#external-api-access-tab) requires the same permission as **Create App**. ### Who Can Run Installed Apps - The **Apps** > **Installed** list shows only Apps your account may open. If you have no grant for an App, that App is hidden from your inventory. - To use any App, you must still be an Organization member with access to at least one Cribl product (Stream, Edge, Search, or Lake). Per-App grants do not replace that membership requirement. ### Share Access to Installed Apps {#share-access-to-installed-apps-app-rbac} Use **Share** to choose which members and teams can open an installed App: - **App user:** The member or team can open and run the App. The **App user** access level does not grant other Cribl administrator permissions. - **No access:** The App does not appear for the member or team. A newly installed App stays hidden from other members until you assign the **App user** access level. **Upgrade** keeps the existing **Share** assignments. An App that every member can already open stays visible after **Upgrade**. **Deploy**, or saving **Share**, limits the App to members and teams who have the **App user** access level. To keep the existing members and teams, upgrade with a `.tgz` instead of using **Deploy**. Organization administrators, and other roles with permission to update App access, assign the **App user** access level or **No access** as follows: 1. Open **Apps** > **Installed**. 1. For the App row, open the actions menu (three dots) and select **Share**. You can also open the installed App and select **Share** from the toolbar menu (three dots). **Share** is available only for rows under **Installed**. Entries on the **Development** tab from **Live Preview** do not support this flow. 1. On the **Members** and **Teams** tabs, assign the **App user** access level or **No access**, then save. For how API calls behave once a member can open an App, see [How API Access Works When a Member Runs an App](#how-api-access-works-when-someone-runs-an-app). ### How API Access Works When a Member Runs an App {#how-api-access-works-when-someone-runs-an-app} Once a member can open an App, the App UI uses one of these models: - **User-based permissions:** Calls follow the member's product permissions. An endpoint in `policies.yml` can let the App perform an action those permissions do not allow. - **Strict policy permissions:** Calls are limited to the endpoints in `policies.yml`, plus the App's own KV store, proxy, backend function endpoints, and schedules. Product permissions do not add calls, including for an administrator. In both models, a declaration in `policies.yml` applies only inside the App. The same call outside the App still requires the member's own product permission. Backend functions are separate. They use the grants in `policies.yml` for every function, not the invoking member's product roles. See [Cribl APIs and Identity](runtime-and-security#cribl-apis-and-identity). A new installation uses the `cribl.appAuthMode` value in the App's `package.json`. When that value is absent, the installation uses user-based permissions. An upgrade uses the value in the new package when the package sets one. Otherwise the upgrade keeps the installed model. #### Change an App's Permission Model {#limit-an-existing-app-to-policiesyml} On **App Settings** > **Permissions**, **API access mode** shows whether the App uses the **Open** or **Strict** model. The **Strict mode** switch is off for user-based permissions and on for strict policy permissions. To turn on strict policy permissions: 1. Confirm that `policies.yml` includes every Cribl endpoint the App calls. For the file format, see [Declare In-Product API Permissions Your App Needs](builder-guide#declare-in-product-api-permissions-your-app-needs) in the Builder Guide. 1. Turn on **Strict mode**. 1. In the confirmation dialog, select **Switch to strict mode**. To return to user-based permissions, turn off **Strict mode**, then select **Switch to open mode**. **Live Preview** does not show the **API access mode** banner. ### Multiple App Builders in Your Organization If members who are not production administrators need to build Apps, use a dedicated App development Workspace with non-production data. Grant those builders the Workspace Administrator role in that Workspace only. Do not make every member an administrator in a production Workspace to enable App development. Members in that dev Workspace can use **Create App**, **Live Preview**, and packaging workflows. An administrator still installs packages into Workspaces where members run the App, including production when you are ready. For a recommended multi-Workspace promotion path, see [Development and Release Workflow for Customer Apps](#development-and-release-workflow-for-customer-apps). Backend functions and outbound hosts follow the [license limits](#app-license-limits). You can leave Apps disabled until you finish internal checks or policy reviews. ## Development and Release Workflow for Customer Apps {#development-and-release-workflow-for-customer-apps} Organizations that build their own Apps should treat each install as a release into an environment. Cribl does not provide a separate "staging mode" inside one Workspace. You promote a **versioned** `.tgz` package from Workspace to Workspace. ### Dev, Staging, and Production Workspaces Map **Workspaces** in your Organization to environments. At minimum, use separate Workspaces for **development**, **staging**, and **production**. Staging is where you validate an App with realistic configuration and data before Members rely on it in production. Use that Workspace (or another dedicated test Workspace) so you only promote behavior you have already checked. | Workspace role | Typical use | |----------------|-------------| | **Development** | **Create App**, **Live Preview**, local `npm run dev`, and early packaging. Builders are **Workspace Administrators** here. Use non-production or synthetic data. | | **Staging** | Install a candidate `.tgz`, configure **App Settings** (KV, **External API Access**), and run the App as your members will. Exercise upgrades, integrations, and permission-sensitive flows. See [Observe API and Proxy Traffic During Validation](#observe-api-and-proxy-traffic-during-validation). | | **Production** | Install only versions that passed staging. Limit who can install or upgrade Apps. | ### Observe API and Proxy Traffic During Validation Before installation, review the App declarations through the applicable [install flow](#install-an-app). Use those declarations as the baseline for validating live behavior after installation. After installation, finish **App Settings** in a test Workspace. See [Development and Release Workflow for Customer Apps](#development-and-release-workflow-for-customer-apps) and [Manage App Settings](#manage-app-settings). Sign in the way a production **Member** would ([How API Access Works When a Member Runs an App](#how-api-access-works-when-someone-runs-an-app)). Then use **Browser** and **Logs** to capture live requests. **Browser:** Open the App, then open **Developer tools** > **Network**. Filter to **Fetch** or **XHR**. Use the App through its main workflows. For each request, check status, path, and whether the volume fits the action you took. **Logs:** Open **access and error logs** and apply the App filters from [Monitoring, Logging, and Auditing](#monitoring-logging-and-auditing). Compare that stream with what **Network** showed so you can explain behavior during support, security, or compliance reviews. Recommended flow: 1. Build and iterate in the **development** Workspace (or on a developer machine with Live Preview bound to that Workspace). 2. Run `npm run package` to produce a `.tgz` with an explicit semantic **Version** (see [4. Package, Version, and Deploy](builder-guide#4-package-version-and-deploy) in the Builder Guide). 3. An Administrator **imports** that package into **staging** and configures **App Settings** for that environment. Then complete **Observe API and Proxy Traffic During Validation** before importing the same `.tgz` into **production**. 4. After sign-off, import the **same** `.tgz` (same **Version** and **App ID**) into **production**. Use **Upgrade** in production only when you intend to move that environment to a newer package. Each Workspace keeps its own installed App instance, KV data, and **App Settings**. Do not assume KV or secrets copied automatically from staging to production. Plan configuration per environment. ### Version Control With Git Keep App **source code** in Git so you can review changes, tag releases, and roll back. The installable artifact remains the `.tgz` produced by `npm run package`, not the Git tree itself. Recommended practices: - **One repository per App** (or a monorepo with a clear folder per App ID). Commit the scaffolded project, including `package.json`, `AGENTS.md`, `CLAUDE.md`, files under `config/`, and backend source under `backend/`. - **Match Git tags to package versions.** After you bump `version` in `package.json` and run `npm run package`, tag the commit (for example `v1.2.3`) so you can rebuild or audit that release later. - **Deploy a specific version to a specific Workspace** by importing the `.tgz` built from that tag. Production and staging can run different versions at the same time because installs are per Workspace. - **Use branches for promotion intent.** For example, merge to `main` only for releases you package for staging or production, and use feature branches for work in progress. - **Automate packaging in CI** (optional). A CI job can run `npm run package` on tagged commits, store `.tgz` artifacts, and hand them to Administrators for **Import from File** (or **Import from URL** when your Organization hosts packages that way). When your Organization enables it, **Add App** > **Import from Git** can install from a repository that contains a valid App package layout. Whether that option is available depends on Organization policy. File-based import remains the common path for customer-built Apps. ## Monitoring, Logging, and Auditing Combine **audit events** with **access logs** and **Access and error logs** when you monitor App usage. Audit surfaces show who installed, upgraded, or deleted Apps and who changed KV or **External API Access** in **App Settings**. Structured logs capture App API and proxy traffic at runtime. Use the filters in this section to isolate traffic for a specific App. Cribl provides built-in observability for App behavior: - **Audit events:** App installs, upgrades, deletions, KV edits, and **External API Access** updates appear in the standard Cribl audit surfaces, tracking who performed the action and when. - **Access and error logs:** Cribl logs structured events for every API request made by an App. This includes proxy failures, KV quota issues, and validation errors. - **Backend function logs:** Output from `console` calls in backend functions appears in `app-backend.log`. After that log exists, **Monitoring > Logs** includes **Leader** > **Apps** in the log picker. Select **All Apps** to search the shared log, or select an installed App to apply its `cid` filter automatically. Use the `endpoint` and `invocationId` fields to isolate one function or invocation. - **Filtering:** Isolate App traffic using the App **ID** and log fields. App-originated requests also include a `Cribl-App: ` header on the wire. In **access logs**, combine these filters: - `http_user_agent == "product-ui-app"` to match requests from the embedded App UI. - `cribl_app == ""` to match a specific installed App. The token is built from the App ID and the installed package (for example `cribl_app == "notebook-app-1-0-28-tgz"` when the App ID is `notebook-app`). Adjust the `cribl_app` value to match the identifier for the App you are investigating. ## Troubleshooting Quick Reference | **Problem** | Likely cause | Resolution | |---------|-------------|------------| | **Install fails with 400 error** | Archive exceeds the compressed size limit, contains blocked paths, or is missing required metadata. | Review the specific error message and ask the App builder for a corrected package. | | **Install, upgrade, or External API Access save fails with `App backend compute requires an enterprise license/plan` or `App proxies require an enterprise license/plan`** | Backend functions and outbound hosts require an Enterprise license/plan. | See [License Limits](#app-license-limits). | | **Install fails with 409 error** | App ID conflicts with an existing Pack or App name, or you tried to install the same App again from the **Cribl Marketplace**. | Choose a unique App ID, delete the conflicting item, or [upgrade the App](#upgrade-an-app) instead of reinstalling from the **Cribl Marketplace**. | | **Members no longer see an App after the builder used Deploy** | The App stays hidden until you assign the **App user** access level. | Assign the **App user** access level to the members and teams who should run the App. See [Share Access to Installed Apps](#share-access-to-installed-apps-app-rbac). | | **Members see frequent 403 errors** | With strict policy permissions, the App called an endpoint that `policies.yml` does not declare. With user-based permissions, the member lacks permission for an undeclared call. | For strict policy permissions, work with the author to declare the endpoint, then upgrade the package. For user-based permissions, confirm the member's Stream, Edge, Search, and Lake roles. See [How API Access Works When a Member Runs an App](#how-api-access-works-when-someone-runs-an-app). | | **External API calls fail (403)** | The hostname is not in the App's effective configuration, the request path does not match a declared prefix, or the proxy rejected the request (for example SSRF validation). Hostname wildcards are not supported. Each hostname must be listed explicitly. | Authorize the hostname on **App Settings** > **External API Access** (see [External API Access Tab](#external-api-access-tab)). If every install needs that host, ask the App builder to update `proxies.yml` and ship a new package. See [External APIs and `proxies.yml`](builder-guide#external-apis-and-proxiesyml) in the Builder Guide. | | **KV writes are rejected** | App exceeded the 1,000-key quota limit. | Contact [Cribl Support](/support/) to request a quota increase. | | **KV edits in App Settings do not persist** | Save was not confirmed, or a platform issue. | Confirm that you saved your changes in **Key-Value Stores**. If they still do not persist, contact [Cribl Support](/support/). | | **App loses state on browser reload** | The App is improperly using blocked browser storage (`localStorage`). | Ask the App builder to move state persistence to the KV store API. See [The KV Store](builder-guide#the-kv-store) in the Builder Guide. | ############################################################ # SOURCE: https://docs.cribl.io/apps/user-guide.md ############################################################ # User Guide: Access and Use Apps Use this guide to find, launch, and use Apps installed in your Organization. If you can see an App on the **Apps** page, you can open and use it. You only see installed Apps your administrator (or delegate) has granted you **App user** access to. You must still be an Organization member with access to at least one Cribl product (Stream, Edge, Search, or Lake). For who can create, install, share, and run Apps, see [Roles, Permissions, and Governance](admin-guide#roles-permissions-and-governance) in the Admin Guide. ## Find and Open Apps You run Apps that an administrator installed and shared with you. Installation and sharing are administrator tasks. See [Install an App](admin-guide#install-an-app) in the Admin Guide when you need that background. ### Which Apps Appear in Your List **Apps** lists only installed Apps for which you have **App user** access. If the list is empty, your Organization might not have installed Apps yet, or you might have **No access** to Apps that other Members use. Ask an administrator to install the App and assign **App user** when you need access. You can also open the [Cribl Marketplace](/apps/#cribl-marketplace) to browse published Apps, [find certified Apps](/apps/#find-certified-apps), and filter by publisher before asking an administrator to install one. ### Run an Installed App From Stream, Edge, Search, or Lake, select **Apps** in the top bar to open a popover with up to six installed Apps you can launch directly. Select **View All** to open the full **Apps** inventory. When an App opens, it fills the main content area and hides the product sidebar until you return to the product through the top bar. Display name, ID, version, and author help you confirm that you opened the intended App or explain issues to your administrator. Apps that declare backend functions may still be deploying after installation. If you open one before its backend is ready, Cribl shows **We're setting up your App** instead of the App UI. The App opens automatically when deployment succeeds. If deployment fails, Cribl shows **App failed to deploy** and the reported reason. Select **Redeploy** when that action is available, or contact an administrator. See [Backend Deployment Status](admin-guide#backend-deployment-status) in the Admin Guide. ## App Settings {#configure-app-settings} **App Settings** is available only to Organization administrators. Members who run an App do not see **App Settings** in the **Apps** inventory or inside the App. If an App needs hosted keys, secrets, or an additional external host, ask an administrator. Administrators use **App Settings** to review metadata and capabilities, manage key-value stores, inspect schedules, and authorize external hosts. See [Manage App Settings](admin-guide#manage-app-settings) in the Admin Guide. ## Bookmark and Share App Links Apps support deep linking when the builder uses a router that syncs in-App routes to the browser URL. As you move through an App's tabs or multi-step workflows, the address bar usually updates to reflect your location. In Safari, in-memory routing keeps the browser URL stable while you move inside the App. Shared links and bookmarks open the App entry screen. See [Browser Support](/apps/#browser-support). A typical App URL looks like this: `/apps/a/my-app/settings/general?tab=advanced` You can bookmark these URLs to return to the same view later, or copy and share them with teammates. When a teammate opens the link, Cribl restores the App state only if they are allowed to open that App (for example they have been granted **App user** for that App). ## Understand Permissions and Errors {#understand-permissions-and-errors} What an App can do in Cribl depends on its permission model, so it can differ from what your own product roles allow. See [How API Access Works When a Member Runs an App](admin-guide#how-api-access-works-when-someone-runs-an-app) in the Admin Guide. ### Common Permission Scenarios | What You See | What It Means | Next Steps | |--------------|---------------|------------| | Installed list is empty but colleagues see Apps | You might have **No access** for those Apps, or you lack product membership. | Ask your administrator to assign the **App user** access level for the Apps you need, and confirm you have access to at least one Cribl product. | | "You don't have permission" or a 403 error | With user-based permissions, your product role does not allow an undeclared call. With strict policy permissions, the App did not declare the call. | Ask your administrator which model the App uses. A product role change helps only with user-based permissions. | | Disabled buttons or grayed-out actions | The App detected that you lack write access and disabled the action. | You can still view data, but you cannot make changes. | | Partial data (for example, only some Worker Groups are visible) | You can access only a subset of resources. | This is expected. The App shows only what you are allowed to see. | | Empty state with no data | Either no data exists yet, or you cannot view it with your current permissions. | Ask your administrator if you expected to see data here. | If you are unsure which permissions an App needs, check the App's first-run screen or contact the App builder. ## Troubleshooting Quick Reference | Problem | Resolution | |---------|------------| | You see the **Apps** page, but not the App you need | The App is not installed, you have **No access**, or your product role cannot view it. Contact your administrator. | | The App opens but shows an empty screen | Try a full page reload. If it still happens, the App might have a defect. Report it to your administrator or the App builder. | | A shared deep link does not load correctly | The link might point to a state you cannot access, or the App version changed after the link was created. Open the App from the **Apps** table instead. | ############################################################ # SOURCE: https://docs.cribl.io/billing-licensing/finops-center.md ############################################################ # Track Product Usage and Credit Consumption The Cribl FinOps Center is designed to simplify the process of tracking your product usage and credit consumption. You can also download finalized invoices and export them to external spend analysis products. With the FinOps Center, you can: - Explore credit usage across all Cribl products, including credit refunds and rollovers. - Narrow down usage to a specific time frame using the custom time picker. - View contract renewal date against usage. - Get answers to questions you have about your bill. - Easily comprehend both your total usage and cost for all the Cribl products billed through Cribl.Cloud, including Connected Environments and hybrid Worker Groups and Edge Fleets. For more information about Cribl.Cloud billing and pricing, see our [Cribl Pricing](https://cribl.io/pricing/) page. ## Access Billing Information {#access-billing} The **FinOps Center** page is the single source of truth for your Cribl.Cloud Organization billing and usage data. ### When the FinOps Center Displays Data The FinOps Center displays data only when your Organization uses usage-based billing with Cribl.Cloud credits. Your deployment type doesn't determine whether data appears. For example, if you use a Cribl.Cloud Leader with hybrid Worker Groups or Edge Fleets but pay through a license-based agreement, the FinOps Center is blank. This is expected because license-based billing doesn't provide usage or billing data to the FinOps Center. Connected Environments are different from hybrid deployments. With a [Connected Environment](/stream/cloud-connected-env/), an on-prem Leader uses the Cribl.Cloud credit-based billing model instead of an on-prem license. Usage and credit consumption from that environment appear in the FinOps Center. 1. Log in to Cribl.Cloud. 1. In the sidebar, select **Organization**, then **FinOps Center**. ![Organization sidebar menu](finops-org.png) {border="true" scale="25%"} >If you don't see **Organization** in the sidebar, select the Organization icon ![](icon-organization.png) >from the top navigation bar and choose your Organization. {.box .success} You can also retrieve FinOps Center billing and usage data programmatically with the Cribl API. The [Billing and FinOps API Code Examples](/cribl-as-code/api-billing-examples) demonstrate several common use cases. Use the API to integrate Cribl cost and consumption metrics into BI dashboards, chargeback, and automated reporting. ## Explore the FinOps Center {#explore} Select the **Usage Overview** tab for a holistic view. ![Explore the Cribl FinOps Center](finops-center-explore-2607.png) {border="true" scale="100%"} |Callout|Area|Description| |-------|----|-----------| |A |**Total credits consumption**| View an overview of your credits for the current active contract. Expand the arrow to reveal a credit ledger, including any credits that rolled over from your last contract period.| |B |**Global date range**| Use the time picker to update all of the date ranges across the FinOps Center at once.| |C |**Cumulative credit consumed**| View a column chart containing your cumulative credit consumption across all products.| |D |**Contract renewal indicator**| The vertical grey line indicates the point at which your Cribl contract was renewed. Because credits are consumed on a per-contract basis, you might see a drop in consumed credits directly after the renewal indicator, even if it is mid-month.| |E |**Total acquired credits**| The horizontal red line indicates total acquired credits in relation to consumed credits, including refunds and rollovers.| |F |**Date range picker**| Use the date range selector to view usage and cumulative credit consumption in a specific date and time period.| |G |**Credit usage**| View a column chart containing credit usage by product. Hover over each column to view the number of credits consumed for the time period indicated on the x-axis.| |H |**Consumption by product**| View a donut chart of your credit consumption by product for the selected date range, expressed as a percentage of your total credit allotment for the active contract period.| |I |**Per product consumption**| Find detailed, per-product credit consumption information in this section. Expand a product name for the single product usage view.| |J |**Sparklines** | View usage changes at-a-glance with the per-product sparkline chart and month-over-month trend.| ## View Product-Specific Usage and Credit Consumption To further understand how your Organization is using Cribl and spending credits, you can select a product or offering from the top menu bar. **Stream** On the Stream tab, you'll find these helpful billing metrics: - The total credit consumption by Cribl Stream, including the current month and total monthly average. - Credit consumption and 3-month consumption forecasting based on the current credit consumption in this Organization. - Credit consumption by environment type, including hybrid, cloud, and Connected Environments. - Cribl Stream usage in GB of data ingested, visualized by environment type. - Cribl Stream usage per Workspace in GB of data ingested. - The 10 Worker Groups with the most data usage in GB. **Edge** On the Edge tab, you'll find: - The total credit consumption by Cribl Edge, including the current month and total monthly average. - Credit consumption and 3-month consumption forecasting based on the current credit consumption in this Organization. - The amount of dropped bytes against your total ingest. Dropped bytes don't count against your credit allowance. - Cribl Edge usage per Workspace in GB. **Search** On the Search tab, you'll find: - The total credit consumption of your Cribl Search instance, including the current month and total monthly average. - Credit consumption and 3-month consumption forecasting based on the current credit consumption in this Organization. - Cribl Search usage in CPU hours. - Cribl Search usage per Workspace in CPU hours. **Lake** On the Lake tab, you'll find: - The total credit consumption of your Cribl Lake instance, including the current month and total monthly average. - Credit consumption and 3-month consumption forecasting based on the current credit consumption in this Organization. - Cribl Lake usage in GB stored data. - Cribl Lake usage per Workspace in GB stored. **Guard** On the Guard tab, you'll find: - The total credit consumption of Cribl Guard, including the current month and total monthly average. - Cribl Guard usage in GB of data scanned. - Cribl Guard usage per Workspace in GB of data scanned. ## Understand Your Monthly Invoice {#invoice} Your invoice offers details about the usage and costs you have incurred in the current and previous months for your products, [Cribl Guard](/guard/about), and [Connected Environments](/stream/cloud-connections), along with a cost item breakdown for more granularity. ![Monthly invoice information](finops-invoices.png) {border="true" scale="75%"} To view your monthly Cribl invoice, make sure you're logged in to your Cribl.Cloud account and you've selected your Organization. 1. From the sidebar, select **FinOps Center**. 1. The **Invoices** tab is where you'll find your monthly invoices. - Each invoice is ordered by month, most recent to oldest. - The invoice status will be **Draft** for the current month until your billing period ends, as defined in your contract. - You can download **Final** invoices as JSON or CSV using the Actions ![](actions-dropdown.light.svg) menu. 1. To view the details of each monthly invoice, expand the cost item. Here, you'll see the breakdown of credits consumed by product and infrastructure: |
Product
|Cost item| |-------|-------------------| |Cribl Stream|
  • Cloud Worker Group Net Data Ingest
  • Hybrid Workers GBs Received
  • Connected Stream GB In (on-prem Leaders that are passing usage data to Cribl.Cloud)
| |Cribl Edge|
  • Edge Node GBs Ingress
  • Connected Edge GBs In
| |Cribl Search|
  • Search Subscription (flat-rate pricing)
  • Search Total Compute (CPU x Hours)
| |Cribl Lake|Cribl Lake Total Storage (dataset size volume per GB on an assumed 30 day data retention schedule)| |Infrastructure|
  • Cribl.Cloud Worker Group infrastructure usage in hours, per MB/s
  • Additional Workspaces above the included allowance (250 credits per Workspace per month, prorated daily; see Workspace [Limitations](/stream/workspaces#limits))
  • Static Egress Infrastructure (hours) and Static Egress Traffic (GB) for each region with [static egress](/stream/static-egress#billing) enabled, grouped by Workspace
| |Guard|Cribl Guard GB scanned. See [How You Are Billed for Cribl Guard](/guard/guard-configure#how-you-are-billed-for-cribl-guard) for more information.| ### Download Invoices {#download} You can download your monthly Cribl.Cloud invoices as CSV or JSON files. Then, use them in external tools to help with budget planning and analytics or store them for historical purposes. >You can only download invoices with a **Final** status. **Draft** invoices can't >be downloaded. {.box .success} To download an invoice: 1. In the sidebar, select **Organization**, then **FinOps Center**. 1. Select the **Invoices** tab. 1. Hover over Actions ![](actions-dropdown.light.svg) for the invoice you want to download. 1. Select **Download CSV** or **Download JSON**. ## Frequently Asked Questions {#faq} ### How Is Usage Calculated? {#usage-calculated} For Cribl Stream and Cribl Edge, your total spend equates to data ingest plus the infrastructure resources needed for processing your data. We charge on ingress (data in), but you never pay for egress (data out), so you can send your processed data to as many receivers as you'd like. The exception is the optional static egress feature, which adds an hourly infrastructure charge and a per-GB charge for each region where you enable it. See [How Static Egress Is Billed](/stream/static-egress#billing). For Cribl Lake, usage equates to the amount of compressed data stored. For Cribl Search, usage depends on the engine type: - **Lakehouse engines** bill on the engine size you select (a daily ingest tier) and on the data retained on the engine. Ingest is metered at the engine, regardless of any upstream processing in Cribl Stream or Cribl Edge. Individual searches over Lakehouse data don't add per-search charges. - **Federated engine** billing depends on your model. Tiered and Search Subscription plans bill while selected and let you search within the tier's performance limits. Usage-Based (Pay-as-you-go) bills by compute consumed per search. For background on each engine type, see [Cribl Search Engines](/search/engines). ### How Is Cost Calculated? {#cost-calculated} In Cribl.Cloud, one credit equals one US dollar at list pricing. Discounts in your contract can change the dollar value of a credit. Each Cribl product consumes credits at a different rate. For a detailed explanation, see our [Cribl Pricing Guide](https://cribl.io/pricing/) or contact Cribl Sales. Here's a quick summary of Cribl.Cloud credit consumption: |
Product
|General Calculation| |-------|-------------------| |Stream |Ingest pricing (infrastructure pricing based on region):
  • 0.32 Credits/GB per Cloud Worker
  • 0.26 Credits/GB per Hybrid Worker
| |Edge|Ingest pricing:
  • 0.21 Credits/GB per Edge Node
| |Search|Cribl Search uses two billable engine types:
  • **Lakehouse engines** are billed by engine size (a daily ingest tier) and storage retained. Ingest is measured at the engine, separately from any upstream processing in Cribl Stream or Cribl Edge. Searches over lakehouse engine data have no per-search charge.
  • **Federated engine** is billed by engine size (a compute capacity limit).
Apart from the engines, two other billing models can apply to federated compute:
  • **Usage-Based (Pay-as-you-go)**: Bills by compute consumed per search. Designed for occasional or experimental federated use.
  • **Search Subscription**: Flat fee for a fixed federated capacity, tied to a legacy contract. No per-search charges while active.
For details, see [How Lakehouse and Federated Engines Are Billed](/search/engines#billing-comparison).| |Lake|Storage pricing based on 30-day retention:
  • .05 Credits/GB if Cloud Worker managed by Cribl
  • .02 Credits/GB if self-managed
| |Guard|
  • [Cribl Guard](/guard/) billing begins as soon as the Cribl Guard Function starts ingesting data in the Pipeline and scanning for sensitive information.
  • You're billed credits per GB scanned.
  • You can start accruing charges immediately after enabling **Protect** on a Destination from the Cribl Guard homepage.
See [Configure Cribl Guard](/guard/guard-configure) for more details.| |Insights|Pricing is based on a rolling data retention period. For more details, visit [Insights Pricing](https://cribl.io/pricing/plan/?product=cribl-insights).| ### Where Can I View Connected Environment Consumption On My Bill? {#connected-env} You can view Connected Environment consumption and usage in a few places. First, make sure you're logged in to your Cribl.Cloud account. View credit cost for Connected Environments: 1. Navigate to **Organization**, then **FinOps Center**. 1. In the **Month** column, expand a finalized invoice, then select **Stream** or **Edge**. 1. If you have Connected Environments cost, you'll see it listed here as **Connected Stream GBs In** or **Connected Edge GBs In**. View usage for Connected Environments: 1. Navigate to **Organization**, then **FinOps Center**. 1. Select **Stream** or **Edge** in the top menu. 1. Scroll to **Stream Usage (GB)** or **Edge Usage Per Workspace (GB)**. ### How Often Is Credit Data Refreshed in Cribl.Cloud? {#data-refresh} Cribl.Cloud refreshes credit data every five minutes to provide you with the most accurate information about your usage and cost. ############################################################ # SOURCE: https://docs.cribl.io/billing-licensing/on-prem-licensing.md ############################################################ # Manage Licenses for Cribl On-Prem Deployments This page applies to **Cribl Stream** and **Cribl Edge** deployed on your own infrastructure (on-prem). For Cribl.Cloud plans and credits, see [FinOps Center](finops-center). Every Cribl Stream and Cribl Edge download package comes with a Free license that allows for data ingest of up to 1 TB/day. This license requires sending anonymized [Telemetry Data](#telemetry-data) to Cribl. Enterprise, Standard, and Sales Trial licenses are entitled to a defined, per-license daily ingestion quota. These licenses do not require sending telemetry metadata. > This page applies only to on-prem deployments of Cribl Stream and Cribl Edge. > For basic information about Cribl.Cloud Enterprise and Standard plans, see [Cloud Pricing](/stream/deploy-cloud#pricing) (Stream) or [Cloud Pricing](/edge/deploy-cloud#pricing) (Edge). {.box .cloud} ## Manage On-Prem Licenses ### Check Licenses To check your license type, restrictions, and/or expiration date: 1. In the sidebar, select **Settings**. 1. On the **Global** tab, select **Licensing** to see these details. ### Add or Renew Licenses On the Leader (or in a Single-instance deployment), after submitting your newly untarred Cribl Stream or Cribl Edge software registration page, you can add and manage licenses at **Settings** > **Global** > **Licensing**. Select **Add License** to paste in a license key provided to you by Cribl. This applies to Cribl Stream and Cribl Edge Standard and Enterprise licenses, which must be renewed annually. Free licenses are already onboard the download package, need not be added or managed here, and do not expire. ### License Expiration {#when-licenses-expire} When an Enterprise or Standard license expires, Cribl Stream or Cribl Edge attempts to fall back to a Sales Trial or Free license; if there is no valid fallback license, the product will backpressure and block all incoming data. - You can remove an expired paid license to fall back to the Sales Trial or Free type. - An expired Sales Trial license will fall back to Free, but you must remove the Sales Trial license and restart the Leader. If you already added a new paid license, but still see Sales Trial or Free after a previous license expires, delete the expired license or restart the Leader to force the updated license state to take effect. To resolve expiration and ensure the correct license is active: 1. In the sidebar, select **Settings**. 1. On the Global tab, select **Licensing**. 1. If an expired license is present, select **Delete license**. 1. Restart the Leader to apply the current license immediately. > Upon expiration of a paid license, if there is no valid fallback license, Cribl Stream or Cribl Edge > will backpressure and block all incoming data. {.box .warning} ### Licenses in Airgapped Deployments If your environment does not allow internet connectivity, you'll need to bypass the registration web form when you deploy or upgrade Cribl Stream or Cribl Edge. To do so: 1. On the Leader (or single instance) host, navigate to `$CRIBL_HOME/local/cribl`. 1. Create a file named `licenses.yml`. 1. Paste in your license key in this format, then save the result: ```yaml licenses: - ``` ### Notification of Renewal and Expiration {#notifications} The UI will prompt you to renew your paid license by displaying banner and drawer notifications, starting 30 days before license expiration. When you see these prompts, verify your license expiration date and contact Cribl Sales at sales@cribl.io to renew. Beyond these default notifications, you can configure custom [License-Expiration Notifications](/stream/notifications#license) (Stream) or [License-Expiration Notifications](/edge/notifications#license) (Edge). You can send these to PagerDuty, or to other external services via webhook. ## License Quotas ### Track Data Ingestion To track your data ingestion volume over the last 30 days: 1. In the sidebar, select **Monitoring**. 1. Select **System** and then **Licensing**. This shows you the dashboard with your license consumption. For higher-fidelity metrics, you can enable the [Cribl Internal](/stream/sources-cribl-internal) Source CriblMetrics option (Stream) to forward metrics to your metrics Destination of choice, and run a report on `cribl.total.in_bytes`. ### Exemptions from License Quotas {#exemptions} The following data is exempt from license quotas and Cribl Credit usage: - Data generated by [Cribl Internal](/stream/sources-cribl-internal) Sources (Stream) does not count against your ingestion quota. - Edge Node events that you send to the DevNull Destination or drop in any Pipeline do not count against your ingestion quota. This license reduction is calculated based on average event size and may not represent the exact number of bytes you drop. If you are connecting Workers/Edge Nodes in a Cribl Stream Cloud [hybrid deployment](/stream/cloud-enterprise#hybrid), you are granted additional exemptions to prevent double billing (in Cribl Edge, these exemptions also apply to customer-managed deployments): - Data transferred between Cribl Stream Workers via the [Cribl HTTP](/stream/sources-cribl-http) and [Cribl TCP](/stream/sources-cribl-tcp) Sources does not count against your ingestion quota. - Data that Cribl Edge sends to Cribl Stream from the [Cribl HTTP](/stream/destinations-cribl-http) and [Cribl TCP](/stream/destinations-cribl-tcp) Destinations counts against quota only in Cribl Edge. - Data generated by [Datagens](/stream/sources-datagens) (Stream) does not count against your ingestion quota. ### License Quotas with Compressed S3 Buckets If you pull data from compressed S3 buckets, the license quota is applied to the uncompressed size of the file objects. ### Enforce License Quotas If your data throughput exceeds your license quota: - Free and Standard licenses enforce data ingestion quotas through limits on the number of Worker Groups/Fleets and Worker/Edge Node Processes. - Enterprise license keys turn off all enforcement. - When an Enterprise or Standard license expires, Cribl Stream or Cribl Edge will attempt to fall back to a trial or free license, or - only if that fails - will block incoming data. For details, see [Combining Licenses](#combining-licenses). ## License Types Cribl offers several license types for Cribl Stream and Cribl Edge including Enterprise, Standard, and Free. For a current list of available license types and a detailed comparison of what's included in each, see Cribl [Pricing](https://cribl.io/pricing/). ## Combine Licenses Multiple licenses can coexist on one instance. When two or more Standard or Enterprise licenses are present, the effective ingestion quota for the deployment will be equal to the sum of their individual ingestion quotas. When multiple *license types* coexist, the effective license is determined by the following priority order: 1. Enterprise or Standard licenses that have not expired. 1. Sales Trial licenses. 1. Free licenses. > If Enterprise and Standard licenses coexist, the limits imposed by the > Standard license remain in effect. The Enterprise license does not supersede > Standard license limits. To remove Standard license restrictions, you must > delete the Standard license from the deployment. {.box .info} ## Licensing in Distributed Deployments With licenses that limit the number of Worker Processes/Edge Nodes, Cribl Stream or Cribl Edge will attempt to balance or rebalance Worker Processes (threads) as evenly as possible across all licensed Workers or Edge Nodes. You configure licensing only on the Leader Node. (See [Managing Licenses - Adding and Renewing](#manage-on-prem-licenses).) The Leader will push license information down to Worker Groups or Edge Fleets as part of the heartbeat ([Stream](/stream/deploy-distributed#communication), [Edge](/edge/setting-up-leader-and-edge-nodes)). Do not add license keys on Worker Nodes or Edge Nodes. ### Licensing on Managed Node Startup {#licensing-managed-node-startup} On-prem and hybrid Worker Nodes and Edge Nodes save a copy of the license they receive from the Leader. While a node is connected, the node periodically saves the copy again. Each save restarts the saved-copy lifetime. The saved-copy lifetime is the period after the last save during which a restarting node can still load the copy. This period is typically a couple of weeks. License expiration is the date specified in the license itself, usually much later. A saved copy can age out before the license expires. If a node loses its connection to the Leader: - If the node stays running, the node continues using the license already in memory until the license expires. The saved copy can age out while the node is disconnected, but the running node doesn't switch to the Free license. - If the node restarts before the saved copy ages out, the node loads the saved license and uses that license until it expires. Restarting doesn't save the copy again or extend the saved-copy lifetime. If the node restarts again after the saved copy ages out, the node uses the Free license. - If the node restarts after the saved copy ages out, or if the saved copy is missing or can't be read, the node uses the Free license until the node reconnects to the Leader. When the node reconnects, the node receives the current Leader license and saves a new copy. Saving the new copy starts a fresh saved-copy lifetime. The first time a node starts, before it has received a Leader license, it uses the Free license included with the installation. You might see this warning in the log: ``` { "time": "2023-02-10T15:11:48.609Z", "cid": "api", "channel": "cribl", "level": "warn", "message": "number of worker processes has been limited by the license", "requested": 14, "licenseLimit": 10, "source": "cribl.log" } ``` On a first start, you can ignore the warning. After the Leader sends a production license, the Free license no longer limits Worker Processes. If the warning continues after a restart, reconnect the Worker Node to the Leader. ### Convert an On-Prem License to a Cribl.Cloud Billing Plan You can convert on-prem Cribl Stream or Cribl Edge licenses to a Cribl.Cloud billing plan. This lets you keep your on-prem deployments, but manage all of the environment licenses in one interface. For more details and setup steps, visit [Connecting On-Prem Leaders to Cribl.Cloud Billing](/stream/cloud-connections). ## Telemetry Data {#telemetry-data} A **Free** license requires sharing of telemetry **metadata** with Cribl. Cribl uses this metadata to help us understand how to improve the product and prioritize new features. Telemetry payloads are sent from all Cribl Stream and Cribl Edge Nodes (Leader and Workers), to an endpoint located at `https://cdn.cribl.io/telemetry/`. ### Test the Telemetry Endpoint Connectivity To manually test connectivity to the telemetry endpoint, especially if you need to configure a proxy, you can use the following command: ```shell curl https://cdn.cribl.io/telemetry/ ``` Expected response: `cribl /// living the stream!` If you get a 302 response code, check whether you've omitted the trailing `/` from the URL. ### Disable Telemetry With an Enterprise or Standard license, you can disable telemetry sharing from on-prem Cribl Stream or Cribl Edge. With a Free license, disabling telemetry will cause the product to block inbound traffic within 24 hours. If you would like an exception to disable telemetry in order to deploy in your environment, please contact Cribl Sales at sales@cribl.io, and we will work with you to issue licenses on a case-by-case basis. Once you have received a license that removes the telemetry requirement, you can disable telemetry: 1. Navigate to **Settings** > **Global** > **System > General Settings > Upgrade & Share Settings**. 1. Toggle **Share telemetry with Cribl** off. ### Metadata Shared Through Telemetry Your Cribl Stream or Cribl Edge instance shares metadata with Cribl per interval (roughly, every minute). Details sent for Nodes in any mode: - Version - OS Distribution/Version - Kernel Version - Instance GUID - License ID - Earliest, Latest Time - Number of Events In and Out, overall and by Source type and Destination type - Number of Bytes In and Out, overall and by Source type and Destination type - Number of Open, Closed, Active Connections - Number of Routes - Number of Pipelines - Runtime Environment Indicators (AWS and Kubernetes) Additional details sent for Leader Nodes (when Cribl isn't sending managed Node data): - Runtime Environment - OS Distribution / Version - Version - Kernel Version ### How We Use Telemetry Data With telemetry enabled, Cribl software sends usage data directly to Cribl. We securely store and encrypt this data on Cribl-managed servers, with restricted access. Cribl fully anonymizes and aggregates this usage data in our systems of analysis. There, we use the aggregated metrics to improve Cribl products and services by analyzing circumstances around disruptions, opportunities for ingest efficiencies, and ways to optimize performance. Access is restricted to only those Cribl employees and contractors who require anonymized data to perform their jobs. Cribl collects License IDs only to ensure that all data is being sent by a Cribl product. These IDs cannot be used to personally identify any user of Cribl software or Cribl.Cloud services. For further details, see the [Cribl Privacy Policy](https://cribl.io/legal/privacy-policy/). ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-ai-data-handling.md ############################################################ # Cribl AI and Your Data Cribl AI does not access all event data flowing through Cribl. Depending on the feature, it might access limited user-selected or sampled events, along with query, configuration, or operational metadata, to perform the requested or enabled workflow. Each feature accesses only the minimum context it needs when you (or an enabled automated feature) invoke it. ## What Data Cribl AI Accesses {#data-access} The following features access limited context when you invoke them: - Cribl AI generates follow-up query suggestions by looking at your current KQL query, up to the last 50 query strings from your search history (but not their results), and sample events from the current search job, which Cribl might truncate for size limits. - The KQL assistant helps create or refine queries by looking at the query currently in the search editor, metadata from up to 50 recently used Datasets (ID and description), and, when needed, sampled events from up to 3 Datasets with up to 5 events from each. - The visualization assistant looks at the selected Dataset's metadata, along with up to 5 sample events and inferred field information, to suggest effective ways to display the data. - Pipeline Builder uses user-provided or captured sample events, subject to token limits, together with the Pipeline configuration and schema context loaded into the session, to help with transformation logic. - The Billy chatbot can inspect your deployment configuration and live operational status when you ask, including Worker Groups, Sources, Destinations, Routes, Pipelines, Search and Lake metadata, health, and I/O metrics. Information that these read-only inspection tools return might be sent to your configured AI provider to generate a response. Some tools summarize responses or omit selected fields, and Global Variable values are excluded from chatbot inspection responses. Administrators can [configure named sensitive fields to mask](/stream/securing-onprem/#sensitivefields) in Source and Destination API responses. Apply this configuration to each relevant Worker Group, and review it when configurations or integrations change. For details, see [Ask About Your Cribl Deployment](copilot-chat#environment-aware). - [Search investigations](/search/investigate/) can run bounded searches, analyze results, and use Dataset Intelligence and Notebook context to help with an investigation. Optional web search is routed through the Cribl AI backend, which makes it unavailable in [Cribl.Cloud Government](#fedramp). - When you configure [MCP integrations](/copilot/mcp-integrations), Search investigations and the Billy chatbot can call tools on the external MCP servers you enable. Cribl sends the tool arguments the model generates to the external server, and the returned results can become context for the active AI model. - Dataset Intelligence, which Search investigations uses, samples events and runs limited exploratory queries to build a Dataset reference card. - Cribl Guard features might analyze user-selected or sampled events to recommend detection and masking rules. [Background detection](/guard/guard-background-detection/) samples a subset of Pipeline events for on-Worker sensitive-entity detection using a downloaded model bundle. - Other assistants, such as Notebook summary, git commit messages, and explain KQL or Pipeline, send the relevant query, Notebook section, or configuration diff for the specific action you invoke them on. ## Session Persistence and Retention {#session-retention} Cribl saves [Search investigation](/search/investigate/) and Pipeline Builder sessions automatically as you work, including the conversation messages and the feature context for each session. Cribl retains a session for at least 30 days from its last activity, then deletes it. Sessions that you continue to use stay available past 30 days, because each update resets the retention period. ## Model Training {#training} Cribl does not use your data to train large language models (LLMs). ## Local Detection Versus LLM Processing {#local-vs-llm} [Background detection](/guard/guard-background-detection/) runs locally on the Worker Node using regex rules and a specialized named-entity-recognition (NER) model, not an LLM, so it does not send sampled events to an external chat-completion service. Only the separate [Analyze detections](/guard/guard-background-detection#analyze-detections) workflow uses an LLM, to classify findings and suggest mitigations after detection. For the available detection models and how to select one, see [Background Detection](/guard/guard-background-detection/). ## Cribl AI in Cribl.Cloud Government {#fedramp} [Cribl.Cloud Government](/fedramp/) never contacts the Cribl AI backend, the Cribl-hosted service at `ai.cribl.cloud` that serves Cribl-managed models and related AI capabilities: - No prompt, event, or configuration context leaves the deployment for Cribl-managed models. Every large language model (LLM) request goes to the [Custom AI Provider](cribl-byoai) that you configure and control. - Cribl reports no AI usage analytics or telemetry from these deployments. - Web search and Billy documentation search are unavailable, because both depend on the Cribl AI backend. Cribl blocks these requests at the platform level, so a misconfiguration cannot route data outside the FedRAMP boundary. For the full set of differences, see [AI in Cribl.Cloud Government](/fedramp/differences#ai-in-cribl-cloud-government). ############################################################ # SOURCE: https://docs.cribl.io/copilot/copilot-chat.md ############################################################ # Use the Billy Chatbot The Billy chatbot is an AI assistant designed to streamline your interaction with Cribl products and integrations. You can use the chatbot across Cribl Stream, Cribl Search, Cribl Edge, and Cribl Lake to get prompt responses to common issues and configuration questions. The Billy chatbot is also available here in Cribl Docs and as an app in the Cribl community Slack workspace. Specifically, the chatbot can help you: * **Answer technical questions:** Detailed responses to questions about Cribl, Docker, Kubernetes, and regex * **Inspect your deployment:** Answers to questions about your own Worker Groups, Sources, Destinations, Routes, Pipelines, system health, and more, drawn from your live configuration * **Troubleshoot problems:** Step-by-step solutions for common issues and errors, combining the documentation with the current state of your deployment * **Find documentation:** Relevant content from Cribl documentation * **Use integrations:** Assistance with setup and configuration of integrations with Docker and Kubernetes * **Write regular expressions (regex):** Help with regex construction and debugging * **Generate basic KQL:** In the drop-down next to the Billy text box, select **Generate KQL**. For more advanced KQL generation in Cribl Search, see [Writing KQL queries with Billy](/search/copilot-kql). ## Get Started > Cribl AI is a native part of the product and available by default, so the Billy chatbot is available without any setup. For details, see [Cribl AI Availability](/copilot/#enable). > {.box .info} To start using the chatbot, select the Billy icon ![](copilot-icon.svg) at the bottom right of any product page, then start typing a question or request. ### Where the Chatbot Appears {#availability} In Cribl.Cloud, the chatbot widget appears inside product [Workspaces](/stream/workspaces/) only. It does not appear on Organization-management pages such as `manage.cribl.cloud`, or on App Platform routes. In on-prem deployments, the widget appears on Cribl Stream, Cribl Search, Cribl Edge, and Cribl Lake product pages. ## How to Use Prompts Successfully Follow these guidelines to get clear answers, thorough instructions, and helpful tips tailored to your specific context. | Best Practice | Example | | --- | --- | | Use clear and concise language. | *Show me how to configure a Cribl Pipeline.* | | Provide context or background information. | *How do I integrate Cribl with Docker on a Kubernetes cluster?* | | Describe issues thoroughly. | *I'm getting the following regex error in Cribl. How can I resolve it?* | | Provide output examples. | *Create a detailed summary of how Cribl Search works. The output should be formatted like this:
Overview
...
Integrations
...
Example Queries
...* | | Ask for specific documentation. | *Include the Cribl documentation on data routing.*

You can also reference specific sections or topics from Cribl, Docker, Kubernetes, or regex documentation for more detailed answers. | | Refine your queries. | If the response isn't exactly what you were looking for, refine your question or ask follow-up questions to improve the result. | | Provide feedback. | Select the thumbs-up or thumbs-down button to share feedback on responses to help improve the accuracy and relevance of Billy. | ## Ask About Your Cribl Deployment {#environment-aware} In addition to product knowledge, the chatbot can answer questions about your Cribl deployment. When you ask about the state of your environment, the chatbot uses read-only tools to inspect your configuration and live status, then summarizes the results. This saves you from manually navigating the UI or running multiple queries. You can ask the chatbot about: - **Worker Nodes and Groups:** Worker Groups, Distributed deployment summaries, system information, and enabled features. - **Sources and Destinations:** Configured Sources and Destinations, live I/O status, byte counts, event counts, and persistent queue status. - **Routing and processing:** Routes, Pipelines, Packs, Collectors, Event Breakers, Global Variables, and Lookups in Cribl Stream. - **Search resources:** Datasets, saved queries, macros, and search engines in Cribl Search. - **Edge deployments:** Edge Fleets, Edge Node processes, containers, and host information in Cribl Edge. - **Lake resources:** Lake Datasets, Lake Sources, and Lake storage locations in Cribl Lake. - **System status:** Overall health, system messages and notifications, running processes, logger configuration, alert conditions, monitor configuration, and Notification Policies. The chatbot provides answers based only on the inspection tools available in your deployment. For example, it surfaces Cribl Search resources only when Cribl Search is part of your deployment. ### Example Prompts | Goal | Example Prompt | | --- | --- | | Inventory | *Show me my Worker Groups.* | | Inventory | *List my configured sources and destinations in the `default` group.* | | Live status | *What's the live throughput for my Splunk destination?* | | Live status | *Are any of my sources reporting errors right now?* | | Queue health | *What's the status of my persistent queues?* | | System health | *Give me a health check of my deployment.* | | Troubleshooting | *Why are events not reaching my S3 destination?* | | Capabilities | *Which Cribl AI features are available in this Workspace?* | ### How the Chatbot Protects Your Configuration {#redaction} When the chatbot reads your configuration, the information that its read-only inspection tools return might be sent to your configured AI provider to generate a response. Cribl applies the following safeguards to limit what those tools expose: - **Global Variable value exclusion:** The chatbot's Global Variable inspection tool omits variable values, which can contain secrets, and returns only variable names and metadata. - **Summary projections and field omission:** Some inspection tools return metadata-level summaries, such as IDs, types, and short descriptions, and omit selected fields rather than returning complete configuration objects. - **Configurable Source and Destination masking:** Administrators can [configure named sensitive fields to mask](/stream/securing-onprem/#sensitivefields) in Source and Destination API responses. Apply this configuration to each relevant Worker Group, and review it when configurations or integrations change, because masking covers only the field names you list. - **Capability gating:** Inspection tools that don't apply to your deployment are not available to the chatbot. For example, Distributed-only tools are unavailable in a Single-instance deployment. ## How the Chatbot Works The Billy chatbot combines a foundational large language model (LLM) with two grounding systems: - **Documentation retrieval:** A live, domain-restricted search over [Cribl Docs](https://docs.cribl.io), routed through the Cribl AI service, that draws on Cribl product documentation to answer questions about Cribl concepts and features. Because the search runs against the live documentation site rather than a pre-built index, results reflect current content. This retrieval requires outbound connectivity from the Leader to `ai.cribl.cloud` on port `443`. For details, see [Billy Port](/stream/ports/#cribl-copilot-port). Documentation answers include citations to the source pages on Cribl Docs. - **Deployment inspection:** A set of read-only tools that the chatbot can call to inspect your live Cribl configuration, as described in [Ask About Your Cribl Deployment](#environment-aware). For troubleshooting questions, the chatbot can use both grounding systems together. It retrieves relevant documentation for context, then inspects your deployment for specifics, and synthesizes the two sources into a single answer. Responses clearly separate guidance based on documentation from observations about your specific deployment. ## What the Chatbot Doesn't Do The chatbot has no direct access to the data flowing through Cribl, so it can't answer questions like, "Where are my VPC logs?" or summarize event content. Inspection tools see your configuration and operational status only, and not the events themselves. This chatbot, like any AI, is still learning. It may not answer all questions perfectly, so review responses carefully. To help Billy learn, select the thumbs-up or thumbs-down button on any response to provide feedback. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai.md ############################################################ # Custom AI Providers (Bring Your Own Model) Custom AI Providers enable a Bring Your Own Model (BYOM) approach, allowing you to connect your own large language model (LLM) backend to Cribl AI features. This gives you the flexibility to route supported Cribl AI capabilities through your preferred AI infrastructure instead of using the default Cribl-managed backend. ## Why Use Custom AI Providers? In commercial Cribl.Cloud and on-prem deployments, Cribl-managed AI features use models selected and operated by Cribl by default, with traffic following Cribl-managed routes and service contracts. > In [Cribl.Cloud Government](/fedramp/), Cribl-managed models are never available. A [Custom AI Provider](#deployment-limitations) is required to power Cribl AI. See [AI in Cribl.Cloud Government](/fedramp/differences#ai-in-cribl-cloud-government). {.box .cloud} While this default configuration is secure, many enterprises require deeper levels of control. Custom AI providers allow you to replace the default backend with your own approved AI vendors, ensuring that your keys, models, and traffic stay within your existing cloud governance boundaries. Integrating your own AI backend provides the following key benefits for your deployment: - **Vendor standardization**: Use the AI providers your Organization has already vetted and standardized on. - **Data privacy and compliance**: Keep AI traffic within specific regulatory or contractual boundaries. This is essential for organizations with strict data residency requirements or those operating in highly regulated industries. - **Direct governance**: Maintain full control over your API keys and the specific model versions used for inference. - **Cost management**: Gain direct visibility into how AI inference is billed. By using your own provider contracts, you can apply existing cloud credits and committed spend to your Cribl AI usage. ## How Custom AI Providers Work Custom AI providers add a configurable backend to the existing Cribl AI architecture. When a custom AI provider is enabled, Cribl AI routes all supported agentic workflows through your self-managed models (such as Anthropic or OpenAI) instead of the default Cribl-managed backend. > When a custom AI provider is active, all Cribl AI features that are supported in your deployment route through your configured provider. The Cribl-managed backend is not used as a fallback for individual capabilities. {.box .info} > The Deep tier accepts multiple model IDs. The first model in the list is used by default by all features that route through the Deep tier. See [Model IDs and Feature Routing](#modelid) for details. {.box .info} ### Main Components ![Custom AI Provider Component Overview](copilot-byoai.png) {scale="90%" border="true"} The following core components of the custom AI provider feature work together to route and process AI requests within your managed environment: - **Cribl Leader Node**: The Leader Node serves the UI and API. All AI requests initiated in the UI are first received by the Leader. - **AI service**: A service running on the Leader Node that manages AI agents. When a custom AI provider is enabled, it calls your configured AI provider directly using your stored credentials for all supported Cribl AI features. ### Example Workflow When you plug in a custom AI provider, you are essentially replacing the "brain" behind Cribl AI features. Once you configure it in **AI Settings**, the Cribl Leader Node stops sending requests to the default Cribl model provider and instead sends them directly to your hosted model. To see this in practice, consider the [KQL assistant](/search/copilot-kql) in Cribl Search. Without needing to know Kusto Query Language, an analyst can use your custom LLM to investigate data. 1. **Natural language input**: An analyst types, "Show me the top 10 source IPs with the most failed login attempts in the last hour" into the Billy search box. 2. **Custom inference**: Cribl sends this request to your configured provider (such as Anthropic or OpenAI). 3. **KQL generation**: Your LLM processes the request and returns the specific KQL syntax: `dataset="auth_logs" | where status=="failure" | summarize count() by src_ip | top 10 by count_` 4. **Execution**: Cribl Search executes the query in KQL syntax against your data. ## Supported Custom AI Providers and Features {#supported} Review the following sections for details on currently supported custom AI providers and the specific Cribl AI features they power. Supported providers currently include: - [Anthropic via Amazon Bedrock](cribl-byoai-anthropic) - [OpenAI via Microsoft Foundry](cribl-byoai-openai) - [Google Gemini](cribl-byoai-gemini) - [LiteLLM](cribl-byoai-litellm) - [OpenAI-compatible endpoints](cribl-byoai-openai-compatible) Cribl is committed to an agnostic AI strategy. The framework is designed to expand to additional model families and providers in future releases. ### Deployment Limitations {#deployment-limitations} Before configuring a custom AI provider, note the following constraints: - **Single provider scope**: You can configure only one custom AI provider per Workspace (in Cribl.Cloud) or Global setting (on-prem). - **Workspace and Organization isolation**: Custom AI provider configuration is scoped to the Workspace (in Cribl.Cloud) or Global setting (on-prem) where you create it. Settings and credentials do not propagate to other Workspaces or Organizations, and Cribl AI in one Workspace never routes requests through a provider configured in another Workspace. - **Required in Cribl.Cloud Government**: In [Cribl.Cloud Government](/fedramp/), a custom AI provider is the only way to power LLM-backed Cribl AI features. Cribl-managed models are never available, and you cannot switch back to them after configuring a provider. Deleting your provider makes those features non-operational rather than falling back to Cribl-managed models. See [AI in Cribl.Cloud Government](/fedramp/differences#ai-in-cribl-cloud-government). - **Inference only**: Custom AI providers are used for inference only. Fine-tuned or custom-trained models are not supported at this time. ### Model IDs and Feature Routing {#modelid} When you enable a custom AI provider, Cribl AI agents send requests to your LLM endpoint using the model IDs you assign during provider setup. You configure models for three tiers (Fast, Balanced, and Deep) in the third step of the [configuration wizard](cribl-byoai-config#add). The Fast and Balanced tiers each take a single model ID. The Deep tier accepts one or more model IDs. At a high level, Cribl groups models into three categories: - **Fast models** - Used for lightweight tasks such as: - KQL explanation - Search result analysis - Ruleset selection in Guard - **Balanced models** - Used for more complex, multi-step agents such as: - Git commit message suggestions - Notebook summaries - Guard rule generation - KQL investigations and follow-up workflows - **Deep models** - Used when agents need extended reasoning and long-running context, such as: - Local Cribl Search assistance over your own datasets - Complex KQL assistant scenarios - [Cribl Search investigations](/search/investigate/) #### Deep Tier: Multiple Models and Per-Feature Selection {#reasoning-multi-model} Multiple Cribl AI features use the Deep tier (see the **Deep models** bullet under [Model IDs and Feature Routing](#modelid)). For all of these features, the first model in the configured Deep list is used by default. There is no UI control to switch models on a per-call basis for most Deep-tier features. [Cribl Search investigations](/search/investigate/) is the exception. Investigation runs can use any of the Deep-tier models you configured for your custom provider, not just the first or default model: - **Admin (provider setup)**: When configuring the BYOM provider, an admin selects one or more model IDs for the **Deep** tier in the [configuration wizard](cribl-byoai-config#add). This is the pool of Deep models available to Search investigations. - **User (per investigation)**: When starting or running an investigation, the user can pick which of the admin-configured Deep-tier models to use for that investigation, using a model selector that appears in the Search investigations UI. The selector is only shown when two or more Deep-tier model IDs are configured. When only one Deep-tier model is configured, the selector is hidden and investigations use that single model. To make multiple Deep models available to Search investigations users, configure two or more Deep model IDs in the provider setup wizard. **Microsoft Foundry and Google Gemini**: When you configure one of these providers, the setup wizard offers a drop-down of supported model IDs with suggested defaults pre-filled for each tier. Your selections are restricted to the models Cribl validates for that provider. **Amazon Bedrock**: The setup wizard pre-fills suggested defaults for each tier and lets you enter model IDs as text. Cribl accepts only supported Claude models, and accepts them with any geographic inference profile prefix, such as `au.` or `eu.`. See [Use Region-Prefixed Model IDs](cribl-byoai-anthropic#regional-model-ids). **LiteLLM and OpenAI-compatible**: The setup wizard does not restrict model selection. You enter any model ID your endpoint accepts. Your endpoint must be able to handle every model ID you specify, even if you internally route them to a smaller set of physical deployments. For the specific model IDs available and suggested per provider, see: - [Anthropic via Amazon Bedrock model IDs](cribl-byoai-anthropic#required-models) - [OpenAI via Microsoft Foundry model IDs](cribl-byoai-openai#required-models) - [Google Gemini model IDs](cribl-byoai-gemini#required-models) - [LiteLLM model IDs](cribl-byoai-litellm#models) - [OpenAI-compatible model IDs](cribl-byoai-openai-compatible#models) ### Token Limits {#token-limits} Cribl uses hardcoded token limits to manage context windows for each model. These limits determine how much context (prompt plus response) can be used in a single request: | Model ID | Token Limit | |----------|-------------| | `gpt-4o` | 123,000 | | `gpt-4.1` | 123,000 | | `gpt-4.1-mini` | 123,000 | | `gpt-4.1-nano` | 123,000 | | `o4-mini` | 123,000 | | `gpt-5.1` | 400,000 | | `gpt-5.2` | 400,000 | | `gpt-5.4` | 200,000 | | `gpt-5.5` | 400,000 | | `gpt-5.6-luna` | 900,000 | | `gpt-5.6-sol` | 900,000 | | `gpt-5.6-terra` | 900,000 | | `us.anthropic.claude-opus-4-7` | 400,000 | | `us.anthropic.claude-opus-4-8` | 400,000 | For all supported Google Gemini models, in both the 2.5 and 3.x families, Cribl uses a limit of **1,048,576 tokens**. For Anthropic models via Amazon Bedrock, Cribl applies the token limit listed for the equivalent `us.` model ID to each region-prefixed version of that model. For example, `au.anthropic.claude-opus-4-8` has a per-request limit of **400,000 tokens**, the same as `us.anthropic.claude-opus-4-8`. These model IDs do not share a single token limit across regions. See [Use Region-Prefixed Model IDs](cribl-byoai-anthropic#regional-model-ids). For all other models, including Anthropic models via Amazon Bedrock that are not listed above, Cribl uses a default limit of **123,000 tokens**. > Cribl does not query your endpoint for context-window sizes. These hardcoded limits are used regardless of what your backend reports. If your deployment has lower limits, you may see truncation or errors on large prompts. {.box .info} ### Supported Cribl AI Features {#aifeatures} When a custom AI provider is active, all supported Cribl AI features route through your managed LLM. This includes: - **[Billy chat experiences](/copilot/copilot-chat/)**: The in-product chatbot, the Cribl Docs assistant, and the Slack community app. - **[Pipeline Builder in Cribl Stream](/stream/copilot-editor/)**: Log-type detection, schema suggestions, and AI-assisted Pipeline editing. - **[KQL assistant](/search/copilot-kql)**: Translating natural language into Kusto Query Language (KQL) in Cribl Search. - **[Cribl Search suggestions](/search/copilot-kql#autocomplete)**: Generating query refinements or follow-up suggestions in the Search bar. - **[Local Cribl Search assistance](/search/copilot-kql#generate)**: Translating natural-language descriptions into queries against local data Sources. - **[Dataset Intelligence](/search/dataset-intelligence/)**: Generating AI-powered reference files for Datasets to improve investigation and query accuracy. - **[Cribl Search investigations](/search/investigate/)**: Running interactive, AI-assisted investigations. Uses the Deep tier and supports a per-investigation model selector when [multiple Deep models](#reasoning-multi-model) are configured. - **[Visualizations](/search/copilot-dashboards/)**: Natural-language suggestions that drive "Visualize this dataset" flows in Cribl Search. - **[Notebook summaries](/search/notebooks#summarize)**: Generating natural-language explanations of Search Notebook logic and findings. - **[Guard rule generation](/guard/guard-rules-library#add-a-cribl-guard-rule-with-copilot-ai-rule-builder)**: Drafting or refining detection rules in Cribl Guard. - **[Analyze detections](/guard/guard-background-detection#analyze-detections)**: Summarizing and contextualizing Cribl Guard background-detection findings with an LLM. - **[Git commit messages](/stream/remote-repositories#git-settings)**: Suggesting descriptive summaries when saving or committing configuration changes. Feature availability also depends on your deployment type. See [Feature Availability](/copilot/#availability) on the Cribl AI overview for the full list of features supported in on-prem and Cribl.Cloud deployments. > **Background detection is not affected by BYOM.** [Background detection](/guard/guard-background-detection/) runs locally using regex rules and a specialized named-entity-recognition (NER) model. It does not use an LLM and does not route through your custom AI provider. The **detection model** selector in the Guard header picks a local NER detection bundle, not an LLM. The downstream [Analyze detections](/guard/guard-background-detection#analyze-detections) workflow does use an LLM and is covered by your custom provider configuration. {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-config.md ############################################################ # Configure Custom AI Providers The Custom AI Providers feature enables a Bring Your Own Model (BYOM) approach, letting you connect your own large language model (LLM) backend to Cribl AI features instead of using the default Cribl-managed LLMs. This topic describes how to add, edit, or delete a custom AI provider. ## Prerequisites {#prereqs} Before you start, make sure that: - You have Owner or Admin permissions for the on-prem deployment or Cribl.Cloud [Workspace](/stream/workspaces/). Only Owners and Admins can add, edit, or delete a custom AI provider. Users in other roles cannot view this configuration and receive a permission error if they call the underlying API. - Cribl AI is [configured correctly](/copilot/#enable) for your deployment (Cribl.Cloud or on-prem). - For on-prem deployments, you are configuring your LLM on the Leader Node (not on a Worker/Edge Node), and the Leader Node has network access to your LLM endpoints. - You have at least one supported LLM account, with: - A deployment identifier (such as the Deployment URL). Not required for Amazon Bedrock or Google Gemini. - Credentials (for example, an API key or bearer token) with permission to invoke the model. ## Open AI Settings {#ai} 1. Sign in to Cribl: - Cribl.Cloud: Open the Workspace where you want to configure Cribl AI. - On-prem: Open the Leader. 2. Select **Settings (⚙)**. 3. If available for your deployment, open the **Global tab**. 4. Select **AI Settings**. On the **AI Settings** page you can: - Review [Cribl AI availability](/copilot/#enable) and the model that powers it. - See whether a custom AI provider is configured for the deployment. - Open the custom AI provider configuration wizard to [add](#add), [edit](#edit), or [delete](#delete) your own LLM. ## Add a Custom AI Provider {#add} To start the configuration, go to the **AI Model Providers** section of the **AI Settings** page and select **Use Custom AI Provider**. > Selecting **Use Custom AI Provider** switches the deployment to custom-provider mode, so Cribl AI features stay unavailable until you save a provider. If you close the wizard before you save a provider, Cribl displays **No AI Provider Configured** and warns that AI features will not work without a provider. Select **Continue** to close the wizard anyway, or **Cancel** to return to it. To restore AI features afterward, select **Use Cribl Default Provider** (not available in deployments that don't allow Cribl-managed models, such as [Cribl.Cloud Government](/fedramp/)), or open the wizard again and save a provider. {.box .info} The **New Custom AI Provider** wizard guides you through three focused steps. ### Step 1: Select a Provider Type Choose the type of LLM backend you want to connect: - **AWS Bedrock**: Anthropic Claude models accessed through AWS Bedrock. - **Microsoft Foundry**: OpenAI models accessed through an Azure OpenAI / Microsoft Foundry deployment. - **Google Gemini**: Gemini models accessed through Google's OpenAI-compatible developer API. - **LiteLLM**: A self-hosted [LiteLLM](https://www.litellm.ai/) proxy that fronts one or more model backends. - **OpenAI Compatible**: Any endpoint that implements the OpenAI Chat Completions API, including self-hosted models and third-party proxies. Select a tile and then select **Continue** to move to the next step. ### Step 2: Enter Connection Details Provide the information Cribl needs to reach and authenticate with your provider. | Field | Required for | Description | |-------|-------------|-------------| | **ID** | All providers | A short, unique identifier for this provider (for example, `bedrock-prod`). | | **Description** | All providers (optional) | A human-readable label shown on the provider card (for example, `Anthropic Claude - us-east-1`). | | **Deployment URL** | Microsoft Foundry, OpenAI Compatible | The base HTTPS endpoint URL for your deployment. Do not include trailing slashes or path suffixes such as `/chat/completions`. | | **URL** | LiteLLM | The base URL of your LiteLLM proxy. Do not include trailing slashes or path suffixes such as `/chat/completions`. | | **AWS Region** | AWS Bedrock (optional) | The AWS Region to use for Bedrock requests (for example, `ap-southeast-2`). Cribl uses this Region for the connection test and for all AI requests to Bedrock, and uses it to pre-fill region-appropriate model IDs. If you leave it blank, Cribl uses the Cribl Workspace Region, or `us-west-2` when no default Region is set. Cribl rejects a value that is not a valid AWS Region. See [Anthropic via Amazon Bedrock](cribl-byoai-anthropic#connection-details). | | **API key** | AWS Bedrock, Microsoft Foundry, Google Gemini, OpenAI Compatible | The credential used to authenticate AI requests. Stored securely in the [Cribl secret store](/stream/manage-secrets-and-keys/) and never returned by the API or shown in the UI after you save. When [editing](#edit) an existing provider, leave this field blank to keep the stored key. Entering a new value replaces it. | | **Virtual key** | LiteLLM | The `LITELLM_MASTER_KEY` or a virtual key for your proxy. Stored securely in the [Cribl secret store](/stream/manage-secrets-and-keys/) and never returned by the API or shown in the UI after you save. When [editing](#edit) an existing provider, leave this field blank to keep the stored key. Entering a new value replaces it. | #### URL Requirements {#url-requirements} When you provide a **Deployment URL** or **URL**, Cribl validates the value before testing or saving the provider. The URL must: - Use the `http:` or `https:` scheme. Other protocols are rejected. - Not end with a trailing slash. - Not include the request-path segment that Cribl appends automatically, such as `/chat/completions`. Some provider types require a specific base-path suffix on the URL. For example, Microsoft Foundry requires the URL to end in `/openai/v1`. Bedrock and Gemini do not use a URL field: Bedrock reaches its own endpoint in the AWS Region you select, and Gemini reaches Google's default OpenAI-compatible endpoint. See the provider-specific configuration page for exact format requirements: - [Anthropic via Amazon Bedrock](cribl-byoai-anthropic) (no URL field) - [OpenAI via Microsoft Foundry](cribl-byoai-openai) - [Google Gemini](cribl-byoai-gemini) (no URL field) - [LiteLLM](cribl-byoai-litellm) - [OpenAI-compatible endpoints](cribl-byoai-openai-compatible) In Cribl.Cloud, Cribl applies additional validation to prevent custom providers from probing internal cloud infrastructure: - The hostname must not be `localhost`. - The hostname must not be a literal private IP address (for example, anything in `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) or a link-local address (for example, `169.254.0.0/16`). If validation fails, the wizard returns an error and the provider is not saved. On-prem deployments do not enforce these address restrictions, because the Leader Node typically reaches LLM endpoints over a private network. Select **Continue** to proceed to the model tier assignment step. ### Step 3: Assign Models to Tiers and Test Cribl routes AI requests to one of three model tiers based on the complexity of the task. In this step, assign specific model IDs to each tier for your chosen provider. | Tier | Purpose | |------|---------| | **Fast** | Lightweight tasks: KQL explanation, search result analysis, ruleset selection. | | **Balanced** | Multi-step agents: Git commit messages, Notebook summaries, Guard rule generation, KQL workflows. | | **Deep** | Extended-context tasks: local Cribl Search assistance, complex KQL scenarios. Supports multiple model IDs. The first model in the list serves as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. | **For Microsoft Foundry and Google Gemini**, the wizard pre-fills suggested models from a supported model registry. You can select different models from the drop-down, but selection is restricted to the models Cribl validates for that provider. **For AWS Bedrock**, the wizard pre-fills suggested models and lets you enter model IDs as text. Cribl accepts an ID when it starts with a geography prefix and the rest of the ID matches a supported Claude model. For example, `au.anthropic.claude-opus-4-8` is accepted because `anthropic.claude-opus-4-8` matches the supported model listed as `us.anthropic.claude-opus-4-8`. Cribl does not validate the prefix. If you select an **AWS Region** in [Step 2](#step-2-enter-connection-details), the suggested models use that Region's prefix. See [Required Model IDs](cribl-byoai-anthropic#required-models). **For LiteLLM and OpenAI Compatible**, there is no drop-down restriction. Enter the exact model IDs your endpoint accepts for each tier. Your endpoint must be able to handle every model ID you specify. For providers that support suggested defaults with a restricted drop-down (Microsoft Foundry and Google Gemini), select **Reset to Defaults** to restore the suggested model for every tier. See [Reset Model Tiers to Suggested Defaults](#reset). When all tiers are assigned, select **Test and Save**: - Cribl runs a connectivity check for each assigned model, sending a basic request through your configured endpoint to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - If every model passes, the configuration is saved automatically. - If any model fails, the results panel shows the outcome (for example, *2 of 3 connections failed*) and lists the failing models with their error messages. When more than a few models fail, select **Show more** to view the full list. The tier fields for failing models are flagged so you can correct them. - After correcting the configuration, select **Retry**. The modal remains open so you can adjust values without starting over. After you save: - The configuration is stored in the [Cribl secret store](/stream/manage-secrets-and-keys/). - A Custom AI provider card appears at the top of **AI Settings** showing the provider name, type, and the number of configured models. - Supported AI capabilities in that deployment begin using your custom provider for new requests. ### Reset Model Tiers to Suggested Defaults {#reset} For providers that offer suggested defaults with a restricted drop-down (Microsoft Foundry and Google Gemini), the model tier assignment step includes a **Reset to Defaults** button. Select it to restore every tier to the same models Cribl suggests for a newly added provider of that type. This is useful when [editing](#edit) a provider and you want to discard your custom tier choices and return to Cribl's recommendations. Note the following: - **Reset to Defaults** applies only to provider types that support suggestions. It does not appear for AWS Bedrock, where you enter model IDs as text, or for LiteLLM or OpenAI Compatible, which have no suggested defaults. - The button is disabled when your current tier selections already match the suggested defaults. - There is no separate confirmation. The **Test and Save** step serves as confirmation, so no changes take effect until you test and save. ## Edit an Existing Custom AI Provider {#edit} You can update a configured provider if any details change (for example, keys rotate or you want to switch models). 1. Open **Settings** > **AI Settings**. 2. Locate the **Custom AI provider** card at the top of the page. 3. Select the gear (⚙️) on the card, then select **Edit**. 4. In the wizard, navigate through the steps to update the relevant fields. 5. On the final step, select **Test and Save** to validate and apply the changes. > When you reopen the wizard, the **API Key** and **Virtual key** fields are blank. This is by design: Cribl never returns stored credentials to the UI or API after you save them. To keep using the existing key, leave the field blank and update any other fields as needed. To rotate the credential, enter a new value, which replaces the stored key on save. {.box .info} New AI requests use the updated configuration immediately after saving. ## Delete a Custom AI Provider {#delete} Deleting a custom AI provider removes the provider configuration. What happens next depends on your environment: - In commercial Cribl.Cloud and on-prem deployments, Cribl AI switches back to Cribl-managed models for all supported capabilities. - In [Cribl.Cloud Government](/fedramp/), there is no fallback to Cribl-managed models. Cribl AI feature entry points stay visible, but they become non-operational until you configure another Custom AI Provider. See [AI in Cribl.Cloud Government](/fedramp/differences#ai-in-cribl-cloud-government). 1. Open **Settings** > **AI Settings**. 2. Locate the **Custom AI provider** card at the top of the page. 3. Select the gear (⚙️) on the card, then select **Delete**. 4. Confirm the deletion in the dialog. After confirmation, the provider card is removed. Commercial and on-prem deployments begin using the default Cribl-managed models again. Cribl.Cloud Government deployments leave Cribl AI features non-operational until you add another provider. If you want to use your own LLM again later, repeat the [Add a Custom AI Provider](#add) steps. ## Audit AI Settings Changes {#audit} Cribl writes every change made on the **AI Settings** page to [`audit.log`](/stream/internal-logs#leader) on the Leader. In Cribl.Cloud, Organization Members who have the Admin Permission on [Cribl Search](/search/) can also review these events in the `cribl_internal_logs` Dataset. Cribl logs the following changes: - Adding, editing, or deleting a custom AI provider. - Changing the AI deployment mode or locking it. - Enabling or disabling an individual AI feature, such as **Web Search** or **MCP Integrations**. - Adding, removing, enabling, or disabling an MCP server. - Selecting the Cribl Guard [background detection](/guard/guard-background-detection/) model. Each entry records the time of the change, the `type` value `ai-settings`, the action, the user who made the change, and the request ID. > Cribl never writes credentials or provider configuration to the audit log. Provider entries record only the provider ID and name, and MCP server entries record only the server ID and the endpoint hostname. API keys, virtual keys, request paths, and query strings are excluded. {.box .info} If Cribl cannot write an audit entry, it logs an error and the configuration change still takes effect. An audit failure never blocks the change it describes. ## Troubleshoot Common Errors If there is a problem with your custom AI provider, you may see: - Model test failures in the **Test and Save** step. - Provider-specific errors surfaced in Cribl AI features. Typical issues include: - **Invalid or expired credentials** - Rotate or correct the API key, then retry. - **Wrong Deployment URL** - Ensure the endpoint is reachable and correctly formatted (no trailing path suffixes). See [URL Requirements](#url-requirements) for additional validation rules in Cribl.Cloud. - **Incorrect model ID** - Confirm each model ID exactly matches what your provider or proxy expects. - **Wrong AWS Region (AWS Bedrock)** - Confirm that the models and inference profiles you assigned are available, and that model access is enabled, in the selected **AWS Region**. - **Rate limits or quotas exceeded** - Check usage and raise limits or use a different deployment. If you cannot resolve the issue quickly, [delete](#delete) the custom provider. Commercial and on-prem deployments fall back to Cribl-managed models while you investigate. Cribl.Cloud Government deployments have no fallback. Deleting the provider makes Cribl AI features non-operational. ### When Your Custom Provider Is Unavailable {#provider-unavailable} If your configured LLM endpoint is unreachable, Cribl AI features that depend on the provider return an error rather than fall back to Cribl-managed models. Common causes include a network outage, an expired credential, or a provider-side incident. Expect the following behavior: - When you open **AI Settings**, Cribl automatically tests the configured provider. If the provider is unreachable, the page shows a connectivity alert in place of the provider card. Select **Try Again** on the alert to test the connection again after you resolve the issue. - In-product Cribl AI features surface an error message indicating that the AI request failed. The error includes the provider ID so you can identify which custom provider returned the failure. - Cribl does not automatically remove or disable a provider that is returning errors. - Cribl does not retry against its own managed models when a custom provider is configured. This preserves the data-residency and governance guarantees described in [Why Use Custom AI Providers?](cribl-byoai#why-use-custom-ai-providers). To restore the connection to your custom AI provider: 1. Confirm the provider is reachable from the Leader Node (for on-prem deployments) or from Cribl.Cloud (for cloud deployments). 2. Open **AI Settings**, select the gear (⚙️) on the provider card, then select **Edit**. 3. Run **Test and Save** to validate the connection. If the test still fails, correct the failing field (URL, API key, model ID) and retest. 4. If you need AI features immediately and cannot restore the provider, [delete](#delete) the custom provider. In commercial Cribl.Cloud and on-prem deployments, Cribl AI then routes requests to Cribl-managed models until you reconfigure your custom provider. In Cribl.Cloud Government, deleting the provider makes Cribl AI features non-operational. Configure another Custom AI Provider to restore them. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-anthropic.md ############################################################ # Configure Anthropic via Amazon Bedrock for Cribl AI Use this topic to connect [Anthropic Claude models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-claude.html) via Amazon Bedrock as a Bring Your Own Model (BYOM) for Cribl AI. This page covers: - What you need from the Anthropic via Amazon Bedrock side. - How to fill in each step of the Cribl configuration wizard. For the generic wizard flow, prerequisites, and how to edit or delete a configured provider, see [Configure Custom AI Providers](cribl-byoai-config). ## Prerequisites In addition to the general [prerequisites](cribl-byoai-config#prereqs), you need: - An AWS account with **Amazon Bedrock** enabled in at least one Region. - Access to the specific **Anthropic Claude** models that Cribl requires (see [Required Model IDs](#required-models) below). - An **API key** that your Organization exposes for Anthropic via Bedrock access (often via an internal API gateway or proxy). - **On-prem only:** Network connectivity from the **Leader** to the endpoint your Organization uses for Anthropic via Bedrock (public internet, VPC endpoint, or corporate proxy). ### Required Model IDs {#required-models} Cribl AI agents use one model per tier. The wizard pre-fills suggested defaults and accepts only supported models. The model IDs in the following tables use the `us.` inference profile prefix. To use another geography, see [Use Region-Prefixed Model IDs](#regional-model-ids). **Suggested defaults:** | Tier | Model | Bedrock Model ID | |------|-------|-----------------| | Fast | Claude Haiku 4.5 | `us.anthropic.claude-haiku-4-5-20251001-v1:0` | | Balanced | Claude Sonnet 4.6 | `us.anthropic.claude-sonnet-4-6` | | Deep | Claude Opus 4.8 | `us.anthropic.claude-opus-4-8` | **All supported models:** | Model | Bedrock Model ID | Available Tiers | |-------|-----------------|-----------------| | Claude 3 Haiku | `us.anthropic.claude-3-haiku-20240307-v1:0` | Fast | | Claude 3.5 Haiku | `us.anthropic.claude-3-5-haiku-20241022-v1:0` | Fast | | Claude Haiku 4.5 | `us.anthropic.claude-haiku-4-5-20251001-v1:0` | Fast, Balanced | | Claude Sonnet 4 | `us.anthropic.claude-sonnet-4-20250514-v1:0` | Fast, Balanced, Deep | | Claude Sonnet 4.5 | `us.anthropic.claude-sonnet-4-5-20250929-v1:0` | Fast, Balanced, Deep | | Claude Sonnet 4.6 | `us.anthropic.claude-sonnet-4-6` | Balanced, Deep | | Claude Opus 4.1 | `us.anthropic.claude-opus-4-1-20250805-v1:0` | Balanced, Deep | | Claude Opus 4.5 | `us.anthropic.claude-opus-4-5-20251101-v1:0` | Balanced, Deep | | Claude Opus 4.6 | `us.anthropic.claude-opus-4-6-v1` | Deep | | Claude Opus 4.7 | `us.anthropic.claude-opus-4-7` | Deep | | Claude Opus 4.8 | `us.anthropic.claude-opus-4-8` | Deep | > Assign each model to a tier listed in **Available Tiers**. For example, assign Claude Opus 4.8 only to the Deep tier. Filling a tier with an inappropriate model can degrade the performance and accuracy of Cribl AI features. {.box .info} Make sure each model you assign is enabled in your AWS Bedrock account under **Model access** before saving. If you need to serve multiple tiers from a smaller set of deployments, you have two options: - **Proxy remapping**: Use a proxy (such as LiteLLM) to map incoming model names to available models. - **API gateway aliasing**: Configure your API gateway to translate model IDs before forwarding to your Bedrock deployment. For details on model categories and token limits, see [Model IDs and Feature Routing](cribl-byoai#modelid). ### Use Region-Prefixed Model IDs {#regional-model-ids} The first segment of a Bedrock model ID, such as `us` in `us.anthropic.claude-opus-4-8`, is the geography of the [cross-Region inference profile](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html). You can enter any supported model with a different geographic prefix. For example, enter `au.anthropic.claude-opus-4-8` instead of `us.anthropic.claude-opus-4-8` to use the model's Australia cross-Region inference profile. Cribl matches the rest of the ID against the supported models in the preceding tables, so a regional ID is valid when its model is supported, regardless of prefix. Note the following: - The ID must start with a geography prefix. An ID such as `anthropic.claude-opus-4-8`, with no prefix, is rejected. - This applies only to AWS Bedrock. Microsoft Foundry and Google Gemini require exact model IDs. - Cribl does not check which inference profiles AWS offers in your Region. Confirm in the AWS Bedrock console that each profile exists and that model access is enabled for it. - Cribl does not fail over to another Region or inference profile if a request fails. - A regional ID uses the same token limit as the equivalent supported model. See [Token Limits](cribl-byoai#token-limits). When you select an **AWS Region** in [Step 2](#connection-details), the wizard pre-fills the suggested defaults with the prefix for that Region: | AWS Region | Prefix | |------------|--------| | `ap-southeast-2`, `ap-southeast-4`, `ap-southeast-6` | `au` | | `ap-northeast-1`, `ap-northeast-3` | `jp` | | Regions starting with `us-` (except `us-gov-`) or `ca-` | `us` | | Regions starting with `eu-` | `eu` | | Regions starting with `us-gov-` | `us-gov` | | All other Regions | `global` | The wizard changes only the suggested defaults. IDs that you enter yourself are never rewritten. The wizard pre-fills the defaults only when you add a provider. When you edit a provider, your saved model IDs remain unchanged. ## Step 1: Select the Provider Type Navigate to your [AI Settings](cribl-byoai-config#ai) and open the configuration wizard: 1. Select **Use Custom AI Provider**. 2. Select the **AWS Bedrock** tile. This provider is selected by default. 3. Select **Continue**. ## Step 2: Enter Connection Details {#connection-details} Provide the credentials Cribl needs to reach your Bedrock deployment. - **ID**: Enter a short, unique identifier (for example, `anthropic-bedrock-prod`). Avoid putting secrets or keys in this field. - **Description**: Enter a human-readable label for the provider card (for example, `Anthropic Claude via Amazon Bedrock - us-east-1`). This field is optional. - **API Key**: Paste the API key or bearer token provided by your AWS team. - **AWS Region** (optional): Select the AWS Region to use for Bedrock requests (for example, `ap-southeast-2`). The models and inference profiles that you assign must be available in this Region. Cribl uses this Region for the connection test in Step 3 and for all AI requests to Bedrock. The selected Region also determines the prefix of the [suggested model IDs](#regional-model-ids). If you leave it blank, Cribl uses the Cribl Workspace Region, or `us-west-2` when no default Region is set. Cribl rejects a value that is not a valid AWS Region when you save. Depending on your environment setup, this key is one of the following: - **Amazon Bedrock API key**: A native AWS bearer token. This is the modern, streamlined way to access Bedrock without managing IAM users. - **Gateway/proxy key**: A custom token generated by an internal API gateway (such as a Mulesoft or Apigee layer) that fronts your AWS environment. If you are unsure which key to use, ask the team that manages AI providers and Bedrock access to issue or confirm the correct key for your deployment. When editing an existing provider, leave the **API Key** field blank to keep the stored key, or enter a new value to replace it. See [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). Select **Continue**. ## Step 3: Assign Models to Tiers and Test Assign models to each tier. For AWS Bedrock, the wizard pre-fills the following defaults: **Claude Haiku 4.5** (Fast), **Claude Sonnet 4.6** (Balanced), **Claude Opus 4.8** (Deep). If you selected an **AWS Region** in [Step 2](#connection-details), the pre-filled IDs use that Region's [prefix](#regional-model-ids). Enter model IDs as text. For the full list of supported models, see [Required Model IDs](#required-models). > The **Deep** tier supports multiple model IDs, with the first model in the list serving as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. {.box .info} 1. For **Fast** and **Balanced**, accept the pre-filled default or enter a different supported model ID. 1. For **Deep**, accept the pre-filled default or add additional model IDs. 1. Select **Test and Save**. Cribl runs a connectivity check for each assigned model, sending a basic request through your configured endpoint to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - A results panel shows how many models passed and failed. - If any test fails, verify that the API key is valid, that the **AWS Region** is correct, and that the corresponding Claude models are enabled and accessible in your Bedrock account in that Region. Select **Retry** to test again. - When all models pass, the configuration is saved automatically. After you save: - A **Custom AI provider** card appears at the top of **AI Settings**, showing your ID, description, **Anthropic via Amazon Bedrock** as the provider type, and the number of configured models. - [Supported Cribl AI capabilities](cribl-byoai#aifeatures) in that Workspace begin using Anthropic via Bedrock as their AI backend. ## Verify Cribl AI Behavior To confirm that Anthropic via Bedrock is correctly configured: 1. In **AI Settings**, confirm that the **Custom AI provider** card lists **Anthropic via Amazon Bedrock**. 2. Use a [Cribl AI capability](cribl-byoai#aifeatures) that supports custom providers (for example, the **KQL assistant** or **Git commit message suggestions**). 3. Verify that: - Requests succeed without provider-related errors. - Latency and behavior align with your expectations for the Anthropic models and Regions you use. If you see failures or unexpected behavior: - Select the gear (⚙️) on the provider card and select **Edit** to reopen the wizard, then use **Test and Save** to review error details. - Confirm with your AWS/AI team that: - The key is valid and not rate-limited. - The Anthropic Claude models you assigned are enabled and accessible in the intended Region(s). - For on-prem deployments: Network rules allow the Leader to reach the Anthropic/Bedrock gateway or endpoint. ## Change or Stop Using Anthropic via Bedrock - To update the provider (for example, after a key rotation or model change), see [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). - To stop using Anthropic via Bedrock, see [Delete a Custom AI Provider](cribl-byoai-config#delete). - To use this provider again after deletion, follow the steps in this topic to reopen the wizard and reconfigure. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-openai.md ############################################################ # Configure OpenAI via Microsoft Foundry for Cribl AI Use this topic to connect [OpenAI models via Microsoft Foundry](https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/working-with-models?tabs=powershell) as a Bring Your Own Model (BYOM) for Cribl AI. This page covers: - What you need from the Microsoft Foundry/OpenAI side. - How to fill in each step of the Cribl configuration wizard. For the generic wizard flow, prerequisites, and how to edit or delete a configured provider, see [Configure Custom AI Providers](cribl-byoai-config). ## Prerequisites In addition to the general [prerequisites](cribl-byoai-config#prereqs), you need: - A Microsoft Foundry/OpenAI deployment that your Organization manages. - Deployed OpenAI models that can accept the model IDs Cribl sends (see [Required Model IDs](#required-models) below). - A **Deployment URL** for that OpenAI deployment (for example, an HTTPS endpoint exposed by Foundry or your internal gateway). - An **API key** that your Organization exposes for OpenAI via Microsoft Foundry access (often via an internal API gateway or service). - **On-prem only:** Network connectivity from the **Leader** to the endpoint your Organization uses for OpenAI via Microsoft Foundry (public endpoint, private link, or corporate proxy). ### Required Model IDs {#required-models} Cribl AI agents use one model per tier. The wizard pre-fills suggested defaults and restricts selection to supported models. **Suggested defaults:** | Tier | Model | Model ID | |------|-------|----------| | Fast | GPT-5.6 Luna | `gpt-5.6-luna` | | Balanced | GPT-5.6 Sol | `gpt-5.6-sol` | | Deep | GPT-5.6 Terra | `gpt-5.6-terra` | **All supported models (available in the wizard drop-down):** | Model | Model ID | Available Tiers | |-------|----------|-----------------| | GPT-4.1 Nano | `gpt-4.1-nano` | Fast | | GPT-4.1 Mini | `gpt-4.1-mini` | Fast, Balanced | | GPT-4.1 | `gpt-4.1` | Fast, Balanced, Deep | | GPT-4o | `gpt-4o` | Fast, Balanced | | GPT-5 Nano | `gpt-5-nano` | Fast | | GPT-5 Mini | `gpt-5-mini` | Fast, Balanced | | GPT-5 | `gpt-5` | Balanced, Deep | | GPT-5 Pro | `gpt-5-pro` | Balanced, Deep | | GPT-5.1 | `gpt-5.1` | Balanced, Deep | | GPT-5.2 | `gpt-5.2` | Deep | | GPT-5.4 Nano | `gpt-5.4-nano` | Fast | | GPT-5.4 Mini | `gpt-5.4-mini` | Fast, Balanced | | GPT-5.4 | `gpt-5.4` | Balanced, Deep | | GPT-5.4 Pro | `gpt-5.4-pro` | Balanced, Deep | | GPT-5.5 | `gpt-5.5` | Deep | | GPT-5.6 Luna | `gpt-5.6-luna` | Fast | | GPT-5.6 Terra | `gpt-5.6-terra` | Fast, Balanced, Deep | | GPT-5.6 Sol | `gpt-5.6-sol` | Balanced, Deep | | o3-mini | `o3-mini` | Fast, Balanced | | o3 | `o3` | Deep | | o3-pro | `o3-pro` | Deep | | o4-mini | `o4-mini` | Balanced, Deep | > The wizard drop-down for each tier only shows models that are eligible for that tier. For example, GPT-5.5 appears only in the Deep drop-down. {.box .info} Make sure each model you assign is deployed in your Microsoft Foundry environment and reachable through your **Deployment URL** before saving. If you need to serve multiple Cribl model IDs from a smaller set of deployments, you have two options: - **Proxy remapping**: Use a proxy (such as LiteLLM) to map incoming model names to your available deployments. - **API gateway aliasing**: Configure your API gateway to translate model IDs before forwarding to your backend. For details on model categories and token limits, see [Model IDs and Feature Routing](cribl-byoai#modelid). ## Step 1: Select the Provider Type Navigate to your [AI Settings](cribl-byoai-config#ai) and open the configuration wizard: 1. Select **Use Custom AI Provider**. 2. Select the **Microsoft Foundry** tile. Selecting the tile advances automatically to step 2. 3. Select **Continue** if the wizard does not advance automatically. ## Step 2: Enter Connection Details Provide the credentials Cribl needs to reach your Foundry deployment. - **ID**: Enter a short, unique identifier (for example, `openai-foundry-prod`). Avoid putting secrets or keys in this field. - **Description**: Enter a human-readable label for the provider card (for example, `OpenAI via Microsoft Foundry - production`). This field is optional. - **Deployment URL**: Enter the base HTTPS endpoint URL for your Microsoft Foundry deployment. The URL **must end in `/openai/v1`**. For example: `https://.openai.azure.com/openai/v1` > **v1 API required.** Cribl BYOM for OpenAI via Microsoft Foundry uses the [Microsoft Foundry v1 OpenAI-compatible API](https://learn.microsoft.com/en-us/azure/foundry/openai/api-version-lifecycle) at the `/openai/v1` endpoint path. The pre-v1 Azure OpenAI API (the one that requires an `api-version` query parameter) is not supported, because Microsoft has deprecated it. Before saving the configuration, make sure that: > > - Your Microsoft Foundry deployment has the v1 API enabled. > - The Deployment URL you enter in the modal ends with `/openai/v1`. > > For background on the available Foundry endpoints, see [Endpoints for Microsoft Foundry Models](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/concepts/endpoints). {.box .warning} > Include the `https://` prefix and the `/openai/v1` path. Do not append additional path suffixes such as `/chat/completions` after `/openai/v1`. Cribl appends those automatically. {.box .info} - **API Key**: Paste the API key or bearer token provided by your platform team. Depending on your environment setup, this key is one of the following: - If you are using Azure OpenAI Service directly, this is the key found on the **Keys and Endpoint** tab in the Azure Portal. - If using a gateway, use the token generated by your internal API management layer. If you are unsure which key to use, ask the team that manages AI providers and Microsoft Foundry access to issue or confirm the correct key for your deployment. When editing an existing provider, leave the **API Key** field blank to keep the stored key, or enter a new value to replace it. See [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). Select **Continue**. ## Step 3: Assign Models to Tiers and Test Assign models to each tier. For Microsoft Foundry, the wizard presents a drop-down of supported model IDs with the [suggested defaults](#required-models) pre-filled. > The **Deep** tier supports multiple model IDs, with the first model in the list serving as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. {.box .info} 1. For **Fast** and **Balanced**, select a model from the drop-down or accept the suggested default. 1. For **Deep**, accept the suggested default or add additional model IDs. 1. Select **Test and Save**. Cribl runs a connectivity check for each assigned model, sending a basic request through your configured endpoint to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - A results panel shows how many models passed and failed. - If any test fails, verify that the Deployment URL is correct, the API key is valid and active, and the listed model IDs are deployed and accessible. Select **Retry** to test again. - When all models pass, the configuration is saved automatically. After you save: - A **Custom AI provider** card appears at the top of **AI Settings**, showing your ID, description, **OpenAI via Microsoft Foundry** as the provider type, and the number of configured models. - [Supported Cribl AI capabilities](cribl-byoai#aifeatures) in that Workspace begin using OpenAI via Microsoft Foundry as their AI backend. ## Verify Cribl AI Behavior To confirm that OpenAI via Microsoft Foundry is correctly configured: 1. In **AI Settings**, confirm that the **Custom AI provider** card lists **OpenAI via Microsoft Foundry**. 2. Use a [supported Cribl AI capability](cribl-byoai#aifeatures) (for example, the **KQL assistant** or **Git commit message suggestions**). 3. Verify that: - Requests succeed without provider-related errors. - Latency and behavior align with your expectations for the OpenAI models and deployment you configured. If you see failures or unexpected behavior: - Select the gear (⚙️) on the provider card and select **Edit** to reopen the wizard, then use **Test and Save** to review error details. - Confirm with your platform/AI team that: - The endpoint URL and key are valid and not rate-limited. - Your OpenAI deployments are enabled and accessible behind the Foundry or gateway endpoint. - For on-prem deployments: Network rules allow the Leader to reach the Foundry or gateway endpoint. ## Change or Stop Using OpenAI via Microsoft Foundry - To update the provider (for example, after a key rotation or endpoint change), see [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). - To stop using OpenAI via Microsoft Foundry, see [Delete a Custom AI Provider](cribl-byoai-config#delete). - To use this provider again after deletion, follow the steps in this topic to reopen the wizard and reconfigure. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-gemini.md ############################################################ # Configure Google Gemini for Cribl AI Use this topic to connect [Google Gemini models](https://ai.google.dev/gemini-api/docs/models) as a Bring Your Own Model (BYOM) for Cribl AI. This page covers: - What you need from the Google Gemini side. - How to fill in each step of the Cribl configuration wizard. For the generic wizard flow, prerequisites, and how to edit or delete a configured provider, see [Configure Custom AI Providers](cribl-byoai-config). > Cribl reaches Gemini through Google's [OpenAI-compatible endpoint](https://ai.google.dev/gemini-api/docs/openai). You do not enter an endpoint URL in the wizard: Cribl uses `https://generativelanguage.googleapis.com/v1beta/openai/` by default. {.box .info} ## Prerequisites In addition to the general [prerequisites](cribl-byoai-config#prereqs), you need: - A Google account with access to the [Gemini API](https://ai.google.dev/gemini-api/docs). - A Gemini **API key** with permission to call the model IDs Cribl sends (see [Required Model IDs](#required-models)). - **On-prem only:** Network connectivity from the Leader to `https://generativelanguage.googleapis.com` (public internet or corporate proxy). ### Required Model IDs {#required-models} Cribl AI agents use one model per tier. The wizard pre-fills suggested defaults and restricts selection to supported models. **Suggested defaults:** | Tier | Model | Model ID | |------|-------|----------| | Fast | Gemini 3.5 Flash-Lite | `gemini-3.5-flash-lite` | | Balanced | Gemini 3.6 Flash | `gemini-3.6-flash` | | Deep | Gemini 3.1 Pro (Preview) | `gemini-3.1-pro-preview` | **All supported models (available in the wizard drop-down):** | Model | Model ID | Available Tiers | |-------|----------|-----------------| | Gemini 3.1 Pro (Preview) | `gemini-3.1-pro-preview` | Balanced, Deep | | Gemini 3.6 Flash | `gemini-3.6-flash` | Fast, Balanced | | Gemini 3.5 Flash | `gemini-3.5-flash` | Fast, Balanced | | Gemini 3 Flash (Preview) | `gemini-3-flash-preview` | Fast, Balanced | | Gemini 3.5 Flash-Lite | `gemini-3.5-flash-lite` | Fast | | Gemini 3.1 Flash-Lite | `gemini-3.1-flash-lite` | Fast | | Gemini 2.5 Pro | `gemini-2.5-pro` | Balanced, Deep | | Gemini 2.5 Flash | `gemini-2.5-flash` | Fast, Balanced | | Gemini 2.5 Flash-Lite | `gemini-2.5-flash-lite` | Fast | > The wizard drop-down for each tier shows only models that are eligible for that tier. For example, Gemini 3.5 Flash-Lite appears only in the Fast drop-down. {.box .info} Make sure the API key you provide can call each model you assign before saving. For details on model categories and token limits, see [Model IDs and Feature Routing](cribl-byoai#modelid). ## Step 1: Select the Provider Type Navigate to your [AI Settings](cribl-byoai-config#ai) and open the configuration wizard: 1. Select **Use Custom AI Provider**. 2. Select the **Google Gemini** tile. 3. Select **Continue**. ## Step 2: Enter Connection Details Provide the credentials Cribl needs to reach Gemini. Gemini does not use a URL field: Cribl reaches Google's OpenAI-compatible endpoint automatically. - **ID**: Enter a short, unique identifier (for example, `google-gemini-prod`). Avoid putting secrets or keys in this field. - **Description**: Enter a human-readable label for the provider card (for example, `Google Gemini - production`). This field is optional. - **API key**: Paste your Gemini API key. If you are unsure which key to use, ask the team that manages AI providers and Gemini access to issue or confirm the correct key for your deployment. When editing an existing provider, leave the **API key** field blank to keep the stored key, or enter a new value to replace it. See [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). Select **Continue**. ## Step 3: Assign Models to Tiers and Test Assign models to each tier. For Google Gemini, the wizard presents a drop-down of supported model IDs with the [suggested defaults](#required-models) pre-filled. > The **Deep** tier supports multiple model IDs, with the first model in the list serving as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. {.box .info} 1. For **Fast** and **Balanced**, select a model from the drop-down or accept the suggested default. 2. For **Deep**, accept the suggested default or add additional model IDs. 3. To restore the suggested defaults for all tiers, select **Reset to Defaults**. See [Reset Model Tiers to Suggested Defaults](cribl-byoai-config#reset). 4. Select **Test and Save**. Cribl runs a connectivity check for each assigned model, sending a basic request through Google's OpenAI-compatible endpoint to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - A results panel shows how many models passed and failed. - If any test fails, verify that the API key is valid and that the listed model IDs are available for your key. Select **Retry** to test again. - When all models pass, the configuration is saved automatically. After you save: - A **Custom AI provider** card appears at the top of **AI Settings**, showing your ID, description, **Google Gemini** as the provider type, and the number of configured models. - [Supported Cribl AI capabilities](cribl-byoai#aifeatures) in that Workspace begin using Google Gemini as their AI backend. ## Verify Cribl AI Behavior To confirm that Google Gemini is correctly configured: 1. In **AI Settings**, confirm that the **Custom AI provider** card lists **Google Gemini**. 2. Use a [supported Cribl AI capability](cribl-byoai#aifeatures) (for example, the **KQL assistant** or **Git commit message suggestions**). 3. Verify that: - Requests succeed without provider-related errors. - Latency and behavior align with your expectations for the Gemini models you configured. If you see failures or unexpected behavior: - Select the gear icon (⚙️) on the provider card and select **Edit** to reopen the wizard, then use **Test and Save** to review error details. - Confirm with your AI team that: - The key is valid and not rate-limited. - The Gemini models you assigned are available for your key. - For on-prem deployments: Network rules allow the Leader to reach `https://generativelanguage.googleapis.com`. ## Change or Stop Using Google Gemini - To update the provider (for example, after a key rotation or model change), see [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). - To stop using Google Gemini, see [Delete a Custom AI Provider](cribl-byoai-config#delete). - To use this provider again after deletion, follow the steps in this topic to reopen the wizard and reconfigure. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-litellm.md ############################################################ # Configure LiteLLM for Cribl AI Use this topic to connect a self-hosted [LiteLLM](https://www.litellm.ai/) proxy as a Bring Your Own Model (BYOM) provider for Cribl AI. LiteLLM is an open-source proxy that normalizes requests across hundreds of LLM backends (OpenAI, Anthropic, Bedrock, Ollama, and others) using a single OpenAI-compatible API. This page covers: - What you need from the LiteLLM side. - How to fill in each step of the Cribl configuration wizard. For the generic wizard flow, prerequisites, and how to edit or delete a configured provider, see [Configure Custom AI Providers](cribl-byoai-config). ## Prerequisites In addition to the general [prerequisites](cribl-byoai-config#prereqs), you need: - A running LiteLLM proxy instance reachable from your Cribl deployment. - A **Deployment URL** for the proxy (for example, `https://litellm.internal.example.com`). In Cribl.Cloud, this URL cannot resolve to `localhost`, a private IP address, or a link-local address. See [URL Requirements](cribl-byoai-config#url-requirements). - An **API key** configured on your LiteLLM proxy for authentication (`LITELLM_MASTER_KEY` or a virtual key). - Model names configured on the proxy that you will assign to the Fast, Balanced, and Deep tiers. - **On-prem only:** Network connectivity from the **Leader** to your LiteLLM proxy endpoint. ### Model IDs {#models} Unlike Bedrock and Foundry, Cribl does not maintain a supported model list for LiteLLM. You supply the model IDs yourself in the wizard, and they must match what your LiteLLM proxy exposes. LiteLLM uses a `model` field in each request. The model IDs you enter in the wizard are passed directly to the proxy. Common patterns include: - A native provider path: `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0` - An alias defined in `config.yaml`: `my-sonnet`, `my-haiku` - An OpenAI-style name: `gpt-4o` Make sure that each model ID you assign is listed in your LiteLLM `config.yaml` or is otherwise reachable through the proxy. Requests sent to an undefined model will fail. For details on what each tier is used for, see [Model IDs and Feature Routing](cribl-byoai#modelid). ## Step 1: Select the Provider Type Navigate to your [AI Settings](cribl-byoai-config#ai) and open the configuration wizard: 1. Select **Use Custom AI Provider**. 2. Select the **liteLLM** tile. 3. Select **Continue**. ## Step 2: Enter Connection Details Provide the credentials Cribl needs to reach your LiteLLM proxy. - **ID**: Enter a short, unique identifier (for example, `litellm-prod`). Avoid putting secrets or keys in this field. - **Description**: Enter a human-readable label for the provider card (for example, `LiteLLM - production proxy`). This field is optional. - **URL**: Enter the base URL of your LiteLLM proxy. > Include the `https://` prefix. Do not include trailing slashes or path suffixes such as `/chat/completions`. Cribl appends these automatically. {.box .info} > In Cribl.Cloud, Cribl validates this URL before it tests or saves the provider. The hostname cannot be `localhost`, a literal private IP address (for example, anything in `10.0.0.0/8`, `172.16.0.0/12`, or `192.168.0.0/16`), or a link-local address (for example, `169.254.0.0/16`). If you self-host your LiteLLM proxy on a private network, expose it through a hostname or address that Cribl.Cloud can reach. On-prem deployments do not enforce these restrictions. For details, see [URL Requirements](cribl-byoai-config#url-requirements). {.box .cloud} - **Virtual key**: Enter the `LITELLM_MASTER_KEY` or a virtual key with access to the models you plan to assign. When editing an existing provider, leave the **Virtual key** field blank to keep the stored key, or enter a new value to replace it. See [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). Select **Continue**. ## Step 3: Assign Models to Tiers and Test Assign one model ID to each tier. For LiteLLM, the wizard does not restrict or suggest models. You enter any model ID your proxy accepts. 1. For the **Fast** tier, enter the model ID to use for lightweight tasks (for example, `gpt-4o-mini` or an alias defined in your proxy config). 2. For the **Balanced** tier, enter the model ID to use for multi-step agent tasks. 3. For the **Deep** tier, enter one or more model IDs for extended-context tasks. The first model in the list serves as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. 4. Select **Test and Save**. Cribl runs a connectivity check for each assigned model, sending a basic request through your configured proxy to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - A results panel shows how many models passed and failed. - If any test fails, verify that: - The **Deployment URL** points to your running LiteLLM proxy and is reachable from the Cribl Leader. - The **API Key** is valid and authorized for the models you assigned. - Each model ID is defined and reachable in your LiteLLM `config.yaml`. - Select **Retry** to test again after making corrections. - When all models pass, the configuration is saved automatically. After you save: - A **Custom AI provider** card appears at the top of **AI Settings**, showing your ID, description, **LiteLLM** as the provider type, and the number of configured models. - [Supported Cribl AI capabilities](cribl-byoai#aifeatures) in that Workspace begin routing through your LiteLLM proxy. ## Verify Cribl AI Behavior To confirm that your LiteLLM provider is correctly configured: 1. In **AI Settings**, confirm that the **Custom AI provider** card lists **LiteLLM**. 2. Use a [supported Cribl AI capability](cribl-byoai#aifeatures) (for example, the **KQL assistant** or **Git commit message suggestions**). 3. Verify that: - Requests succeed without provider-related errors. - Latency and behavior align with your expectations for the models your proxy serves. If you see failures or unexpected behavior: - Check the LiteLLM proxy logs for errors related to the model IDs or authentication. - Select the gear (⚙️) on the provider card and select **Edit** to reopen the wizard, then use **Test and Save** to review error details. - Confirm that the Cribl Leader has uninterrupted network access to the proxy endpoint. ## Change or Stop Using LiteLLM - To update the provider (for example, after a key rotation or URL change), see [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). - To stop using LiteLLM, see [Delete a Custom AI Provider](cribl-byoai-config#delete). - To use this provider again after deletion, follow the steps in this topic to reopen the wizard and reconfigure. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-byoai-openai-compatible.md ############################################################ # Configure an OpenAI-Compatible Endpoint for Cribl AI Use this topic to connect any endpoint that implements the [OpenAI Chat Completions API](https://developers.openai.com/api/reference/chat-completions/overview) as a Bring Your Own Model (BYOM) provider for Cribl AI. This provider type covers self-hosted inference servers (such as vLLM, Ollama with an OpenAI adapter, or FastChat), third-party API gateways, and direct access to the OpenAI API. This page covers: - What you need from your endpoint. - How to fill in each step of the Cribl configuration wizard. For the generic wizard flow, prerequisites, and how to edit or delete a configured provider, see [Configure Custom AI Providers](cribl-byoai-config). ## Prerequisites In addition to the general [prerequisites](cribl-byoai-config#prereqs), you need: - A running endpoint that accepts `POST /chat/completions` requests in OpenAI format. - A **Deployment URL** for the endpoint (for example, `https://vllm.internal.example.com`). In Cribl.Cloud, this URL cannot resolve to `localhost`, a private IP address, or a link-local address. See [URL Requirements](cribl-byoai-config#url-requirements). - An **API key** or bearer token for authentication. - The specific model IDs exposed by your endpoint that you plan to assign to the Fast, Balanced, and Deep tiers. - **On-prem only:** Network connectivity from the **Leader** to your endpoint. ### Model IDs {#models} Cribl does not maintain a supported model list for OpenAI-compatible endpoints. You supply the model IDs yourself in the wizard, and they must match what your endpoint expects in the `model` field of Chat Completions requests. Examples of valid model IDs depending on your backend: - A Hugging Face model name: `meta-llama/Llama-3-8B-Instruct` - An internally assigned alias: `fast-model`, `balanced-model` - An OpenAI model name (if using the OpenAI API directly): `gpt-4o`, `o4-mini` Make sure each model ID you assign is available on your endpoint before testing. Requests sent to an unavailable model will fail. For details on what each tier is used for, see [Model IDs and Feature Routing](cribl-byoai#modelid). ## Step 1: Select the Provider Type Navigate to your [AI Settings](cribl-byoai-config#ai) and open the configuration wizard: 1. Select **Use Custom AI Provider**. 2. Select the **OpenAI Compatible** tile. 3. Select **Continue**. ## Step 2: Enter Connection Details Provide the credentials Cribl needs to reach your endpoint. - **ID**: Enter a short, unique identifier (for example, `vllm-prod`). Avoid putting secrets or keys in this field. - **Description**: Enter a human-readable label for the provider card (for example, `vLLM cluster - production`). This field is optional. - **Deployment URL**: Enter the base URL of your OpenAI-compatible endpoint. > Include the `https://` prefix. Do not include trailing slashes or path suffixes such as `/chat/completions`. Cribl appends these automatically. {.box .info} > In Cribl.Cloud, Cribl validates this URL before it tests or saves the provider. The hostname cannot be `localhost`, a literal private IP address (for example, anything in `10.0.0.0/8`, `172.16.0.0/12`, or `192.168.0.0/16`), or a link-local address (for example, `169.254.0.0/16`). If you self-host this endpoint on a private network, expose it through a hostname or address that Cribl.Cloud can reach. On-prem deployments do not enforce these restrictions. For details, see [URL Requirements](cribl-byoai-config#url-requirements). {.box .cloud} - **API Key**: Enter the API key or bearer token required by your endpoint. If your endpoint does not enforce authentication, enter a placeholder value such as `none`. When editing an existing provider, leave the **API Key** field blank to keep the stored key, or enter a new value to replace it. See [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). Select **Continue**. ## Step 3: Assign Models to Tiers and Test Assign one model ID to each tier. For OpenAI-compatible endpoints, the wizard does not restrict or suggest models. You enter any model ID your endpoint accepts. 1. For the **Fast** tier, enter the model ID to use for lightweight tasks. 2. For the **Balanced** tier, enter the model ID to use for multi-step agent tasks. 3. For the **Deep** tier, enter one or more model IDs for extended-context tasks. The first model in the list serves as the system default. While most features exclusively use this first model, [Cribl Search investigations](/search/investigate/) allow you to switch between any listed models via a drop-down menu. 4. Select **Test and Save**. Cribl runs a connectivity check for each assigned model, sending a basic request through your configured endpoint to confirm that the model is reachable and responds. This does not test model performance or feature compatibility. - A results panel shows how many models passed and failed. - If any test fails, verify that: - The **Deployment URL** points to your running server and is reachable from the Cribl Leader. - The **API Key** is valid and authorized. - Each model ID is available on your endpoint. - Select **Retry** to test again after making corrections. - When all models pass, the configuration is saved automatically. After you save: - A **Custom AI provider** card appears at the top of **AI Settings**, showing your ID, description, **OpenAI-compatible** as the provider type, and the number of configured models. - [Supported Cribl AI capabilities](cribl-byoai#aifeatures) in that Workspace begin routing through your endpoint. ## Verify Cribl AI Behavior To confirm that your OpenAI-compatible provider is correctly configured: 1. In **AI Settings**, confirm that the **Custom AI provider** card lists **OpenAI-compatible**. 2. Use a [supported Cribl AI capability](cribl-byoai#aifeatures) (for example, the **KQL assistant** or **Git commit message suggestions**). 3. Verify that: - Requests succeed without provider-related errors. - Latency and behavior align with your expectations for the models your endpoint serves. If you see failures or unexpected behavior: - Check your endpoint server logs for errors related to the model IDs or authentication. - Select the gear (⚙️) on the provider card and select **Edit** to reopen the wizard, then use **Test and Save** to review error details. - Confirm that the Cribl Leader has uninterrupted network access to the endpoint. ## Change or Stop Using an OpenAI-Compatible Provider - To update the provider (for example, after a key rotation or URL change), see [Edit an Existing Custom AI Provider](cribl-byoai-config#edit). - To stop using this provider, see [Delete a Custom AI Provider](cribl-byoai-config#delete). - To use this provider again after deletion, follow the steps in this topic to reopen the wizard and reconfigure. ############################################################ # SOURCE: https://docs.cribl.io/copilot/cribl-mcp-server.md ############################################################ # Work with the Cribl MCP Server Learn how to configure and use the Cribl [MCP](https://modelcontextprotocol.io/docs/getting-started/intro) server. The MCP server is an AI-native way to interact with your Cribl environment (Cribl.Cloud or on-prem). Access it through an [MCP client](https://modelcontextprotocol.io/docs/learn/client-concepts) such as Cursor, Claude Code, or the OpenAI Codex CLI. --- ## Overview {#overview} The Cribl MCP server lets external MCP clients connect to your Cribl environment and investigate your Sources, Destinations, Pipelines, Worker Groups, system health, metrics, and Search data through natural language. The MCP server is embedded in the Cribl Leader. Each MCP client connects directly to the Leader endpoint at `/api/v1/mcp` and authenticates with the same credentials as the rest of the Cribl API. There is no separate service to deploy, and every tool call runs with the caller's own identity and role-based access control (RBAC) permissions. The embedded MCP server does not use Cribl-managed models or a [custom AI provider](cribl-byoai). Your MCP client (for example, Cursor, Claude Code, or Codex) supplies its own model. Selecting or changing an AI provider in **AI Settings** does not change how the MCP server authenticates, exposes tools, or runs tool calls. > Cribl recommends the embedded MCP server for new setups. The standalone Docker MCP server (`cribl/cribl-mcp-server`) remains fully supported as an alternative. For that setup, see [Standalone Docker MCP Server](#docker-standalone). {.box .info} ## Prerequisites {#prerequisites} - Cribl environment ([Cribl.Cloud](/stream/cloud-vs-self-hosted), [on-prem](/stream/deploy-types/), or [hybrid](/stream/cloud-enterprise/#hybrid)) - For on-prem deployments, Cribl version 4.19.0 or newer - Admin role in your Cribl Organization to enable the MCP server on the **MCP Server** settings page. Connecting to the server and running tools does not require the admin role. - Product access for the tools you want to use. Cribl filters the tool list by your permissions. See [Tool Access and Permissions](#rbac). - MCP client such as Cursor, Claude Code, or the OpenAI Codex CLI - Network access to the Leader API endpoint for your deployment ## Choose Your Connection {#connection} Use the following table to identify the MCP endpoint and authentication method to use for your environment. | Deployment | MCP endpoint | Authentication | Token lifetime | | --- | --- | --- | --- | | Cribl.Cloud | `https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp` | Bearer token | About 24 hours | | On-prem Leader (embedded) | `https://${hostname}:${port}/api/v1/mcp` | Bearer token | Configurable (default 1 hour) | | Standalone Docker container | `http://:3030/mcp` | `X-API-Key` | Does not expire | Replace `${workspaceName}` and `${organizationId}` with your Cribl.Cloud Workspace name and Organization identifier, and `${hostname}` and `${port}` with the hostname and API port of your Leader. ## Get Your Token {#get-token} The embedded MCP server authenticates with a Bearer token that you pass in the `Authorization` header of your MCP client configuration. The way you obtain the token depends on your deployment. ### Cribl.Cloud {#token-cloud} 1. Log in to your Cribl.Cloud Organization. 1. Select **Settings**, then select **Global**. 1. Select **MCP Server**. 1. If the MCP server is off, toggle **Enable MCP server** on. Only administrators can turn the MCP server on or off. 1. Under **Connect to Cribl MCP server** > **Get your token**, select the **Copy token** icon. The copied value is your current session Bearer token. The page shows only the token header and masks the rest. Paste the token into your MCP client configuration as described in [Configure Your MCP Client](#configure), or use **Copy with Token** to copy a ready-made configuration. Once an administrator turns the MCP server on, you can also copy a token from the **Bearer Token** row at **Settings > Global > Information**. This row gives you the same session token without opening the **MCP Server** page. Users with a non-admin role such as **User**, **Read Only**, or **Editor** can use it to get a token for themselves. > The **MCP Server** page is separate from **AI Settings** because the embedded MCP server is independent of which LLM provider powers other Cribl AI features. {.box .info} > The token and client configuration sections appear only while the MCP server is enabled. On the **Information** tab, the **Bearer Token** row does not appear at all while the MCP server is off. {.box .info} ### On-Prem Leader {#token-onprem} > The embedded MCP server for on-prem Leaders requires Cribl version 4.19.0 or newer. {.box .info} On an on-prem Leader, go to **Settings > Global > MCP Server** and toggle **Enable MCP server** on. Then obtain a Bearer token from the login API. Replace the hostname, port, and credentials with your own values. ```bash curl -s -X POST 'https://${hostname}:${port}/api/v1/auth/login' \ -H 'Content-Type: application/json' \ -d '{"username": "", "password": ""}' | jq -r .token ``` On-prem Bearer tokens expire according to the **Auth token TTL** value at **Settings > Global > General Settings > API Server Settings > Advanced** (default `3600` seconds, or one hour). For details, see [Authenticate with the Cribl API](/cribl-as-code/api-auth). > To use `https` for on-prem requests, you must [configure Transport Layer Security (TLS)](/stream/securing-tls-ui-api). If TLS is not configured, use `http` instead. Use `http` only for testing in development environments. {.box .info} > **Protect your token.** The Bearer token is your Cribl session token, and a connected MCP client inherits your permissions. If your account can modify configurations such as Pipelines, the client can too. A token never grants more than the account that copied it, and Cribl checks your permissions again on each tool call. Treat the token like a password: Share it only with clients you trust, and never commit it to source control. {.box .warning} ## Configure Your MCP Client {#configure} Add the Cribl MCP server to your client configuration using the endpoint and token for your deployment. Cursor, Claude Code, and Codex all support remote HTTP MCP servers natively, so you do not need the `mcp-remote` proxy. ### Copy a Configuration From the MCP Server Page {#configure-ui} When the MCP server is on, the **MCP Server** page generates a configuration for you, with the endpoint for your deployment already filled in: 1. Go to **Settings > Global > MCP Server**. 1. Under **Configure your client**, select the tab for your client: **Claude Code**, **Cursor**, **Codex**, or **Other client**. 1. Review the snippet. The tab lists the file to edit: `~/.claude.json` or `.mcp.json` for Claude Code, `~/.cursor/mcp.json` for Cursor, and `~/.codex/config.toml` for Codex. The **Other client** tab lists the URL, method, and headers instead. The snippet shows `` as a placeholder. 1. Select **Copy with Token** to copy the snippet with your current session token filled in, then paste it into the client's configuration file. 1. Restart your client to confirm the connection. The following sections show the same configuration, so you can edit it by hand or fill in the values yourself. The following examples use a Cribl.Cloud endpoint. For an on-prem Leader, replace the URL with `https://${hostname}:${port}/api/v1/mcp` and use the token from the [login API](#token-onprem). In each example, replace the placeholders in the `url` value with the values for your deployment: `${workspaceName}` and `${organizationId}` for Cribl.Cloud, or `${hostname}` and `${port}` for an on-prem Leader. > The `Accept: application/json, text/event-stream` header is required for Cribl.Cloud and embedded Leader endpoints. Without it, the server returns HTTP 406. {.box .warning} ### Cursor {#configure-cursor} Add the following to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project): ```json { "mcpServers": { "cribl-cloud": { "type": "url", "url": "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp", "headers": { "Authorization": "Bearer ", "Accept": "application/json, text/event-stream" } } } } ``` After editing, restart Cursor, then confirm that the server shows as connected under **Settings > MCP**. ### Claude Code {#configure-claude-code} Add the following to `~/.claude.json` (user scope) or `.mcp.json` (project scope), under the `mcpServers` key: ```json { "mcpServers": { "cribl-cloud": { "type": "http", "url": "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp", "headers": { "Authorization": "Bearer ", "Accept": "application/json, text/event-stream" } } } } ``` After editing, restart Claude Code or run `/mcp` to confirm that the server shows as **connected**. Claude Code expands `${VAR}` references in `url` and `headers` values, so you can keep the token in an environment variable. ### Codex {#configure-codex} Add the following to `~/.codex/config.toml`: ```toml [mcp_servers."cribl-cloud"] url = "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp" [mcp_servers."cribl-cloud".http_headers] Authorization = "Bearer " Accept = "application/json, text/event-stream" ``` To confirm that Codex loaded the configuration, run: ```bash codex mcp get cribl-cloud codex mcp list ``` The output shows `transport: streamable_http`, `Status: enabled`, and `Auth: Bearer token`. Existing Codex sessions might not pick up a newly added server, so restart Codex or open a new thread before testing the Cribl MCP tools. ## Verify the Connection {#verify} After configuration, your MCP client surfaces the tools that the embedded server exposes. You can also preview the tools before you connect. See [Preview Available Tools](#try-it-out). The **Access required** column shows the permission that makes each tool visible. For details, see [Tool Access and Permissions](#rbac). | Tool | Description | Access required | | --- | --- | --- | | `cribl_getSystemMetrics` | Retrieve system metrics, with optional filtering by expression, metric name, and time range. | System metrics | | `cribl_getAlerts` | Get alerts and system messages, with filtering and pagination support. | System messages | | `cribl_listWorkerGroups` | List Worker Groups in the deployment, optionally filtered by product type. | Worker Group list | | `cribl_getSources` | Retrieve Source (input) configurations. Use `groupName` to scope to a Worker Group. | Stream | | `cribl_getDestinations` | Retrieve Destination (output) configurations. Use `groupName` to scope to a Worker Group. | Stream | | `cribl_getPipelines` | Retrieve Pipeline definitions. Use `groupName` to scope to a Worker Group. Supports Pipelines inside Packs. See [Work With Pipelines in Packs](#pack-pipelines). | Stream | | `cribl_getPipelineConfig` | Retrieve the full configuration for a specific Pipeline by ID. For a Pipeline inside a Pack, use `groupName` and `packId`. | Stream | | `cribl_setPipelineConfig` | Apply a new configuration to a specific Pipeline. For a Pipeline inside a Pack, use `groupName` and `packId`. | Stream, plus write access | | `cribl_getSearchContext` | Return available Datasets, saved searches, and KQL guidance needed to compose a query. | Search | | `cribl_runSearchQuery` | Run an exact KQL query. Fast searches return results inline. Longer searches return a job ID. | Search | | `cribl_getSearchJobResults` | Retrieve status and paginated results for a search job, including preview results while it runs. | Search | | `cribl_getSearchNotebooks` | Retrieve Search Notebooks, or a single Notebook when you provide a Notebook ID. | Search | | `cribl_addToSearchNotebook` | Add Markdown or search sections to a Search Notebook, or create a new Notebook. | Search | | `cribl_editSearchNotebookSection` | Edit a section in a Search Notebook. | Search | | `cribl_removeSearchNotebookSection` | Remove one or more sections from a Search Notebook. | Search | | `cribl_queryMetrics` | Run a PromQL query, or a metadata command such as `.labels` or `.metrics`, against the metrics you ingest through Prometheus remote write. | Search | | `cribl_getMonitors` | Retrieve monitor configurations, which are the alert-on-metric rules for the metrics you ingest through Prometheus remote write. | Monitors | > `cribl_queryMetrics` and `cribl_getMonitors` work with the metrics you ingest into Cribl, not with health data about Cribl itself. For the health of your Cribl deployment, use `cribl_getSystemMetrics` and `cribl_getAlerts`. {.box .info} ### Work With Pipelines in Packs {#pack-pipelines} The Pipeline tools can read and change Pipelines inside [Packs](/stream/packs). Because Packs are installed per Worker Group, name both the Pack and its Worker Group in your prompt. For example, "Show me the Pipelines in the my-pack Pack on the default Worker Group." Your client works out which tool parameters to use. ### Tool Access and Permissions {#rbac} Each tool runs with the calling user's identity and inherits that user's existing Cribl permissions. The embedded server relies on these existing permissions rather than a separate MCP permission model, so there are no MCP-specific roles to grant. Cribl applies the same rules on Cribl.Cloud and on-prem deployments. To review or change what a user can do across Cribl, see [Access Control](/iam/access-control/). Cribl checks access in three layers: endpoint access, tool visibility, and call-time enforcement. 1. **Endpoint access.** Connecting to `/api/v1/mcp` requires the **Leader MCP Access** permission. Cribl includes this permission in the common building-block policies, so any user with Worker Group read access, Search access, or product access already has it. A user with no assigned policies receives HTTP 403 before Cribl processes the request. 1. **Tool visibility.** Your client sees only the tools your permissions allow: - **Search tools** require Search product access. - **Stream read tools** require Stream product access. - **`cribl_setPipelineConfig`** requires Stream product access and write access to at least one Worker Group. A read-only Stream user sees the Stream read tools but not this one. - **Platform tools**, meaning `cribl_getSystemMetrics`, `cribl_getAlerts`, `cribl_listWorkerGroups`, and `cribl_getMonitors`, are checked individually against the resource each one reads. You might see some of them and not others. Tools you cannot use do not appear in your client's tool list at all. Cribl omits them rather than listing them and failing when they run. If a client calls an omitted tool anyway, for example because it cached an earlier tool list, the call returns `Forbidden: insufficient API permissions for this tool (RBAC).` 1. **Call-time enforcement.** Visibility is not the final check. Cribl also enforces permissions on each call, so a tool that appears in your list can still return an error for a Worker Group or Dataset that you cannot access. This is expected. Tool visibility is scoped by product, while the underlying resources are scoped by Worker Group and Dataset. ### Preview Available Tools {#try-it-out} When the MCP server is on, the **Try it out** section of the **MCP Server** page lists the tools grouped by category: **Platform**, **Stream**, **Search**, and **Monitors**. Tool access follows the user and team permissions set within Cribl. A check mark identifies the tools that you can use. Tools you lack permission to use appear unchecked. Any user with product access can open the **MCP Server** page and view this list, even if only an administrator can turn the server on. To narrow the list: - Enter text in **Filter tools by name or description**. - Under **Access type**, select **All**, **Read**, or **Write**. Tools that can modify content, which are `cribl_setPipelineConfig` and the Search Notebook tools that add, edit, or remove sections, carry a **Write access** tag. - Turn on **Available only** to hide tools that you don't have access to. ### Audit Tool Calls {#audit} The Leader logs every MCP tool call at `info` level under the event name `mcp.tool.call`. Each entry records the tool name, the username of the caller, the duration in milliseconds, a request ID, and a status of `success`, `error`, or `denied`. A `denied` status means that Cribl blocked the call because the user lacked permission. On Cribl.Cloud, entries also record the tenant. Cribl does not log tool arguments or results. ## Use Case Examples {#use-cases} The Cribl MCP server provides an AI-native approach to interacting with your Cribl environment. When evaluating how to best use the Cribl MCP server, consider the following use cases as a reference. | Use Case | Sample Prompt | Value | | --- | --- | --- | | Cribl environment health | "What's the current health of my Cribl environment? Highlight any areas of concern or action items I need to consider." | Coalesces health information across your Cribl environment into a digestible summary with clear action items. | | Cribl Source and Destination overview | "What Sources and Destinations do I have in my environment? Are there any I should pay specific attention to?" | Provides an overview of active and unused Sources and Destinations across your environment. | | Cribl Worker Group overview | "What's the processing status of my Worker Groups?" | Provides cross-Worker-Group visibility into throughput, health, and configuration settings, with improvement recommendations. | | Cribl Search investigations | "Search the last 24 hours for authentication failures, summarize them by source, and highlight unusual activity." | Discovers available Datasets, composes the appropriate KQL query, runs it, and retrieves results for analysis. (Unless the Dataset and exact KQL are already known, the agent should call `getSearchContext` first to discover Datasets and syntax. If it doesn't, ask it to "Check which Datasets are available first.") | ## Token Expiration and Refresh {#token-refresh} - **Cribl.Cloud:** Bearer tokens expire after about 24 hours. To refresh, log back in to Cribl.Cloud, copy a new token, and restart your MCP client. - **On-prem Leader:** Bearer tokens expire according to the **Auth token TTL** setting (default one hour). To refresh, re-run the [login API](#token-onprem) and update your client configuration. When a token expires, MCP tool calls return HTTP 401. Refresh the token and update your client configuration to restore access. If the MCP server is disabled, tool calls return HTTP 403. An administrator can enable it at **Settings > Global > MCP Server**. ## Switch From the Standalone Docker Server {#migrate} If you already run the standalone Docker MCP server, you can switch to the embedded server on the Leader. The standalone Docker server remains supported, so this switch is optional. The embedded server removes the need to run a separate container, manage API credentials for the server, or expose port 3030. The two servers share tools such as `cribl_getSources`, and shared tools use identical names, so prompts that reference them continue to work after you switch. The tool sets are not identical, however. For the tools the embedded server exposes, see [Verify the Connection](#verify). ### Map Your Credentials {#migrate-credentials} The embedded server authenticates with your session Bearer token instead of the environment variables that the container requires. Use the following table to map your standalone configuration to the embedded configuration. | Standalone Docker setting | Embedded server equivalent | | --- | --- | | `CRIBL_BASE_URL` | The MCP endpoint host: `https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp` (Cribl.Cloud) or `https://${hostname}:${port}/api/v1/mcp` (on-prem). | | `CRIBL_CLIENT_ID` and `CRIBL_CLIENT_SECRET` | Not required. Authentication uses your Bearer token. See [Get Your Token](#get-token). | | `MCP_API_KEY` (sent as `X-API-Key`) | Not required. Replaced by the `Authorization: Bearer ` header. | | Running container on port 3030 | No container. Clients connect directly to the Leader endpoint. | ### Update Your Client Configuration {#migrate-config} Replace your standalone server configuration with the embedded endpoint and Bearer token. For example, on Cribl.Cloud: **Before** (standalone Docker server with an API key): ```json { "mcpServers": { "cribl-onprem": { "type": "url", "url": "http://localhost:3030/mcp", "headers": { "X-API-Key": "" } } } } ``` **After** (embedded server with a Bearer token): ```json { "mcpServers": { "cribl-cloud": { "type": "url", "url": "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/mcp", "headers": { "Authorization": "Bearer ", "Accept": "application/json, text/event-stream" } } } } ``` To switch: 1. Confirm that an administrator has enabled the embedded server at **Settings > Global > MCP Server**. 1. Get a Bearer token for your deployment. See [Get Your Token](#get-token). 1. In your client configuration, change the `url` to the embedded endpoint, remove the `X-API-Key` header, and add the `Authorization` and `Accept` headers. See [Configure Your MCP Client](#configure). 1. Restart your MCP client and confirm that the Cribl MCP tools appear. See [Verify the Connection](#verify). 1. After you confirm that the embedded server works, stop the standalone container. The container's `CRIBL_CLIENT_ID`, `CRIBL_CLIENT_SECRET`, and `MCP_API_KEY` values are no longer used by the client. ## Standalone Docker MCP Server {#docker-standalone} > The standalone Docker MCP server is a fully supported alternative to the embedded MCP server. It runs as a separate container and authenticates with a static `X-API-Key` rather than a Bearer token. Cribl recommends the embedded MCP server for new setups. {.box .info} The standalone Cribl MCP server runs as a Docker container. You can get the container image from [Docker Hub](https://hub.docker.com/r/cribl/cribl-mcp-server/tags) or the [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-dddpw5botcxri). The container requires the following environment variables. | Variable Name | Required | Description | Information Source | | --- | --- | --- | --- | | `CRIBL_BASE_URL` | Yes | The base URL for your target Cribl environment (Cribl.Cloud Organization URL or on-prem Leader URL). | [Cribl](/cribl-as-code/api/#base-urls) | | `CRIBL_CLIENT_ID` | Yes | One of the two components of the Cribl API credential. Must be created by an admin or owner. | [Cribl API Auth](/cribl-as-code/api-auth) | | `CRIBL_CLIENT_SECRET` | Yes | One of the two components of the Cribl API credential. Must be created by an admin or owner. | [Cribl API Auth](/cribl-as-code/api-auth) | | `MCP_API_KEY` | No | A self-created API key to restrict access to your MCP server. Recommended if hosting in AWS or shared environments. | User created and managed | | `aws_account_id` | Yes (for AWS) | Your target AWS account ID if hosting in AWS. | [AWS](https://docs.aws.amazon.com/IAM/latest/UserGuide/console-account-id.html) | | `aws_region` | Yes (for AWS) | Your target AWS region if hosting in AWS. | [AWS ECS](https://docs.aws.amazon.com/general/latest/gr/ecs-service.html) | Run the container using one of the following commands. ### Docker (Local) {#docker-local} ```bash docker run -p 3030:3030 \ -e CRIBL_BASE_URL=https://${workspaceName}-${organizationId}.cribl.cloud \ -e CRIBL_CLIENT_ID= \ -e CRIBL_CLIENT_SECRET= \ -e MCP_API_KEY= \ cribl/cribl-mcp-server ``` For an on-prem target, set `CRIBL_BASE_URL` to `https://${hostname}:${port}`. ### AWS ECS {#docker-aws} ```bash docker run -p 3030:3030 \ -e CRIBL_BASE_URL=https://${workspaceName}-${organizationId}.cribl.cloud \ -e CRIBL_CLIENT_ID= \ -e CRIBL_CLIENT_SECRET= \ -e MCP_API_KEY= \ .dkr.ecr..amazonaws.com/cribl/cribl-mcp-server ``` When the container starts, you should see output confirming that the Cribl MCP server is running: ``` [2025-11-04T17:00:45.965Z] INFO Configuration validated successfully {"baseUrl":""} [2025-11-04T17:00:45.966Z] INFO Registering MCP tools... [2025-11-04T17:00:45.966Z] INFO MCP tools registered successfully [2025-11-04T17:00:45.969Z] INFO MCP Stateless Streamable HTTP Server listening on port 3030 ``` ### Configure a Client for the Standalone Container {#docker-configure} The standalone container is treated as a local MCP server, even when it runs in an ECS instance. If you set the `MCP_API_KEY` environment variable, configure your MCP client to send the same key in the `X-API-Key` header: ```json { "mcpServers": { "cribl-onprem": { "type": "url", "url": "http://localhost:3030/mcp", "headers": { "X-API-Key": "" } } } } ``` The `MCP_API_KEY` is a static string set when the server starts and does not expire. --- To connect Cribl AI to external MCP servers instead, see [Connect Cribl AI to External MCP Servers](/copilot/mcp-integrations). ############################################################ # SOURCE: https://docs.cribl.io/copilot/mcp-integrations.md ############################################################ # Connect Cribl AI to External MCP Servers Learn how to configure Cribl AI to connect to external [MCP](https://modelcontextprotocol.io/docs/getting-started/intro) servers, making third-party tools available to Cribl AI agents during conversations. --- ## Overview {#overview} Cribl AI can connect outward to external MCP servers. Once configured, the tools those servers expose become available to Cribl AI agents. For example, Cribl Search can query external data sources or trigger actions in third-party systems directly from a conversation. This is distinct from the [Cribl MCP server](/copilot/cribl-mcp-server), which lets external MCP clients (such as Cursor or Claude Desktop) connect inward and query your Cribl environment. > Currently, [Cribl Search investigations](/search/investigate/) and [Billy chatbot](copilot-chat) are the only Cribl AI features that use external MCP integrations. Other Cribl AI features do not call tools from configured MCP servers. {.box .info} ## Prerequisites {#prerequisites} - Cribl AI is [configured correctly](/copilot/#enable) in your deployment - Admin or Owner role in your Cribl Organization ## Access MCP Integrations Settings {#navigate} 1. Select **Settings**, then select **AI Settings**. 1. Select **Manage Integrations**. The MCP Integrations page lists all configured external MCP server connections. ## Add an MCP Integration {#add} 1. Select **Add Integration**. 1. Complete the following fields: | Field | Description | | --- | --- | | **ID** | A unique identifier for this integration. | | **Display Name** | A human-readable label shown in the UI. | | **Endpoint URL** | The Server-Sent Events (SSE) or Streamable HTTP endpoint URL of the external MCP server. | | **Headers** | _(Optional)_ Key-value pairs sent with each request. Use this to supply authentication credentials, for example `Authorization: Bearer ` or a custom API key header. | 1. Select **Save**. Header values are encrypted at rest. Cribl stores the integration configuration in `ai.yml` under the `mcp.servers` key: ```yaml mcp: servers: - id: my-integration displayName: My MCP Server url: https://mcp.example.com/sse enabled: true headers: Authorization: "" ``` ## Endpoint Address Restrictions {#network} Cribl validates the endpoint address of an external MCP server, and the rules differ by deployment type. On Cribl.Cloud, Cribl rejects: - Endpoint URLs that use a private IP address. - Endpoint hostnames that resolve to a private address. Cribl checks this when it opens the connection, not only when you save the integration. - HTTP redirects, because a redirect can point a public endpoint at an internal address. These restrictions stop a Cribl.Cloud Workspace from reaching private network addresses through an external MCP server. To connect Cribl.Cloud to an MCP server that runs on your own network, expose that server at a publicly resolvable address. On-prem deployments allow private addresses and follow redirects normally, so you can connect to an MCP server inside your network. ## Enable or Disable an MCP Integration {#toggle} On the **MCP Integrations** page, use the toggle next to an integration to enable or disable it without removing its configuration. Disabling an integration stops Cribl AI agents from using its tools while preserving the saved endpoint URL, headers, and other settings. Re-enable the integration at any time to make its tools available again. This toggle corresponds to the `enabled` field in the stored configuration (shown in the preceding `ai.yml` example). ## Delete an MCP Integration {#delete} Select the delete action next to the integration you want to remove. MCP integrations cannot be edited in place. To update the configuration of an integration, delete it and re-add it. If you only need to temporarily stop using an integration, disable it instead of deleting it. ## Connection Lifecycle {#lifecycle} When a Cribl AI agent uses tools from an MCP integration, Cribl establishes an SSE connection to the external MCP server. It discovers available tools using the standard MCP `tools/list` operation. Connections are cached and reused. Connections that are idle for 5 minutes are automatically disconnected and transparently re-established on the next tool call. All active connections are closed cleanly when the Cribl process shuts down. ## Use Case Examples {#use-cases} | Use Case | Sample Prompt | Value | | --- | --- | --- | | Query external data sources | "Search our Jira backlog for open tickets related to ingestion errors." (requires a connected Jira MCP server) | Lets Cribl AI call tools on any configured external MCP server, extending AI capabilities to third-party systems without leaving your Cribl workflow. | | Automate third-party actions | "Create a PagerDuty incident for the high-throughput anomaly we just found." (requires a connected PagerDuty MCP server) | Enables Cribl AI to act on external systems as part of an investigation or remediation workflow. | --- To learn how to expose your Cribl environment to external MCP clients instead, see [Work with the Cribl MCP Server](/copilot/cribl-mcp-server). ############################################################ # SOURCE: https://docs.cribl.io/edge/about.md ############################################################ # About Cribl Edge ## What Is Cribl Edge? [Cribl Edge](https://cribl.io/download) helps you collect and process observability data - logs, metrics, and application data - in real time, from your Linux, Windows, and macOS machines, apps, or microservices, and deliver them to Cribl Stream or any supported destination. With Cribl Edge you can: - Automatically discover and collect host, container, and application metrics, as well as logs, on endpoints. - Process data with Functions and Pipelines. - Forward data to any of the many supported destinations. - Easily manage configurations while maintaining version control. - Teleport to the edge for local preview and configuration validation. ![Leader Node, Fleets, and Destinations](edge-fleet-management.c74a757fdf.jpg) {border="false" scale="100%"} ### Conceptual Overview of Cribl Edge This two-minute video provides a quick overview of the [Cribl Edge product](https://vimeo.com/686516306/). [Watch the video](https://vimeo.com/686516306) ## Who Is Cribl Edge For? Cribl Edge is built for ITOps and SecOps Engineers and users of operational and security intelligence products and services who want to simplify the process of collecting and analyzing data from a host. > [Cribl University](https://university.cribl.io) offers the [Cribl Certified Admin for Edge](https://university.cribl.io/page/cribl-certified-admin-edge) course where you will learn to implement, optimize, and manage your deployments. To follow the direct course link, first log into your Cribl University account. (To create an account, select the **Sign up** link. You'll need to click through a short **Terms & Conditions** presentation, with chill music, before proceeding to courses - but Cribl's training is always free of charge.) Once logged in, check out other useful [Cribl Edge courses](https://university.cribl.io/page/all-courses-catalog). > {.box .course} ############################################################ # SOURCE: https://docs.cribl.io/edge/basic-concepts.md ############################################################ # Basic Concepts Notable features and concepts to get a fundamental understanding of Cribl Edge. --- ## Cribl Edge as an Agent Cribl Edge is a vendor-neutral agent for unified telemetry collection. **Edge Nodes** are individual agents you deploy to endpoints such as servers, desktops, laptops, containers, applications, and microservices. In a typical deployment, Edge Nodes report to a **Leader Node** which handles their configuration and updates. Edge Nodes are organized in **Fleets**, which are groups of Nodes that share configuration, follow the same update schedule, and participate in the same data flows. Fleets can have multiple **Subfleets**, which take advantage of configuration inheritance. See [Manage Fleets of Edge Nodes](fleet-management) for more information. You can use **Outpost Nodes** as intermediaries between Edge Nodes and the Leader. Outposts act as a relay for configuration and update communications in case of restrictions such as firewalls. See [Outpost](outpost) for more information. ## Cribl Edge and Data Flow Edge Nodes collect events, logs, and metrics on their endpoints using Sources. **Sources** are configurations for specific data categories and endpoint types, such as log files or OS-specific metrics. Certain Sources can also receive data from remote senders over protocols such as Syslog or TCP, but Cribl Edge is not designed to ingest large volumes of data from external sources. Cribl Edge is not intended for collecting data from multiple hosts. If you need to receive and aggregate data from various endpoints, use [Cribl Stream](/stream/) instead. Cribl Stream is designed to handle high volume workloads by employing multiple Worker processes. Data collected by Edge Nodes is sent to **Destinations** using one of two mechanisms: - **QuickConnect** - a graphical interface where you can quickly drag and drop connections between Sources and Destinations, optionally including - or excluding - Pipelines or Packs. - **Routes** - a complex mechanism for directing events to proper Destinations by filtering them. See [Route Collected Data](route-collected-data) for more details. In both mechanisms, you can transform, enrich, drop, and otherwise modify the events by running them through Pipelines containing Functions. A **Pipeline** defines what changes you want to apply to events. Each Pipeline contains **Functions** that handle specific transformations. Each Route uses one main Pipeline. Additionally, you can attach other Pipelines as pre-processing or post-processing Pipelines to Sources and Destinations, respectively. See [Pipelines](pipelines) and [Functions](functions) for more information. ![Diagram of data flow in Cribl Edge, from Sources through QuickConnect and Routes to Destinations](edge-diagram-complex-new.7145e71e7c.jpg) {scale="90%" border="false" caption="Routes, Pipelines, Functions"} ## Cribl Edge Configuration Management Cribl Edge configuration (Sources, Destinations, Routes, and Pipelines) happens at Fleet level. Organizing Edge Nodes into a hierarchy of Fleets and Subfleets lets you manage configurations at scale and benefit from configuration inheritance. See [Fleet inheritance](fleet-inheritance) for more information. ![Diagram of a Cribl Edge Fleet with two Subfleets, their Subfleets, and Edge Nodes](fleet-hierarchy-overview-diagram.png) {scale="90%" border="false" caption="Fleet hierarchy overview"} You can use **Packs** to import and reuse complete data flow configurations between Fleets, environments, and deployments. See [Packs](packs) for more details. ############################################################ # SOURCE: https://docs.cribl.io/edge/login.md ############################################################ # Log in to Cribl When you first log in to a Cribl instance, you will be required to configure your account and authenticate. Depending on how your Organization is configured, you may need to either authenticate via your SSO provider (such as Okta, Entra ID, or Ping Identity), or create a password for use with your email address. When creating a new username and password, you will be prompted for account information, such as name, company, or phone number. ## Switch Between Organizations When you are a member of multiple Organizations, you can switch between them on the top bar. Select your current Organization's name on the bar to open a drop-down with all Organizations you have access to. ![Cribl top bar with Organization drop-down opened, showing three Organizations.](org-switcher-4.12.2.png) {border="true" caption="Switching between Organizations"} ### Organizations with Different Authentication Methods If you switch between Organizations that use different authentication methods (SSO versus username/password), you will be asked to re-authenticate with the appropriate credentials. If the main Organization uses SSO, and you are switching to an Organization that uses username/password authentication, you will need to authenticate with a password. If you are accepting an invitation to the latter Organization, you will be prompted to create a password and go through a verification process. If the main Organization uses username/password authentication, and you are switching to an SSO-based Organization, you will need to authenticate via SSO. ############################################################ # SOURCE: https://docs.cribl.io/edge/quickconnect.md ############################################################ # QuickConnect Use QuickConnect to sent data from Sources to Destinations with drag-and-drop. --- The QuickConnect rapid-development UI enables you to visually connect Cribl Edge inputs (Sources) to outputs (Destinations) through simple drag-and-drop. You can insert [Pipelines](pipelines) or [Packs](packs) into the connections, to take advantage of the full range of data-transformation [Functions](functions) in Cribl Edge. Or you can omit these processing stages entirely, to send incoming data directly to Destinations - with minimal configuration fuss. QuickConnect was designed as a simple, quick way to prototype, test, and send data flowing through Cribl Edge. But it's also entirely suitable for configuring a production deployment, if your needs are restricted to sending data through parallel paths, and you don't need to use [Routes](routes). (See [QuickConnect Versus Routes](#routes) to help you clarify that choice.) ![QuickConnect UI](quickconnect-basic.c233cf9716.png) {border="true"} > You also have the option to start with simple direct connections, and later > add [Pipelines](pipelines)' and/or [Packs](packs)' processing power at up to > three stages of each connection. > {.box .success} ## Initiating QuickConnect {#initiating} To access QuickConnect, from a single-instance or individual **Edge Node**, select **Collect**. To display QuickConnect in a distributed deployment, you must first select a **Fleet**. Select the **Manage** link to select the `default` or a different Fleet. > You can switch to Cribl Edge's Routes UI at any time from the top nav by > selecting **Routing** > **Data Routes**. To toggle back, select **Routing** > > **QuickConnect**. > {.box .success} ## QuickConnect Versus Routes {#routes} QuickConnect provides access to most of Cribl Edge's configuration options, with a few restrictions (in exchange for the simplified visual interface): - QuickConnect completely bypasses Routes - which is why every QuickConnect path is independent and parallel. There is no Route-level data filtering, and you forego the Cribl Edge Routing table options to clone and cascade data across Pipelines. - Most [Sources](sources) are available to fully configure, with a few current exclusions. - Each supported Source's config can be created in either QuickConnect or Routes, and will reside only in that context. But you can [switch a config](#switching) between the two contexts, or you can create an identical config on the opposite side. - All [Destinations](destinations) are available to fully configure. - Everything you configure in QuickConnect exists separately from everything you configure in Data Routes. (But remember that you can use the **Routing** menu to toggle between contexts, and then replicate a QuickConnect configuration on the Data Routes side, or vice versa.) ## Using QuickConnect {#using} QuickConnect is designed to be nearly self-documenting. To get you going quickly, it displays the following Sources and Destinations straight out of the box: ![QuickConnect UI](quickconnect-sources.52ae8fa017.png) {border="true"} ### Filter Results {#filtering} Use the **Filter results** bar at the top of QuickConnect to narrow the Sources and Destinations displayed. Search by Source or Destination ID, type, connected Pipeline or Pack, or tag. Select the filter icon to the right of the search field to open additional filter options: - **Connection type** - Show connected or unconnected Sources and Destinations. - **Source type** - Filter by push, pull, or system/internal Sources. - **TLS** - Filter by TLS enabled or disabled. - **Pre/post-processing Pipeline** - Filter by whether a pre- or post-processing Pipeline is set. - **Persistent Queue** - Filter by whether a persistent queue is enabled or disabled. - **Enabled only** - When selected, shows only enabled Sources. Off by default, so QuickConnect continues to show both enabled and disabled Sources. This filter applies to Sources only. When you enable an additional filter, its criteria appear as a tag in the **Filter results** bar. Clear the tag or deselect the check box to remove the filter. > Additional filters are unavailable while you are editing a connection. > {.box .info} ### Enabling Sources and Destinations {#integrations} When you select Sources and Destinations, their configuration options will open in a drawer. Fill in a unique **Input ID**, and any other required fields marked by an asterisk (`*`). Then select **Save**. ### Switching Contexts {#switching} If you switch an **existing** Source to QuickConnect - for example, one of the preconfigured Sources that ship with Cribl Edge - you'll see the dialog shown below. This is due to QuickConnect's independence from the [Routes](#routes) interface - you need to confirm your choice to move the existing configuration from the Data Routes world to the QuickConnect world. ![Switching a Source/Destination between worlds](quickconnect-switch-from-routes.eb75d53cfd.png) {border="true"} > If you switch an existing Source config to QuickConnect, its data will no > longer flow through its configured Route. > {.box .warning} You can also go the opposite way: move a Source originally configured in QuickConnect to the Routing interface. In the Source's drawer or config modal, select the **Connected Destinations** left tab, and then select the resulting **Send to Routes** button. Here again, you'll need to confirm your choice before proceeding. ![Switching a Source/Destination between worlds](quickconnect-switch-to-routes-raw.a991d4d311.png) {border="true"} ### Selecting a Pipeline or Pack {#bottom-drawer} When you add or modify a connection line, the bottom **Connection Configuration** drawer will prompt you to select a **Passthru**, **Pipeline**, or **Pack** connection. Selecting either **Pipeline** or **Pack** will open an **Add...** modal like this in the bottom drawer: ![QuickConnect versus Routing UIs](qc-pipeline-select.14feb4736f.png) {border="true"} Here, you're selecting among already-configured Pipelines or Packs. **Resist the temptation to select a bold blue Pipeline or Pack name.** (Doing so will open the Pipeline or Pack config in a separate browser tab, which might offer more configuration than you bargained for.) Instead, select the subtle radio button to the left of the Pipeline or Pack you want to open. Then select **Save** to confirm your choice and close the drawer. ### Multiple Connections {#multiple} You can drag multiple connection lines between a given Source/Destination pair. (You might do this, for example, to configure parallel Pipelines to handle different data types.) Also, you can connect one Source to multiple Destinations, or multiple Sources to one Destination. Let's isolate examples of both, from the screen capture we started with: ![Multiple connections out, multiple connections in](quickconnect-multiple.110a681968.png) {border="true"} ### Source/Destination Tiles' Hover Options {#hover-options} Once you've configured a Source or Destination, hovering over its tile will display options like these: ![Signed, sealed, delivered: tiles' on-hover options](qc-tile-on-hover.24b00994bc.png) {scale="50%" border="true"} The leftmost button is an indicator of the Source's/Destination's state. Live means healthy; disabled, error, or warning states will also appear here. Note that a Source will appear as **Disabled** until you connect it to a Destination. ![This Source is not misconfigured - it's just lonely](qc-source-disconnected.18f42b7037.png) {scale="65%" border="true"} To update the Source or Destination configuration or address any problems, select the middle **Configure** button. The right **Capture** button captures a sample of data flowing through the Source or Destination. This is visualized in a drawer version of the [Live tab](data-preview#capturing-from-a-single-source-or-destination). ### Group Connections {#stacking} Once you've configured two or more copies of the same Source or Destination type - for example, to support different configurations of one integration or protocol - QuickConnect stacks their tiles together to keep the display clean. ![4 similar Destinations, stacked](qc-stacked-tiles.ec821511ac.png) {scale="55%" border="true"} > The number inside the stack shows how many tiles it contains. > {.box .success} You can select a stack to change its options. This will expand all the tiles in the group, and each tile will reveal the [on-hover options](#hover-options) described above. You can drag multiple connection lines from, or to, the same stack. If you drag or modify a connection from or to a stacked group, the UI will prompt you whether to similarly expand the group to access individual tiles. ############################################################ # SOURCE: https://docs.cribl.io/edge/packs-onboarding.md ############################################################ # Onboard Faster With Packs As you get started with Cribl Edge, consider using Packs to help streamline your onboarding process and get more value out of your Cribl deployment quickly. Packs are self-contained, portable bundles of Cribl objects with pre-built logic that solves typical or specific data processing challenges. They can include configurations or example logic for a variety of objects, such as Routes, Pipelines, and Knowledge objects. On the [Cribl Packs Dispensary](https://packs.cribl.io/), Cribl officially publishes and maintains a variety of validate Packs that you might use to solve a particular challenge or process data from a variety of vendors, including many that do not yet have full Cribl Edge integrations. The Dispensary also hosts validated Packs submitted from the larger Cribl developer and user community. Search and find for Packs that match your specific use case. Then download and import these Packs to: - **Reduce manual effort for common vendors and log formats:** Find Packs for validated solutions created by Cribl employees and community members to skip the time-consuming process of writing complex logic for well-known log formats. Instead, import a Pack to begin ingesting, parsing, and enriching logs for common vendors quickly. - **Learn Cribl best practices:** Use configurations created by experts from Cribl and the community to learn how to build an effective solution for common data processing challenges. - **Get value from Cribl more quickly:** Move from initial source connection to usable, parsed data more quickly by using pre-programmed logic in Packs that you can adapt for your specific needs. - **Simplify complex collections:** Use REST Packs to streamline configurations for the REST Collector. These officially supported Packs eliminate manual effort by providing validated authentication, pagination, and event-breaking settings tailored to specific upstream services that do not yet have a dedicated Source or Collector. - **Perform common data processing tasks:** Use Packs for use cases such as normalizing timestamps, flattening JSON objects, or masking sensitive PII. > This page describes how to use Packs to accelerate the onboarding process with Cribl Edge. However, you can also use Packs for advanced environment templating as your Cribl Edge deployment becomes more complex and needs to scale. See [Pack-Based Configuration Management](pack-config-management-intro) for more information about this advanced configuration management use case. > {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/edge/packs-import.md ############################################################ # Get Pre-Built Pack Content Packs created by Cribl and the Cribl Community let you speed up configuring your data flows by providing ready-made solutions for many common integrations and use cases. On the [Cribl Packs Dispensary](https://packs.cribl.io/), Cribl officially publishes and maintains a variety of validate Packs that you might use to solve a particular challenge or process data from a variety of vendors, including many that do not yet have full Cribl Edge integrations. The Dispensary also hosts validated Packs submitted from the larger Cribl developer and user community. Packs created by Cribl and the Cribl Community let you speed up configuring your data flows by providing ready-made solutions for many common integrations and use cases. These Packs are hosted on the [Cribl Pack Dispensary](https://packs.cribl.io). You can download and customize each Pack as needed. > This page describes how to use Packs to accelerate the onboarding process with Cribl Edge. However, you can also use Packs for advanced environment templating as your Cribl Edge deployment becomes more complex and needs to scale. See [Packs](packs) for more information about this advanced configuration management use case. > {.box .info} ## Add a Pack From the Dispensary To import a Pack from the Dispensary directly into your deployment: 1. On the top bar, select **Products**, and then select **Cribl Edge**. Under **Fleets**, select a Fleet. 1. Navigate to **Processing**, then **Packs** and select **Add Pack**. From the submenu, select **Add from Dispensary**. 1. The [Packs Dispensary](https://packs.cribl.io/) will open in a drawer. ![Cribl Packs Dispensary](packs-dispensary-drawer-4.13.png) {border="true", scale="80%"} 1. Using the drawer controls, browse or search for the Pack(s) you want. (You can use the check boxes at the left to filter by data type, use case, and technology.) 1. Select any Pack tile to display its details page with its README. This will typically outline the Pack's purpose, compatibility, requirements, and installation. 1. To proceed, select **Add Pack** on the Pack details page. 1. If the Pack you are importing binds [variables](#pack-variables) to any fields, you will see a **Configure Variables** button in the notification about successful import. Select it to go to the **Variables** page, where you can configure the values for the variables for your deployment. ## Explore and Customize the Pack Click inside the new Pack. In the Pack submenu you can see all the components that the Pack contains: Routes, Pipelines, Sources, Destinations, and Knowledge Objects. ![Pack menu showing Routes, Pipelines, Sources, Destinations, and Knowledge Objects](pack-menu-4.12.png) {scale="80%" border="true"} At this point you can edit any elements in the Pack to customize it to your needs. Do it the same way you would when working directly in any Fleet. > Remember that all elements inside the Pack, including Knowledge Objects, are scoped to that Pack. > This means you cannot use, for example, a Knowledge Object defined inside a Pack outside it. {.box .info} ## Upgrade a Pack from the Dispensary When a new version of a Pack is published to the Dispensary, you can upgrade your local Pack to get all the latest improvements. If you didn't introduce local changes to the Pack, you can upgrade the Pack directly from the UI. On the **Packs** page, open the Options ••• menu for your Pack, and then select **Upgrade**. ![Upgrading an existing Pack](pack-upgrade-4.12.png) {scale="80%" border="true"} If you've modified the Pack, Cribl Edge will not overwrite it during upgrading, to prevent deletion of your locally created resources. To reconcile your own changes with improvements coming in from a new Pack version: 1. Import the updated Pack as a separate Pack with a new name. Give it a name that includes the version number (for example, `cribl-syslog-input-120`). 1. Do a side-by-side comparison of the previous and new versions of the Pack. Copy configurations from your modified Pack into the upgraded Pack. Review all comments in the upgraded Pack to understand changes introduced in the new version. 1. Enable or disable any Functions in the new Pack as necessary. 1. Update any Routes, Pipelines, Sources, or Destinations that use the previous Pack version to reference the new Pack. 1. If you modified default Cribl Edge Knowledge Objects (for example, lookup files), copy the modified files locally for safekeeping, before upgrading the Pack. After you install the upgrade, copy those files back to the upgraded Pack, overwriting the default versions in the Pack. 1. Commit and Deploy. ## Troubleshoot Packs from the Dispensary If you experience unexpected behaviors using Packs from the Dispensary, the following troubleshooting steps can help you resolve the issue quickly. If you continue to have trouble, reach out to Cribl Support. ### Imported Pack Does Not Appear in Routes If a Pack downloaded from the Dispensary does not appear in the **Pipeline** dropdown of your Routing table at the Fleet level, that is likely because the Pack contains either a Source or Destination. Only Packs scoped exclusively for data processing appear in the **Pipeline** dropdown. Packs that include a Source or Destination are treated as independent integrations, which are intended for end-to-end data flows or as specialized Source-side or Destination-side components. See [Purpose and Scope of the Pack](pack-config-management-plan#scope) for a deeper explanation of how Packs can be scoped. First, verify that the Pack has a Source, Collector, or Destination: 1. On the top bar, select **Products**, and then select **Cribl Edge**. Under **Fleets**, select a Fleet. 1. Navigate to **Processing**, then **Packs**. Select the name of the Pack from the list. 1. From inside the Pack, select either **Sources** or **Destinations** from the top bar to see the list of configured Sources or Destinations. Verify that the Pack has a Source or Destination, which means it will have a badge with a number that indicates how many Sources, Collectors, or Destinations are contained in that Pack. ![Example of a REST Collector contained in a Pack](pack-example-configured-collector.png) If the Pack does not contain a Source, Collector, or Destination, there is likely some other issue. However, if it does contain one, the next step is to route data to or from that Pack, depending on whether it contains a Source, a Destination, or both. For more information, see: - [Design the Pack Data Flow](pack-config-management-plan#transfer-data) for an explanation of the different ways you can route data in and out of Packs. - [Connect Packs to Global Sources and Destinations](pack-config-management-create-pack#route-packs) for specific instructions on connecting the Pack data flow to global resources. ############################################################ # SOURCE: https://docs.cribl.io/edge/explore-edge.md ############################################################ # Explore Cribl Edge Explore the Cribl Edge UI. --- The Cribl Edge UI offers a centralized view to manage, configure, and version-control your Edge Nodes. It also lets you [teleport](managing-edge-nodes#teleport-into-an-edge-node) to individual Nodes to locally preview and validate your configurations. Here's a tour of the Cribl Edge UI in Distributed mode. > The available UI options might differ depending on your deployment type (Cribl.Cloud versus on-prem) > and the platform the Edge Node is installed on (Linux versus macOS versus Windows). {.box .info} ## Edge Home When you first log into Cribl Edge you'll land on the **Edge Home** page. This page gives you an overview of configured Fleets, monitoring information for Fleets, Subfleets, Edge Nodes, and Events and Bytes in and out. At the bottom, you'll see Recent Actions that users have taken in the environment as well as any configured Fleet Mappings. ![The Edge Home page, showing an overview of the configured resources](edge-home-ui-4.14.png) {border="true" scale="85%" caption="The Edge Home page"} ## Fleets Select **Fleets** from the sidebar to access your configured Fleets. ![Fleets page, displaying a table with Fleets and Subfleets with Source and Destination status icons and other details](fleets-sidebar-4.14.png) {border="true" scale="85%" caption="Fleets page"} From here, you can select a Fleet name to isolate individual Fleets, or use the filter bar to locate your Fleet. - For more information about the Fleets interface, see [Fleets](fleets). - To learn about creating Fleets, see [Creating and Managing Fleets and Subfleets](fleets-create-manage). ## Edge Nodes Select **Edge Nodes** to view all of your Edge Nodes in one list. ![Edge Nodes page, displaying a table with Edge Nodes, some connected, some disconnected, and their status information](edge-nodes-4.14.png) {border="true" scale="85%" caption="Edge Nodes page"} The list provides status information for each Edge Node in the selected Fleet, lets you [filter Edge Nodes](edge-nodes-filter), add, and update Nodes. For more information, see [Manage Edge Nodes](managing-edge-nodes). ## Outposts Select **Outposts** to view the list of configured Outposts, add and manage them. For more information, see [Connect Through Cribl Outpost](outpost). ## Mappings You can use Mappings Rulesets to map Edge Nodes to Fleets by defining rules. For more information, see [Mapping Edge Nodes to Fleets](mapping-edge-nodes). ## Logs Cribl Edge generates internal application logs that monitor its own operations and health. They provide valuable insights into the system's behavior, performance, and potential issues. For more information, see [Internal Logs](internal-logs). ## Notifications Notifications alert Cribl Edge admins about issues that require their immediate attention. For information on types of Notifications, Notification targets, and managing Notifications, see [Managing Notifications](notifications#managing). ## Explore Tab The **Explore** tab lets you get details about a particular Edge Node. For more details about the information you can find in the **Explore** tab, see [Explore Cribl Edge Nodes](explore-nodes). ############################################################ # SOURCE: https://docs.cribl.io/edge/explore-nodes.md ############################################################ # Explore Cribl Edge Nodes Examine Edge Nodes details in the Explore tab. --- You can view details of each individual Edge Node by using the **Explore** tab. To access it, in the sidebar, select **Fleets**, then choose a Fleet and select **Explore**. In the **Node** drop-down, select one of your hosts to display the following tabs: - [Processes](#processes) - [Containers](#containers) - [Files](#files) - [System State](#host-metadata) - [Kubernetes](#kubernetes) > The available tabs will depend on your deployment environment. {.box .info} ![Explore view of a single Edge Node, with Processes tab open, listing all the processes running on the Node](edge-explore-tab-4.14.png) {border="true" scale="75%" caption="Explore an Edge Node"} > The **Node** drop-down lists up to 100 Edge Nodes, ordered by hostname. > To view the details for a specific Edge Node, enter the hostname or GUID into the **Node** field. {.box .success} Let's explore each tab in the **Explore** view. ### Processes {#processes} The **Processes** tab lists all the processes running on the Edge Node. Select any of the rows to display a drawer with basic information on the process. In the drawer's default **Overview** tab, you'll find information such as CPU, Memory, and IO graphs, along with tables for active **Listening**, **Inbound**, and **Outbound** connections, if applicable. Select **All details** to see the selected process' information out of `/proc`, expressed as key-value pairs. To access this information, you would normally need to SSH to the machine. This view makes troubleshooting across multiple systems much easier. #### Process Metrics on Windows In Windows-based Fleets, you can control the collection method for Process Metrics using a configuration option in the **Fleet Settings** > **Limits** > **Other** section. This setting allows you to choose between using PowerShell cmdlets or the more efficient native module. > When using PowerShell cmdlets on Windows, the environment variables displayed in this tab might be inaccurate. > For details, see [Other](fleet-settings#other) Limits. {.box .warning} ### Containers {#containers} The **Containers** tab, available for Edge Nodes running in containers, lists all the running containers and container metrics including information about images, volumes, status, ports, and so on. > Cribl Edge supports both Docker and `containerd` runtimes. > > `containerd` containers have less info than Docker containers, so `Ports`, `IPs`, and `Logs` won't populate. {.box .info} ![Containers overview](edge-containers-tab-4.14.png) {border="true" scale="75%" caption="Containers overview"} Select any container to open a drawer with more details, including container logs. If you run Edge as an unprivileged user, see [Making Docker Containers Visible to Edge](deploy-runtime-user#make-containers-visible). ### Files {#files} The **Files** tab lists all the log files being actively written to by running applications that Cribl Edge has auto-discovered. You can also specify a list of directories and files to actively monitor. The **Actions** column allows you to: - **View**: Displays a representation of the lines this column contains. You can also select any file row. To restrict how much data is displayed, use the search field or time picker on the **Search** tab. - **Inspect**: Opens the **Inspect File** tab to show file metadata, including details like permissions, file size, user, and modified date. When inspected, compressed files (such as `foo.bar.gz`) include a **File preview** that shows the beginning of the file contents. Archived files (such as `.zip`, `.tgz`, and `.tar.gz`) include a **File listing** that shows the files within it. If a file appears suspicious, select **VirusTotal** or **OpSwat** at the bottom of the modal to see whether the file is flagged as compromised. - **Monitor**: Displays the [File Monitor's](#monitor) configuration modal. - **Ingest**: Opens the [Ingest file](#ingest) modal to send the file content to Routes/Pipelines for further processing or downstream to any destination you have configured. This is useful for testing and troubleshooting your configurations. The **Files** tab provides the following options. #### File Discovery Modes Select a button at the top to select a discovery mode: - **Auto**: Tells Cribl Edge to automatically discover files that are open for writing on currently running processes. The **Auto** discovery mode is unavailable on Windows and macOS. - **Manual**: Tells Cribl Edge to discover the files within the **Path** (directory) and **Allowlist** that you specify, down to the **Max depth**. - **Browse**: Displays a tree view of all of your directories and files. #### Path The **Path** field tells Cribl Edge to discover the files within the path (a directory) that you specify, down to the **Max depth**. #### Allowlist The **Allowlist** field, available with Auto and Manual discovery, supports wildcard syntax, and supports the exclamation mark (`!`) for negation. For example, you can use `!*cribl*access.log` to prevent Cribl Edge from discovering its own access log. The default filters are `*/log/*` and `*log`. Select any file to see a representation of the lines it contains. To restrict how much data is displayed, you can use the search field or time picker on the **Search** tab. If the representation of events shown on the **Search** tab isn't ideally suited to the file's contents, you can use the **Event Breakers** tab to [refine it](#exploring-files). #### Monitor Files The **Monitor Files** button, available with Auto and Manual discovery, opens a new [File Monitor](sources-file-monitor) Source. The Source is prefilled with the discovery mode and anything else you specified on the **Files** tab, such as allowlist entries, path, or max depth. #### Max Depth The **Max depth** field, available with Manual discovery, is empty by default. Cribl Edge will search subdirectories, and their subdirectories, downward without limit. If you enter `0`, Cribl Edge will discover only the top-level files within the specified path. If you specify `1`, Cribl Edge will discover files one level down from the top. Follow this pattern to specify the depth you want. #### Monitor a File {#monitor} Select a file's **Monitor** or **Actions** option to configure your [File Monitor](sources-file-monitor) Source to generate events from the file's lines or records. The **Monitor** feature automatically populates the modal with the following settings configured on the **Files** tab: - **Discovery mode**. Defaults to **Manual** for Windows and macOS. - **Search path** - **Max depth** - **Filename allowlist** In addition, the **Connected Destinations** section defaults to **QuickConnect**. In the **Connected Destinations** section, you can select a Pipeline or Pack and a Destination. Otherwise, when you save, you'll be routed to the **Collect** page to set up your connections via QuickConnect. For details about making these connections, see [File Monitor](sources-file-monitor) and [QuickConnect](quickconnect). #### Ingest a File {#ingest} To configure options for how and where to send file contents, use the **Ingest file** modal. You have two options: - Send directly to a configured Destination via **QuickConnect** (the default). - Send to Routes through (an optional) Pre-Processing Pipeline. You can configure Event Breakers and rulesets for both options. #### Explore Files with Event Breakers {#exploring-files} When you select a file in the **Files** tab, and Cribl Edge shows a representation of the lines that the file contains, how does that work? What's happening is that Cribl Edge is applying a default Event Breaker to the file. You are not limited to the default Event Breaker, though. Select the **Event Breakers** tab, then: - To apply a different (existing) Event Breaker, select **Add ruleset**, then select the desired ruleset from the **Event Breaker rulesets** drop-down. - To create a new Event Breaker Ruleset, click **Create New**. In the resulting **New Ruleset** modal, proceed as described [here](event-breakers#add). Later, you can reuse the new Event Breaker as part of a Source or a Collector. While you create the new ruleset, Cribl Edge pulls the contents of the open file into the Sample File area. Toggle between the **In** and **Out** tabs to compare, respectively, the original content and the content as modified by the Event Breaker you're creating. Now return to the **Search** tab - the contents of your chosen file will appear with the new Event Breaker applied. ### System State {#host-metadata} The **System State** upper tab provides access to a collection of information gathered by the System State Source. > To display any of the information, you need to configure and enable the [System State Source](sources-system-state). Also, make sure that the Source's [Collector Settings](sources-system-state#collectorsettings) fields are enabled. > {.box .info} ![An Edge Node's Explore view, with System State open to the Host Info tab](edge-explore-system-state-4.14.png) {border="true" scale="75%" caption="System State for the selected Edge Node"} #### Host Info {#host-info} Cribl Edge can add a `__metadata` property to every event emitted from every enabled Source. The **System State** tab displays the metadata collected for each Edge Node under **Host Info**. You can use the metadata surfaced by an Edge Node to: - Enrich events (with an internal `__metadata` field). - Display to users as a part of instance exploration. To customize the type of metadata collected, select **Fleet Settings > Limits > Metadata**. Use the **Event metadata sources** drop-down (and/or the **Add source** button) to add and select metadata sources. > In Edge mode, all the **Event metadata sources** are enabled by default. > {.box .success} The metadata sources that you can select here include: - `os`: Reports details for the host OS and host machine, like OS version, kernel version, CPU, and memory resources, hostname, network addresses, and so on. - `cribl`: Reports the Cribl Edge version, mode, instance GUID, Fleet (for managed instances), tags defined on the instance, and configuration version. - `aws`: Reports details for an EC2 instance, including the instance type, hostname, network addresses, tags, and IAM roles. For security reasons, we report only IAM role names. - `env`: Reports environment variables. - `kube`: Reports details on a Kubernetes environment, including the node, Pod, and container. For details, see [__metadata.kube Property](#kube). When these metadata sources are enabled (and can get data), Cribl Edge will add the corresponding property to events, with a nested property for each enabled source. > Some metadata sources work only in configured environments. For example, the `aws` source is available only when running on an AWS EC2 instance. > > If your security tools report denied outbound traffic to IP addresses like `169.254.169.168` or `169.254.169.254`, you can suppress these by removing `aws` from the metadata sources described above. If you have a proxy setup, Cribl recommends adding these IP addresses to your `no_proxy` environment variable. > {.box .info} ##### `__metadata.kube` Property {#kube} For the `__metadata.kube` property (`kube` in the UI) to report details on a Kubernetes environment, Cribl Edge needs to figure out where it is running. Set the `KUBE_K8S_POD` environment variable to the name of the Pod in which Cribl Edge is running. At this point, the `__metadata.kube` property will have information to report on the `node` and `pod` properties. If the `/proc/self/cgroup`is working, then the `container` property information will be available, too. > If you leave the `KUBE_K8S_POD` environment variable unset, and `/proc/self/cgroup` is not working, then Cribl Edge will not know what Pod it is running in. This state has multiple implications: > - The [Kubernetes Metrics Source](sources-kubernetes-metrics) will be unable to identify whether or not it is in a DaemonSet. The result will be redundant metrics from each node in the cluster. > - The Kubernetes Metadata Collector will not add the `__metadata.kube property`. > - The [Kubernetes Logs Source](sources-kubernetes-logs) will also duplicate data. Every node in the cluster will collect logs for every container in the cluster. > {.box .warning} #### Other System State Information The remaining information in the System State tab is organized into the following tabs: | Tab | Description | | --- | --- | | Disks | The **Disks** tab displays the inventory of physical disks and their partitions on the host system. | | DNS | The **DNS** tab lists the host system's DNS resolvers and search entries. | | File Systems | The **File Systems** tab displays an inventory of the mounted file systems on the host system. | | Firewall | The **Firewall** tab displays a list of the host's defined firewall rules. | | Groups | The **Groups** tab displays a list of the local groups including their names, descriptions, and members on the host system. | | Hosts File | The **Hosts File** tab displays the host system's current state. | | Interfaces | The **Interfaces** tab displays a list of each of the network interfaces on the host system. | | Listening Ports | The **Listening Ports** tab displays a list of listening ports and their associated process identifier (pid). | | Logged-in Users | The **Logged-In Users** tab displays a list of currently logged-in users on the host. | | Routes | The **Routes** tab displays entries from the network routes on the host system. | | Services | The **Services** tab displays a list of each configured service (such as `systemd` and `initd`) along with their running status. | | Users | The **Users** tab displays a list of local users on the host system. | ### Kubernetes {#kubernetes} The **Kubernetes** tab, available only for Kubernetes-based Edge Nodes, lists all the Kubernetes clusters, including nodes, pods, and containers. ![An Edge Node's Explore view, with Kubernetes tab open](explore-kubernetes-tab-4.14.png) {border="true" scale="85%" caption="Kubernetes tab"} Select any row to open a summary table for the pod, including: | Tab | Description | | --- | --- | | **Overview** | Basic node information, including creation time, labels, taints, lease, and annotations. | | **Host** | Detailed information about the node, including its IP address, capacity, system information, and the number of pods it's currently hosting. | | **Pods** | List of pods running on the node, along with their resource usage and age. | Select **Filter Rules** to view/add more filters. The default filter ignores the `kube-*` namespace, which is typically used by Kubernetes system components and may contain a large volume of irrelevant events. **Filter Rules** can be applied to the [Kubernetes Logs](sources-kubernetes-logs) Source to refine the data ingested into Cribl Edge. > To preview the effects of a new or modified [Event Breaker Ruleset](event-breakers#event-breaker-rulesets), you must commit and deploy the configuration changes. > {.box .info} #### Kubernetes Namespaces In the sidebar, select **Namespaces** to view the list of active namespaces in the Kubernetes cluster, along with their status and age. Select any namespace to view detailed information, including creation time, labels, annotations, resource quotas, and resource limits. #### Kubernetes Pods In the sidebar under **Workloads**, select **Pods** to view a list of pods running in the cluster. For each pod, the list shows its associated name, namespace, readiness, status, restart count, age, IP address, and the node it's running on. Select any row to view pod information with the following tabs available: | Tab | Description | | --- | --- | | **Overview** | General information about the pod, including its name, namespace, status, IP address, labels, annotations, current health conditions, and tolerations. | | **Containers** | Details about the containers within the selected pod, including their name, image, ports used, and their container ID. | | **Logs** | Real-time logs from the container(s), providing insights into its activity and any potential issues. | On the **Logs** tab, you can add timestamps to container logs that lack them, by toggling **Enable timestamps** on. This prefixes each line with a timestamp. After the timestamps are extracted, you can remove them from the events using the Kubernetes Logs Source [Event Breaker](sources-kubernetes-logs#event-breakers) and the [Pre-processing Pipeline](sources-kubernetes-logs#pre-processing). Select **Events** to apply and preview Event Breaker Rulesets to your logs and preview them. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-linux.md ############################################################ # Cribl Edge on Linux Learn about deploying and configuring Cribl Edge on Linux. --- Cribl Edge on Linux offers easy-to-use tools for exploring and collecting events. You can run Cribl Edge on a supported Linux and collect events, logs, and metrics via the full offering of Cribl Edge Sources. Read the following topics for more information about running Cribl Edge on Linux: | Topic | Description | | --- | --- | | [Installing Cribl Edge on Linux](deploy-linux) | Basic Cribl Edge deployment requirements and procedures | | [Enabling Start on Boot](deploy-boot-start) | Enable Cribl Edge instances to restart on system boot | | [Running Edge as an Unprivileged User](deploy-runtime-user) | Install Cribl Edge an unprivileged user | | [Installing Edge on Linux via RPM](deploy-rpm) | Securely install Edge using an RPM package | | [Installing Edge on Linux via .deb](deploy-deb) | Install Cribl Edge from a Linux .deb package | | [Anti-Virus Exceptions](deploy-antivirus-exceptions) | Add anti-virus exceptions to facilitate Cribl Edge installation | | [FIPS Mode for Cribl Edge (Linux)](fips-mode) | Running Cribl in FIPS mode | | [Use ACLs to Allow Cribl Edge to Read Files](usecase-edge-acls) | Using Access Control Lists to allow Cribl Edge to Read Files | ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-linux.md ############################################################ # Install Cribl Edge on Linux Install and deploy Cribl Edge Nodes on-prem on Linux. --- You can install Cribl Edge in a [supported Linux environment](#minimum-requirements) either [connected to a Leader Node](#run-edge), [alongside Cribl Stream](#collocated), or [in multiple instances](#multiple-edge-or-stream) on one host. You can also install a Linux Edge Node in a Distributed deployment by running the [bootstrap script](edge-nodes-add-update#bootstrap) in your command prompt. ## Minimum Requirements The following requirements are the minimum for installing and running an Edge Node on Linux. > Below is a summary of requirements for installing Cribl Edge. > See [Requirements](requirements) for more detailed information. {.box .warning} ### OS Requirements Cribl Edge Nodes can be installed on any common Linux distribution that fulfils the following criteria: - 64-bit kernel >= 3.10 - glibc >= 2.17 - OpenSSL >= 3.0 (if FIPS mode is enabled) ### Application Requirements Minimum application requirements for Edge Nodes are: - ~1 Ghz processor - 1024 MB RAM - 5 GB free disk space per volume for operational purposes ## Download Cribl Edge 1. First, download the [install package](https://www.cribl.io/download), which is the same binary as [Cribl Stream](/stream/), to your Linux machine. 2. Next, ensure that required ports are available (see [Ports](ports)). 3. Then, you can install and run any of the following: - [Connected to a Leader Node](#run-edge). - [Cribl Edge and Cribl Stream](#collocated) on the same host. - [Multiple installations](#multiple-edge-or-stream) of the same product, on the same host. ## Install Cribl Edge {#run-edge} These instructions explain how to run Cribl Edge locally on your own machine and connect it to a Leader Node. 1. Un-tar the install package in a directory of choice, and rename the resulting `cribl` directory to `cribl-edge`, for example: ```shell cd /opt/ tar xvzf cribl---.tgz mv /opt/cribl/ /opt/cribl-edge ``` > To prevent issues with Cribl file operations, `/opt/cribl` and all its subdirectories must reside on the same device. Mounting separate devices within `/opt/cribl` is not recommended. For external storage needs, such as lookups or Persistent Queues (PQs), create a completely separate directory outside of `/opt/cribl`. While `/opt/cribl` is the default installation path, Cribl can be installed to other locations if necessary. {.box .warning} 2. Set the renamed directory, (for example, `/opt/cribl-edge/`), as your `$CRIBL_HOME` directory. > To make the [`$CRIBL_HOME`](environment-variables#cribl_home) environment variable available on your command line, you can: > - Assign it once, using the `export` command: > `export CRIBL_HOME=/opt/cribl-edge` > - Set it as a default, by adding it to your to your terminal profile file. > {.box .info} 3. Change the ownership of the installation to run Cribl Edge as a non-privileged user: ```shell chown -R cribl:cribl /opt/cribl-edge ``` 4. Start the Cribl service: ```shell /opt/cribl-edge/bin/cribl start ``` 5. Ensure you have an authentication token prepared on the Leader. See [Create a New Provisioning Token](securing-auth-token#create) for more information. 6. Set the installation mode to `mode-managed-edge` to connect the Node to the designated Leader: ```shell /opt/cribl-edge/bin/cribl mode-managed-edge / -H / -p / -u / [-g ] ``` The new Node will be assigned to a [Fleet](fleet-management) on the Leader, either `default_fleet`, or a different one according to [Fleet mappings](mapping-edge-nodes). You can manually point to a specific Fleet by providing its name as `-g `, but Fleet mappings will override this choice. > If you only need a Single-instance deployment of Cribl Edge (without a Leader), > use `mode-edge` instead of `mode-managed-edge`. > In that case you don't need to provide the Leader token. {.box .info} 7. Configure the installation as a service and restart it: ```shell /opt/cribl-edge/bin/cribl boot-start enable -m systemd -u cribl sudo systemctl restart cribl-edge.service ``` > To find out more about the `boot-start` command, see [Enabling Start on Boot](deploy-boot-start). {.box .info} 8. Finally, go to `http://localhost:9420` (or another port you defined) and log in with default credentials (`admin:admin`). You can now start configuring Cribl Edge with [Sources](sources) and [Destinations](destinations), or start creating [Routes](routes) and [Pipelines](pipelines). > For more ways to configure Leader and Edge Nodes, see [Set Up Leader and Edge Nodes](setting-up-leader-and-edge-nodes). {.box .info} ## Cribl Edge and Cribl Stream on the Same Host {#collocated} You can run an Edge Node with a Leader that is managing Cribl Stream, or an Edge Node and a Stream Worker Node on the same host. To accommodate these scenarios, each product has a distinct service name: * `cribl-edge.service` for Cribl Edge. * `cribl.service` for Cribl Stream. Here, Cribl recommends un-tarring the download package twice, into two separate directories. This setup frees you to update and run each product individually. You could choose, e.g., `/opt/cribl-edge` and `/opt/cribl`: ```shell cd /opt tar zxvf /tmp/cribl---.tgz mv cribl cribl-edge tar zxvf /tmp/cribl---.tgz ``` The installation and configuration sequence will be the same for each product: 1. Change the ownership for both installations. Run Cribl Stream as a non-privileged user: ```shell chown -R cribl:cribl /opt/cribl ``` Run Cribl Edge as a non-privileged user: ```shell chown -R cribl:cribl /opt/cribl-edge ``` > ##### Do NOT Run Cribl Edge as Root! > > To listen on low ports 1-1024, Cribl Edge needs privileged access. You can enable this on systemd by adding this configuration key to your `override.conf` file: > > ```shell > [Service] > AmbientCapabilities=CAP_NET_BIND_SERVICE > ``` > > If you want to add extra capabilities, such as reading certain resources (e.g., `/var/log/*`), add `CAP_DAC_READ_SEARCH` in a space-separated format as follows: > > ```shell > [Service] > AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH > ``` > > Alternatively, you can use [ACLs to allow Cribl Edge to read files](usecase-edge-acls). > > For details, see [Running Edge as an Unprivileged User](deploy-runtime-user). > {.box .warning} 2. Set the correct mode, and configure each installation as a service. The `-H` and `-p` parameters are required. For Cribl Edge: ```shell /opt/cribl-edge/bin/cribl mode-managed-edge -H -p [options] [args] /opt/cribl-edge/bin/cribl boot-start enable sudo systemctl restart cribl-edge.service ```
For Cribl Stream: ```shell /opt/cribl/bin/cribl mode-worker -H -p [options] [args] /opt/cribl/bin/cribl boot-start enable sudo systemctl restart cribl.service ``` > ##### Managing IP Addresses {#ip} > > By default, Cribl Edge's API listens on port `9420`, instead of on Cribl Stream's default `9000` port. Some things to note: > > * You can set the `CRIBL_EDGE` [environment variable](environment-variables#single-instance-deployment-variables) to any value to bind to `0.0.0.0`, instead of to the `127.0.0.1` address. > * If you are starting Cribl Edge from the CLI, make sure you set the `-H` [parameter](/cli-mode-managed-edge) to `0.0.0.0`. > * If you connect your Edge Node to a Leader, the Node will automatically update the binding IP address to the one configured in the Leader's Fleet Settings. For an Edge Node to always listen on all IP addresses, you must update the Leader's **Host** value. (In the Leader's UI, go to **Fleet Settings** > **System** > **General Settings**, and change the **Host** field to `0.0.0.0`.) > * You can disable listening on the port by toggling **Listen on port** to off in **Fleet Settings** > **General Settings** > **Advanced**. > {.box .info} Continue with [Setting Up Leader and Edge Nodes](setting-up-leader-and-edge-nodes) for Edge, and [Setting Up Leader and Worker Nodes](/stream/setting-up-leader-and-worker-nodes) for Stream. ## Multiple Installations of Same Product on Same Host {#multiple-edge-or-stream} There are situations where it makes sense to run multiple Cribl Edge or Cribl Stream installations on the same host. For example, suppose two departments want to collect the data at the edge - and each wants to process the data differently, and to deploy its own Helm chart as a daemonset. To support this: After un-tarring the installation package, copy or move it into a separate directory for each installation. For example, if you're creating two Cribl Edge installations: ```shell cd /opt tar zxvf /tmp/cribl---.tgz cp -r cribl/ cribl-edge-01/ mv cribl/ cribl-edge-02/ ``` The installation and configuration procedure is the same as described for [collocated Cribl Edge and Cribl Stream](#collocated) above, except that you must: * Omit steps pertaining to the product you are **not** installing. * Repeat steps pertaining to the product you are **are** installing - once for each instance of the product. > Ensure that each instance of the product runs on its own dedicated port. Either: > * Specify different ports when you run the `mode-managed-edge` or `mode-worker` command; or, > * On the host, set the `CRIBL_AUTO_PORTS` environment variable to `1`. > {.box .warning} ## Troubleshooting Resources {#troubleshooting} > The [Cribl University](https://university.cribl.io) Troubleshooting course on [Switching from Cribl Edge to Cribl Stream](https://university.cribl.io/switching-from-edge-to-stream) demonstrates these techniques for integrating Edge with Stream. {.box .course} ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-boot-start.md ############################################################ # Enable Start on Boot on Linux Ensure that Cribl Edge starts at boot time. --- Cribl Edge ships with a CLI utility that can update your system's configuration to start Edge at system boot time. The basic format to invoke this utility is: ```shell sudo $CRIBL_HOME/bin/cribl boot-start [enable|disable] [options] [args] ``` > You must run this command as root, or with `sudo`. For options and arguments, see the [CLI Reference](/edge/cli-boot-start). > > The script will create a user named `cribl` to install, own, and run Cribl Edge/Stream. > {.box .info} Most, if not all, popular Linux distributions use `systemd` now to start processes at boot, while older or more obscure distributions may still use `initd`. Verify with your Linux distribution vendor if you aren't sure which method your systems use in order to know which procedure listed below to follow. ## Using systemd {#systemd-boot} To **enable** Cribl Edge to start at boot time with **systemd**, you must run the `boot-start` [command](/edge/cli-boot-start). Make sure you first create any user you want to specify to run Edge. E.g., to run Edge on boot as existing user `cribl`, you'd use: ```shell sudo $CRIBL_HOME/bin/cribl boot-start enable -m systemd -u cribl ``` This will install a unit file (as shown below) named `cribl-edge.service`, and will start Cribl Edge at boot time as user `cribl`. A `-configDir` option can be used to specify where to install the unit file. If not specified, this location defaults to `/etc/systemd/system/`. If necessary, change ownership for the Cribl Edge installation: ```shell sudo chown -R cribl $CRIBL_HOME ``` Next, use the `enable` command to ensure that the service starts on system boot: ```shell sudo systemctl enable cribl-edge ``` To **disable** starting at boot time, run the following command: ```shell sudo $CRIBL_HOME/bin/cribl boot-start disable ``` Other available `systemctl` commands are: ```shell sudo systemctl [start|stop|restart|status] cribl-edge ``` Note the file's default `65536` hard limit on maximum open file descriptors (known as a `ulimit`). The minimum recommended value is `65536`. Linux tracks this per user account. You can view the current soft `ulimit` for max open file descriptors with `$ ulimit -n` while logged in as the same user running the `cribl` binary. ``` {title="Installed systemd File"} [Unit] Description=Systemd service file for Cribl Edge. After=network.target [Service] Type=forking User=cribl Restart=always RestartSec=5 LimitNOFILE=65536 PIDFile=/install/path/to/cribl/pid/cribl.pid ExecStart=/install/path/to/cribl/bin/cribl start ExecStop=/install/path/to/cribl/bin/cribl stop ExecReload=/install/path/to/cribl/bin/cribl reload TimeoutSec=60 [Install] WantedBy=multi-user.target ``` ### Persisting Overrides {#persisting-overrides} By default, disabling and re-enabling boot start will regenerate the `cribl-edge.service` file. To persist any overrides - such as proxy or privileged port usage - use this command: ```shell sudo systemctl edit cribl-edge ``` This opens a text editor that prompts you to enter overrides, then saves them to a persistent file at: ```shell /etc/systemd/system/cribl-edge.service.d/override.conf ``` #### Using a Literal `%` Character To use a literal `%` character, make sure to escape it by using a double `%%`. For example, suppose that you want to persist the environment variable [`CRIBL_DIST_WORKER_PROXY`](environment-variables#cribl_dist_worker_proxy) in a systemd unit file, and the value includes a password that contains the special character `@`: `special@password`. You must encode the `@` as `%40`. However, because `%` is a special character that is used for [specifiers](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Specifiers) in systemd unit files, you must also escape the `%` itself by doubling it. In this example, `%%40` represents the literal `@` character in the password: ```shell Environment=CRIBL_DIST_WORKER_PROXY=socks5://proxyuser:special%%40password@mydomain.com:1080 ``` #### Avoid Running Cribl Edge as Root > **Do not run Cribl Edge as root!** > {.box .warning} To listen on low ports 1-1024, Cribl Edge needs privileged access. You can enable this on systemd by adding this configuration key to your `override.conf` file: ```shell [Service] AmbientCapabilities=CAP_NET_BIND_SERVICE ``` If you want to add extra capabilities, such as reading certain resources (e.g., `/var/log/*`), add `CAP_DAC_READ_SEARCH` in a space-separated format as follows: ```shell [Service] AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH ``` To unlock advanced file monitoring in Cribl Edge, such as scanning open files for running processes, discovering active logs automatically in Explore, and using the File Monitor Source's auto-mode feature, add `CAP_SYS_PTRACE` : ```shell [Service] AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH CAP_SYS_PTRACE ``` Alternatively, you can use [ACLs to Allow Cribl Edge to Read Files](usecase-edge-acls). For details, see [Running Edge as an Unprivileged User](deploy-runtime-user). ## Using initd To **enable** Cribl Edge to start at boot time with **initd**, you must run the `boot-start` command. If the user that you want to run Cribl Edge does not exist, create that user prior to executing. E.g., running Edge as user `cribl` on boot: ```shell sudo $CRIBL_HOME/bin/cribl boot-start enable -m initd -u cribl ``` This will install an `init.d` script in `/etc/init.d/cribl.init.d`, and will start Cribl Edge at boot time as user `cribl`. A `-configDir` option can be used to specify where to install the script. If not specified, this location defaults to `/etc/init.d`. If necessary, change ownership for the Cribl Edge installation: ```shell sudo chown -R cribl $CRIBL_HOME ```shell To **disable** starting at boot time, run the following command: ```shell sudo $CRIBL_HOME/bin/cribl boot-start disable ``` To control Cribl Edge, you can use the following initd commands: ```shell sudo service cribl-edge [start|stop|restart|status] ``` ### Persisting Overrides on initd Notes on preserving required permissions across restarts and upgrades: > To read file resources on a Linux system that are typically restricted to the root user, you can add the `CAP_DAC_READ_SEARCH` capability. For example: > > On some OS versions (such as CentOS), you must add an `-i` switch to the `setcap` command. For example: > `# setcap -i cap_dac_read_search=+ep $CRIBL_HOME/bin/cribl` > > **Important**: Upgrading Edge will remove the `CAP_DAC_READ_SEARCH` capability from the `cribl` executable, so you'll need to re-run the appropriate `setcap` command after each upgrade. > {.box .warning} ############################################################ # SOURCE: https://docs.cribl.io/edge/os-tuning.md ############################################################ # OS Tuning for Large Deployments Large on-prem deployments that handle high connection volumes or data rates may require operating system (OS) tuning to maintain optimal performance. To prevent performance issues on high-load Edge Nodes, you might need to tune your OS. Review and apply the following OS-level configurations to address common bottlenecks like connection tracking table exhaustion and buffer overruns, ensuring stable operation for your Cribl environment. > The parameters described in this section are Linux kernel and operating system settings, not Cribl Edge configuration options. They directly affect how the OS handles network connections and system resources for high-throughput Cribl Edge workloads. {.box .warning} ## Connection Tracking (Netfilter) **Applies to:** Worker Nodes (handling high volumes of inbound network connections.) In deployments where you expect a high number of inbound connections, Linux netfilter connection tracking (`conntrack`) could become a bottleneck. Connection tracking is enabled by default on most Linux distributions and maintains a table of active network flows. When this table fills up, the kernel drops packets, which can cause connection failures and data loss. ### When to Tune Monitor your system logs (`/var/log/messages` or `journalctl \-k`) for messages indicating conntrack table exhaustion: `nf_conntrack: table full, dropping packet` If you observe these messages, you should increase the `conntrack` table size and potentially adjust related parameters. #### Key `Conntrack` Parameters These `sysctl` parameters govern connection tracking behavior: - `net.netfilter.nf_conntrack_max`: Maximum number of flows tracked concurrently. By default, it derives from the buckets value: `nf_conntrack_max= nf_conntrack_buckets × 4.` - `net.netfilter.nf_conntrack_buckets`: Hash buckets for the `conntrack` table. If not set at module load, the kernel computes a default from total system memory (roughly `total memory in bytes / 16384`) with floor and ceiling limits applied. For the full list of netfilter `conntrack sysctls` and their defaults, see [Netfilter Conntrack Sysfs variables](https://www.kernel.org/doc/html/v5.14/networking/nf_conntrack-sysctl.html). #### Check Current Values and Live Load Use the following commands to inspect your current conntrack configuration and active connection count: ```shell # Current max entries sysctl net.netfilter.nf_conntrack_max # Current active tracked flows (count) sysctl net.netfilter.nf_conntrack_count # Alternatively via procfs cat /proc/sys/net/netfilter/nf_conntrack_max cat /proc/sys/net/netfilter/nf_conntrack_count ``` Compare the count against the max. If the count approaches or equals the max during normal operation, you need to increase capacity. ### Method 1 (Recommended): Increase the `conntrack` Table Size {#meth1} This is the standard and generally recommended approach to eliminate `conntrack` bottlenecks by simply giving the table more capacity. To ensure stability, set the maximum number of tracked flows high enough to maintain adequate margin above your peak observed load. For very large deployments handling hundreds of thousands of concurrent connections, you may need values of 4 million or higher. ```shell # For example, to set approximately 2 million tracked connections (adjust per sizing) echo "net.netfilter.nf_conntrack_max=2097152" >> /etc/sysctl.conf sysctl -p ``` Adjust the value based on your deployment's actual connection load. > If you substantially increase `nf_conntrack_max`, review `nf_conntrack_buckets` for balance. By default, the kernel derives buckets from available memory, and max defaults to approximately 4 times the bucket count. Maintaining this ratio helps ensure efficient hash table performance. {.box .warning} ### Method 2 (Extreme Case): Disable Connection Tracking In extremely high-throughput, purpose-built environments where Cribl Stream is the only service and network overhead is a top concern, disabling conntrack entirely can be considered an aggressive measure. While this is often the simplest and most effective measure for some on-prem deployments, approach it with caution due to its side effects. #### How to Disable conntrack (Persistent) To prevent the module from loading at boot: ``` echo "install nf_conntrack /bin/true" >> /etc/modprobe.d/disable-conntrack.conf ``` > Disabling conntrack is **NOT generally recommended** and carries significant consequences: >* Breaks stateful firewalls: Most modern firewall rules (iptables, nftables) rely on conntrack for stateful filtering. Disabling it will break stateful firewalls, requiring a complete rewrite of your rules to be stateless. >* Breaks NAT/Kubernetes: Network Address Translation (NAT) and IP masquerading are heavily dependent on conntrack. Disabling it will break networking for container technologies like Kubernetes and Docker. {.box .warning} #### Kubernetes Deployments If you run Cribl Edge on Kubernetes, **do not disable netfilter or conntrack**. Kubernetes networking (including kube-proxy and network policies) depends on conntrack for proper operation. Tune conntrack parameters as described in [Method 1](#meth1) instead. ### File Descriptor Limits **Applies to:** Leader and Worker Nodes The Cribl Edge systemd unit sets `LimitNOFILE=65536` by default, which aligns with our minimum recommendation. This limit applies per process (not systemwide or per user), meaning the API and each Worker Process can each open up to `65,536` file handles. This is generally more than sufficient for high-volume workloads, including those involving: * File-based Destinations (S3, Filesystem, etc.), especially with partition expressions that possess a high cardinality. For details, see [Amazon S3 Better Practices](/stream/usecase-s3-better-practices/). * Large numbers of concurrent inbound and outbound connections For more information on running Cribl Stream as a service, see [Run Cribl Stream](/stream/run-stream/). ### Diagnosing `Too Many Open Files` Error The default value is typically sufficient for normal operation. Increasing the limit is generally not the correct fix; it usually only postpones the necessity of identifying and resolving the root cause of the process hitting the resource ceiling. Start your investigation by determining which process is affected. The `cribl.log` file will reflect a `too many open files` error, referencing one of two error codes: * `EMFILE` (`Too many open files`): This means the per-process limit has been reached. This is the common case that the LimitNOFILE setting addresses. * `ENFILE` (`File table overflow`): This means the systemwide (kernel-level) limit for all open files has been reached. The fix for this (increasing the `fs.file-max sysctl`) is outside the scope of this section, as it's rarely encountered. The scenario that leads to the common `EMFILE` error is usually the API Process being overwhelmed due to Worker Processes being too busy. The API Process always receives the connection attempt first, then hands the file descriptor off to a Worker Process. The `EMFILE` condition typically occurs when a large number of clients (on the order of thousands) establish connections that are not closed have excessively long timeouts. Since Worker Processes are often unable to accept the handoff of these file descriptors from the API, the API Process accumulates thousands of connections waiting to be serviced. This accumulation of active or stuck connections rapidly exhausts the file descriptor limit for the API Process. The proper fix, therefore, is to address why the Worker Processes are too busy. Start by analyzing your Pipelines using the Pipeline Profiling feature to identify bottlenecks and reduce Worker load. For details, see [Pipeline Profiling.](/stream/data-preview/#pipeline-profiling) ### How to Increase the Per-Process Open File Limit (if Necessary) If, after investigation, you've confirmed that the workload legitimately requires more file handles (such as, in extremely large, high-volume, or unique deployments), you can increase this per process limit via a systemd override: ```shell # Create or edit the systemd override sudo systemctl edit cribl ``` Add the following (example) content: ``` [Service] LimitNOFILE=262144 ``` Save the file and restart the Cribl Stream service for the change to take effect: ```shell sudo systemctl restart cribl ``` You can verify the current limit for running processes by checking `/proc//` limits for any Cribl Edge process. ```shell # For exampalefor PID 7284 cat /proc/7284/limits ``` ### UDP Receive Buffers **Applies to:** Worker and Edge Nodes (Nodes hosting UDP input Sources). For high-rate UDP ingest (such as Syslog, NetFlow, or IPFIX), the default kernel UDP receive buffers may be insufficient, leading to packet drops before data reaches Cribl Stream. Increasing these buffers can significantly reduce packet loss. #### When to Tune Cribl recommends tuning UDP buffers to accommodate short-lived but large data spikes. Tuning UDP buffers is recommended to accommodate short-lived but large data spikes. Before tuning the buffer size, you should confirm that the data is being properly distributed across all the Worker Nodes in the Group. If the data is improperly load-balanced and only hitting a subset of your Nodes, you must address the distribution issue first. Fixing the load balancing might resolve the packet drop problem entirely, making buffer adjustments unnecessary. For permanent solutions to consistently high data volume, scaling your environment (adding more worker processes or nodes) is the correct approach. Monitor for UDP packet drops using: ```shell # On modern operating systems, check for packet receive errors using ss ss -ua # Alternatively, if ss is unavailable netstat -su ``` Look for increases in `packet receive errors` or `RcvbufErrors` under the UDP section. ### Method 1: Kernel-Level Tuning (System-Wide OS Configuration) This method applies the buffer increase to **all** UDP sockets on the system. Increase the kernel's UDP receive buffer sizes: ```shell # Set to 25 MB (adjust based on your volume) echo "net.core.rmem_max=26214400" >> /etc/sysctl.conf echo "net.core.rmem_default=26214400" >> /etc/sysctl.conf # Apply the changes immediately without rebooting: sysctl -p ``` ### Method 2: Per-Input via Cribl Stream Configuration We generally recommend configuring the buffer size within Cribl Stream (on the specific UDP Source) for two main benefits: * **Portability:** The setting becomes part of your Cribl Stream configuration, ensuring it is automatically applied to newly deployed Nodes without requiring manual OS tuning on each one. * **Scope:** The larger buffer is applied only to the specific UDP sockets used by Stream Sources that have this setting defined, avoiding the general application to all system sockets. Start with `25` MB and adjust based on your data rates and observed drop rates. For detailed UDP tuning guidance specific to Cribl Stream, see: * [Syslog Source - UDP Tuning](/stream/sources-syslog/) * [UDP (Raw) Source](/stream/sources-raw-udp/) ### SELinux Configuration **Applies to:** Leader, Worker, and Edge Nodes. In hardened environments running SELinux in enforcing mode, ensure proper SELinux contexts are set on Cribl directories to allow Stream to operate correctly. Use SELinux audit logs to troubleshoot any denials and adjust policies as needed. For detailed guidance on running Cribl Stream with SELinux, see [SELinux Configuration](/stream/usecase-selinux/). ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-runtime-user.md ############################################################ # Run Edge as an Unprivileged Linux User Run Cribl Edge as an unprivileged (non-root) Linux user. --- Privileged access might be necessary if Cribl Edge needs to read certain resources (e.g., `/var/log/*`), or to listen on low ports 1-1024. Features like auto-discovery of logs and information in the Processes UI also require permissions to access `/proc`. The regular non-root permissions are not sufficient in these cases. There are two alternatives to running Cribl Edge as `root`: - Set Linux capabilities that grant Cribl Edge sufficient rights to perform specific privileged tasks. For details, see [Set Capabilities for Cribl Edge](#cap) below. - Take advantage of Linux systems' option to layer an Access Control List (ACL) over the default Linux permissions. By using ACLs, you can assign a more specific set of permissions to a file or directory without (necessarily) changing the base ownership. For details, see [Using ACLs to Allow Cribl Edge to Read Files](usecase-edge-acls). ## Set Capabilities for Cribl Edge {#cap} Capabilities are permissions that grant privileged processes sufficient rights to accomplish a specific task, based on a kernel privilege. To run Cribl Edge as non-root user, consider setting the following capabilities: | Capability| Permissions| |--|--| | `CAP_NET_ADMIN` | Allows Cribl Edge to identify network listeners on the node. | | `CAP_NET_BIND_SERVICE` | Allows Cribl Edge to push Sources that bind to TCP/UDP port numbers below `1024`. | | `CAP_DAC_READ_SEARCH` | Allows the `cribl` user to access files in **Explore** > **Files** > [Manual/Browse](explore-edge-linux#file-discovery-modes), and to access the File Monitor Source's [Manual mode](sources-file-monitor#discovering-and-filtering-files-to-monitor) feature. This capability bypasses the default Linux permissions for files and directories.| | `CAP_SYS_PTRACE` | Allows the `cribl` user to scan open files for running processes, to discover active logs in **Explore** > **Files** > [Auto](explore-edge-linux#file-discovery-modes), and to access the File Monitor Source's [Auto-mode](sources-file-monitor#discovering-and-filtering-files-to-monitor) feature. | For details about setting these capabilities, see [Persisting Overrides](deploy-boot-start#persisting-overrides). #### Making Docker Containers Visible to Edge {#make-containers-visible} You can enable Cribl Edge to access statistics and information about any running container on its host. To do this, add the `cribl` user to the `docker` group, then restart Cribl Edge. ## OS-Specific Options To read file resources on a Linux system that are typically restricted to the root user, you can add the `CAP_DAC_READ_SEARCH` capability. For example: On some OS versions (such as CentOS), you must add an `-i` switch to the `setcap` command. For example: `# setcap -i cap_dac_read_search=+ep $CRIBL_HOME/bin/cribl` Upgrading Edge will remove the `CAP_DAC_READ_SEARCH` capability from the `cribl` executable, so you'll need to re-run the appropriate `setcap` command after each upgrade. ## Fallbacks from Privileged Access If installing and running Edge with `root`-level privileges is forbidden or impractical in your environment, certain Sources, like Exec and System Metrics, can run on a user with lower permissions. You can also run the File Monitor Source in `Manual` mode, and collect from any files that this user can read. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-rpm.md ############################################################ # Install Edge on Linux via RPM Install Edge in a tightly managed Linux environment by using the signed RPM package installation method. --- The RPM will create a `cribl-edge` user and a `cribl-edge` group. The `cribl-edge` user will own the `cribl-edge` configuration file (stored in the `/etc/sysconfig` directory). The `config` file contains the Leader's auth token. To keep the Leader's auth token secure, only `root` and the `cribl-edge` user can read/modify the `config` file contents. ## Download Cribl Edge as an RPM Package To download Cribl Edge as a signed RPM package: 1. Go to [cribl.io/download](https://cribl.io/download/). 1. Select the dropdown in the Software area labeled **Select Release Version**. 1. Choose the Cribl Edge RPM version and type: ` x64 Cribl Edge RPM`, or ` ARM Cribl Edge RPM`. 1. Select **Download now**. ## Verifying the RPM Package Signature To verify the RPM package signature, you'll need to enable local GPG package checking, then download the GPG key, import it, and verify its signature. We'll go over how to accomplish both of these steps below. ### Enable Local GPG Package Checking Your environment may not have the GPG check for local packages enabled by default. To enable the local package GPG checks for `yum` or `dnf`, add `localpkg_gpgceheck=1` to the `main` stanza in: - `/etc/yum/conf` for `yum` - `/etc/dnf/dnf.conf` for `dnf` For example: ``` [main] ... localpkg_gpgcheck=1 ``` ### Download and Import the GPG Key Cribl's public GPG key ensures the authenticity and integrity of the Cribl RPM package. 1. Import the public GPG key to `rpm` using this command: ``` rpm --import https://cdn.cribl.io/dl/CRIBL_RPM_PUBLIC_GPG ``` 1. Verify the package signature using this command: ``` rpm -Kv ``` This command ensures the package's integrity and authenticity, and returns information about the package. It also checks if anyone has tampered with the package since the original developer or distributor signed it. This helps prevent you from installing potentially malicious or compromised packages. ## Installing Edge via RPM Follow the installation steps to install the RPM package on a Cribl Linux Edge Node. > Out of the box, the RPM will install the software into the `/opt` directory. > The RPM package will configure but not enable the Systemd service. You will > need to enable the software service separately. {.box .info} To install Cribl Edge via RPM: 1. Ensure you have an authentication token prepared on the Leader. See [Create a New Provisioning Token](securing-auth-token#create) for more information. 1. Open a CLI and run the following command, drawing the file name from the [cribl.io/download](https://cribl.io/download/) page: ``` sudo yum install https://cdn.cribl.io/dl// ``` > You can quickly get the CDN file name from the checksum links for each download. {.box .success} This command does the following: - Creates the `cribl-edge` user and group, if it doesn't exist. - Puts the contents of Cribl's TGZ into `/opt/cribl-edge` and makes `root/root` the owner. - Creates the `cribl-edge` systemd service, which is disabled by default. - Creates `/etc/sysconfig/cribl-edge.conf` owned by `cribl-edge:cribl-edge` and only accessible by the `cribl-edge` user. - Creates `/var/lib/cribl-edge/` owned by `cribl-edge:cribl-edge` and only accessible by the `cribl-edge` user. - Sets `CRIBL_INSTALL_TYPE` to `RPM` in the service destination, to block distributed upgrades, as upgrading from the Leader bypasses the security of RPM. - Sets `CRIBL_VOLUME_DIR` to `/var/lib/cribl-edge` in the service destination, so configs and logs are saved to the `cribl-edge` directory. 1. Edit the environment variables in `/etc/sysconfig/cribl.conf`, in order for Cribl Edge to connect to a Leader. The RPM installs `cribl-edge` in standalone mode by default (`CRIBL_DIST_MODE = edge`).
To deploy Edge in a managed deployment, edit these environment variables: - `CRIBL_DIST_MODE = managed-edge` - `CRIBL_DIST_LEADER_URL=tls://@leader:4200` 1. Enable optional Linux capabilities. `CAP_DAC_READ_SEARCH` lets you read files without ownership/permission checks (such as `/var/log/nginx` or application logs under service accounts), and `CAP_SYS_PTRACE` lets you trace processes and read `/proc//` data. To enable them, add this configuration key to the systemd service file, located at `/etc/systemd/system/cribl-edge.service` or `/lib/systemd/system/cribl-edge.service`: ```shell [Service] AmbientCapabilities=CAP_DAC_READ_SEARCH CAP_SYS_PTRACE ``` 1. Enable the service: - `sudo systemctl enable cribl-edge` to enable the service on boot. - `sudo systemctl start cribl-edge` to start it manually. ## Upgrading Edge via RPM See [Upgrade RPM Installations](upgrade-nodes-manually#rpm). ## Uninstalling Edge via RPM To remove Cribl that you installed via RPM, use the command line: ``` sudo yum remove cribl-edge ``` Uninstalling Cribl removes the `cribl` or `cribl-edge` service, the `cribl` binary from `/opt/`, and the service file from `/lib/systemd/system`. Configuration files are maintained, along with any environment variables you edited when you first installed Cribl. This means you can pull in your previous configuration(s) if you decide to reinstall Cribl via RPM. The `cribl-edge` directory is also maintained, along with the data, logs, and defaults of your configuration. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-deb.md ############################################################ # Install Edge on Linux via .deb Install Cribl Edge in a Linux environment using a .deb package. --- The installation conforms to restrictions for Linux installations, such as [system requirements](requirements#linux-requirements). ## Install Cribl Edge from a .deb Package Follow these steps to install an Edge Node on Linux from a .deb package: 1. Download the Cribl Edge .deb package. Go to [cribl.io/download](https://cribl.io/download/) and select the dropdown in the Software area labeled **Select Release Version**. 1. Choose the Cribl Edge .deb version and type: ` x64 Cribl Edge DEB`, or ` ARM Cribl Edge DEB`. 1. Select **Download now**. 1. Open a CLI and run the following command to install the package with the apt utility: ```shell sudo apt install ``` This command does the following: - Creates the `cribl-edge` user and group, if it doesn't exist. - Puts the contents of the Cribl package into `/opt/cribl-edge` and makes `root/root` the owner. - Creates the `cribl-edge` systemd service, which is disabled by default. - Creates `/etc/default/cribl-edge` owned by `cribl-edge:cribl-edge` and only accessible by the `cribl-edge` user. - Creates `/var/lib/cribl-edge/` owned by `cribl-edge:cribl-edge` and only accessible by the `cribl-edge` user. - Adds the Cribl Edge service definition file at `/lib/systemd/system/cribl-edge.service`. - Sets `CRIBL_INSTALL_TYPE` to `DEB` in the service definition, to block distributed upgrades, as upgrading from the Leader bypasses the security of a .deb package. - Sets `CRIBL_VOLUME_DIR` to `/var/lib/cribl-edge` in the service definition, so configs and logs are saved to the `cribl-edge` directory. 1. Edit the environment variables in `/etc/default/cribl-edge`, so Cribl Edge can connect to a Leader. The .deb package installs `cribl-edge` in standalone mode by default (`CRIBL_DIST_MODE = edge`).
To deploy Edge in a managed deployment, edit these environment variables: - `CRIBL_DIST_MODE=managed-edge` - `CRIBL_DIST_LEADER_URL=tls://@leader:4200` 1. During installation, the package configures but does not enable the systemd service. Enable the service: - `sudo systemctl enable cribl-edge` to enable the service to start on boot. - `sudo systemctl start cribl-edge` to start it manually. > To ensure that the `cribl status` command can run correctly when running via systemctl, > set the `CRIBL_VOLUME_DIR` environment variable: > > ```bash > sudo bash > export CRIBL_VOLUME_DIR=/var/lib/cribl > ``` {.box .success} ## Upgrade a .deb Installation See [Upgrade .deb Installations](upgrade-nodes-manually#deb). ## Uninstall a Cribl Edge .deb Package To remove Cribl Edge that you installed from a .deb package, run: ```shell sudo apt remove ``` Uninstalling removes the `cribl-edge` service, the `cribl` binary from `/opt/`, and the service file from `/lib/systemd/system`. Configuration files are maintained, along with any environment variables you edited when you first installed Cribl. This means you can pull in your previous configuration(s) if you decide to reinstall Cribl via a .deb package. The `cribl-edge` directory is also maintained, along with the data, logs, and defaults of your configuration. ############################################################ # SOURCE: https://docs.cribl.io/edge/fips-mode.md ############################################################ # FIPS Mode for Cribl Edge (Linux) Federal Information Processing Standards [FIPS](https://www.nist.gov/standardsgov/compliance-faqs-federal-information-processing-standards-fips) represent a set of US government standards and guidelines for information security. You can deploy Cribl Edge in **FIPS mode**. This mainly restricts the cryptographic algorithms used within Cribl Edge and also enforces FIPS compliant password requirements. > Do not start Cribl Edge without FIPS mode enabled, or else you will be unable to run it in FIPS mode later. You must enable FIPS mode as described in this section, after installing **but before starting** Cribl Edge. {.box .warning} ## Requirements {#fips-requirements-overview} This section describes the system and password requirements for FIPS mode. ### FIPS Mode System Requirements To run Cribl Edge in FIPS mode, your environment must satisfy the following requirements. #### Operating Systems Must support FIPS [140-2](https://csrc.nist.gov/pubs/fips/140-2/upd2/final) or FIPS [140-3](https://csrc.nist.gov/pubs/fips/140-3/final). Several Linux distributions meet this standard. See NIST's list of tested configurations [here](https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4282). > While RHEL 9 can be configured to run in FIPS mode at the operating system level, this **does not automatically enable FIPS mode within Cribl Edge.** You must still follow the procedures outlined in this document to explicitly enable Cribl Edge's FIPS mode. Cribl Edge relies on its own configuration to ensure FIPS compliance, independent of the OS-level FIPS setting. {.box .warning} ##### OpenSSL The operating system environment must have a FIPS validated version of OpenSSL installed. - **For Cribl Edge versions 4.5.0 through 4.8.1**: The FIPS provider version must be 3.0.8 or 3.0.9, and the system-wide OpenSSL version must also be [3.0.8](https://www.openssl.org/blog/blog/2023/05/29/fips-3-0-8/) or [version 3.0.9](https://www.openssl.org/blog/blog/2024/01/23/fips-309/index.html), with its associated certificate. - **For Cribl Edge starting with version 4.8.2**: The FIPS provider version requirement must be >= 3.0.5, and the system-wide OpenSSL version is no longer a factor. Cribl Edge now verifies the OpenSSL version bundled within the binary. Enterprise Linux 9 is the only version of Enterprise Linux that includes OpenSSL version 3.0.9 out of the box. While it's possible to manually install compatible versions of OpenSSL on older Enterprise Linux versions, this process is complex and generally not recommended. Therefore, the minimum recommended Enterprise Linux version for running Cribl Edge in FIPS mode is 9. Even when running Cribl Edge on a FIPS-enabled RHEL 9 system, you must still explicitly enable Cribl Edge's FIPS mode as described in the [Running Cribl Edge in FIPS Mode](#running-fips) section below. The OS being in FIPS mode is not sufficient for Cribl Edge to operate in a FIPS-140 compliant manner. ### FIPS Mode Restrictions on Cryptographic Algorithms When running in FIPS mode, Cribl Edge uses only those cryptographic algorithms that satisfy the FIPS standards. This means that Cribl Edge operates exclusively with FIPS-compliant cryptographic algorithms, disallowing the use of non-compliant algorithms like MD5 (message-digest) or CRC-32 (Cyclic Redundancy Check 32) algorithms. To ensure proper functionality in FIPS mode, the FIPS provider version must be at least `3.0.5`. Therefore, in FIPS mode: **[Cribl expressions](cribl-reference) that rely on MD5 or CRC-32 will fail silently.** This includes expressions that use the [`C.Mask.md5()`](expressions-mask#cmaskmd5) method and can in turn affect the behavior of parent Functions and their existing parent Pipelines. **The UI will hide certain options** normally made available by the typeahead feature. **No Source, Destination, or Email Notification target that uses the Amazon AWS SDK v2 will perform checksums.** This is because that SDK uses MD5 to verify checksums, and it applies to both incoming or outgoing payloads. Specifically: - The [Amazon Kinesis Data Streams Source](/stream/sources-kinesis-streams) will not perform checksums and the **Verify KPL checksums** setting will not be available. - The [Amazon SNS Notification target](aws-sns-notification-targets) will not perform checksums. - The following Destinations will not perform checksums: - [Amazon CloudWatch Logs](destinations-cloudwatch-logs) - [Amazon Kinesis Data Streams](/stream/destinations-kinesis-streams) - [Amazon SQS](destinations-sqs) - [Google Cloud Storage](destinations-google-cloud-storage) - [MinIO](destinations-minio) - [Prometheus](destinations-prometheus) ### Role-Based Access Control (RBAC) Controls {#rbac} Cribl Edge's FIPS mode requires [RBAC](/iam/roles-policies#rbac-concepts) to be enabled for enhanced security. This ensures proper access management within FIPS-compliant environments. To enable RBAC, the Cribl Edge instance has to be running in Distributed mode. FIPS mode is available on certain license tiers. For details, see [Pricing](https://cribl.io/pricing/). If FIPS mode is already enabled and RBAC is subsequently disabled, Cribl Edge will automatically disable FIPS mode and log a message stating: `"Disabling FIPS due to Role-based Access Control (RBAC) being disabled."` Check `/local/_system/instance.yml` to ensure Cribl is running in Distributed mode. The default installation directory is typically `/opt/cribl`. The `mode` setting in this file should be set to `distributed`. If it is set to `standalone`, you will need to switch to a Distributed deployment to use FIPS mode with RBAC enabled. ### FIPS Mode Password Rules {#password-rules} When Cribl Edge is in FIPS mode, all passwords must: - Contain eight or more characters. - Use characters from three or more of the following categories: - Lowercase letters. - Uppercase letters located after the first character in the password. - Digits located before the last character in the password. - Non-alphanumeric ASCII characters such as `#`, `!`, or `?`. - Non-ASCII characters such as `ñ`, `€`, or emoji. As of Cribl Edge version 4.5.0, these rules apply for all passwords, whether or not Cribl Edge is running in FIPS mode, with one exception: * For Cribl Edge not running in FIPS mode, local users whose passwords existed before Cribl Edge 4.4.4 was released can continue to use their passwords, even if those passwords do not satisfy the rules. * When these users change to new passwords, the new passwords must satisfy the rules. * New users must create passwords that satisfy the rules. > If you get locked out of your account, you need to [reset](/iam/authentication#manual-pwd) your password manually. > {.box .info} ## Running Cribl Edge in FIPS Mode {#running-fips} To begin using Cribl Edge with FIPS enabled, complete either the [non-systemd](#fips-non-systemd) or the [systemd](#fips-systemd) procedure below, **before you start Cribl Edge for the first time after installing**. ### Enabling FIPS Mode on a Non-systemd Distribution {#fips-non-systemd} If the Linux distribution on which you run Cribl Edge **does not** use systemd: 1. Complete **either** of the two following steps: - Set the `CRIBL_FIPS` environment variable to `1` (true), **or**, - Edit `cribl.yml`, adding this top-level element: ``` fips: true ``` Note that `fips: true` is the entire top-level element. For this element, the following "stanza" syntax would be incorrect - **do not** use it: ``` # stanza syntax is incorrect for the fips element # even if other elements use it fips fips: true ``` 2. If you have installed a non-default OpenSSL binary (otherwise, skip this step): * Run the following command, and in the output, note the values of `MODULESDIR` and `OPENSSLDIR`. ``` version -a ``` * Set `OPENSSL_MODULES` to the value of `MODULESDIR`. * Set `CRIBL_OPENSSL_DIR` to the value of `OPENSSLDIR`. 3. Ensure [RBAC](#rbac) is configured in Cribl Edge. 4. Start Cribl Edge. Finally, verify that you are in FIPS mode as explained [below](#verify-fips). ### Enabling FIPS Mode on a systemd Distribution {#fips-systemd} If the Linux distribution on which you run Cribl Edge **does** use systemd: 1. Run the following command, and in the output, note the values of `MODULESDIR` and `OPENSSLDIR`. (As shown, the command will run the default OpenSSL binary. If you have installed a different OpenSSL binary, you can modify the command to run that one instead.) ``` openssl version -a ``` 2. Run the following command, replacing the placeholders with the relevant paths from your environment. (This assumes that you do not already have a `nodejs.cnf` file. If you **do** have one, complete the [workaround](#nodejs-cnf-workaround) below instead of this step.) ``` generateFipsConf -d ``` If you encounter issues generating the FIPS configuration file, a discrepancy in the OpenSSL path might be the cause. For more detailed troubleshooting specific to RHEL 9, refer to the knowledge base article: [Installing Cribl Edge in FIPS Mode on RHEL 9](https://knowledge.cribl.io/stream-54/installing-cribl-stream-in-fips-mode-on-rhel-9-120).
An example of a successful command and its output: ``` useralice@123456791234:/# /opt/cribl/bin/cribl generateFipsConf -d /lib/usr/ssl /opt/cribl/state/nodejs.cnf ``` This command creates `nodejs.cnf` - the configuration file that NodeJS uses to run in FIPS mode as Cribl Edge starts. 3. Run the following command to open an empty temporary file in an editor: ``` systemctl edit cribl ``` 4. Add the following content to the file, replacing the first placeholder with the value of `MODULESDIR` that you noted in Step 1, and the second with the path to your `nodejs.cnf` file: ``` [Service] Environment="OPENSSL_MODULES=" Environment="OPENSSL_CONF=" ``` 5. Save and exit the editor. 6. Run the following commands to reload the systemctl overrides and start Cribl: ``` systemctl daemon-reload systemctl start cribl ``` 7. Finally, verify that you are in FIPS mode as explained [below](#verify-fips). #### When a `nodejs.cnf` File Already Exists {#nodejs-cnf-workaround} If you already have a `nodejs.cnf` file, replace Step 2 [above](#fips-systemd) with the following workaround: 1. Create a file with the following content, replacing `` with the value of `OPENSSLDIR`. Name the file something other than `nodejs.cnf`. ``` nodejs_conf = nodejs_init openssl_conf = nodejs_init .include //fipsmodule.cnf [nodejs_init] providers = provider_sect [provider_sect] default = default_sect # The fips section name should match the section name inside the # included fipsmodule.cnf. fips = fips_sect [default_sect] activate = 1 ``` 2. Resume the [main procedure above](#fips-systemd), starting with Step 3. ### Verify FIPS Mode {#verify-fips} - On the Leader or Edge Node, search `cribl.log` for this message: ``` "level":"info","message":"running with FIPS enabled", "OpenSSLVersion":"3.0.13+quic","OpenSSLFIPSProviderVersion":"3.0.8" ``` - The presence of the above message confirms that Cribl Edge is in FIPS mode. When you log in as `admin` - you will be prompted to enter a FIPS compliant password. ############################################################ # SOURCE: https://docs.cribl.io/edge/usecase-edge-acls.md ############################################################ # Use ACLs to Allow Cribl Edge to Read Files Running Cribl Edge as an unprivileged user is a best practice. However, without modifying the default Linux permissions, you will run into issues in accessing files owned by other users. ![Default Linux permissions](ed-linux-permissions.b2f0bcc9e4.png) {border="false"} Linux systems allow you to layer an Access Control List (ACL) on top of the default Linux permission set. With ACLs, you can apply a more specific set of permissions to a file or directory without (necessarily) changing the base ownership and permissions. For details, see [Introduction to ACLs](https://www.redhat.com/sysadmin/linux-access-control-lists). As an example, you might want to read data from the `/var/log` directory. This directory is typically owned by the `root` user, with a permission set of `750` on the directory. This means the `cribl` user will not be able to read or list the files in the directory, because the `Other` group has zero permissions. To achieve compliance with benchmarks such as CIS or NIST, we can use the ACLs to grant the `cribl` group access to this folder and any files, without disturbing the current permissions. > ##### CIS Benchmark 4.2.3 > > Make sure that permissions are configured on all log files. Log files must have the correct permissions to ensure that sensitive data is archived and protected. `Other/world` should not have the ability to view this information. `Group` should not have the ability to modify this information. > {.box .info} To accomplish this, we can grant the `cribl` group `read` and `execute` access to the files and directories inside `/var/log`, by running this command: ```shell setfacl -Rm g:cribl:r-X /var/log ``` Breaking down the command's options': - `-R` : Recursive - `-m` : Modify - `g:cribl` = `cribl` group, this could be `u:cribl` if you wanted to limit to the `cribl` user. - `r-X`: Read and execute. Capital `X` means execute only on directories. This modifies only the current files in the directory, if you want the appropriate ACL applied to any future files created here, add the `-d` flag (for default): ```shell setfacl -Rdm g:cribl:r-X /var/log ``` Now, any rotated or created files will apply the ACL set. ## Checking the ACLs To verify the ACLs on a file or directory, run the following command: ```shell getfacl ``` This will output a listing of the applied ACLs, including the directory's defaults: ```shell $ getfacl / # file: # owner: # group: user::rwx group::rwx other::--- default:user::rwx default:user::rwx default:group::rwx default:mask::rwx default:other::--- ``` ## Installing ACL Utilities The ACL utilities might not be installed, by default, on the OS. For example, on Ubuntu (Debian-based) systems, you will need to install the `acl` package. For Debian-based tools using [apt](https://en.wikipedia.org/wiki/APT_(software)): ```shell apt install acl ``` For Red Hat-based tools using [yum](https://en.wikipedia.org/wiki/Yum_(software)): ```shell yum install acl ``` ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-win.md ############################################################ # Cribl Edge on Windows Check the options and limitations for running Cribl Edge on Windows. --- Cribl Edge on Windows offers easy-to-use tools for exploring and collecting Windows events. You can run Cribl Edge on a supported Windows environment and collect events via the Windows Events API. Cribl provides signed installers and executables to ensure installation and runtime integrity, protect against tampering, and facilitate deploying and running Cribl Edge in strictly controlled environments. ## Limitations Cribl Edge on Windows is currently subject to the following limitations: ### Modes Cribl Edge on Windows supports only the following modes: - `Edge: Single` - `Edge: Managed Edge (managed by Leader)` This means you can't switch Cribl Edge on Windows into Cribl Stream mode (Single-instance, Worker, or Leader). You can, however, switch between the Cribl Edge supported modes via the UI, in **Settings** > **Distributed Settings** > **Mode**. > Do not select an unsupported mode from this drop-down! Doing so will cause the > Cribl service to fail. {.box .warning} ### Sources and Destinations Cribl Edge on Windows supports the same [Sources](sources) and [Destinations](destinations) as Cribl Edge on Linux, with the following exceptions: - The [Kubernetes Logs](sources-kubernetes-logs) and [Kubernetes Metrics](sources-kubernetes-metrics) Sources. Cribl Edge on Windows does not support Kubernetes deployments. - The [Kafka](destinations-kafka) Destination does not support Kerberos authentication on Windows. ### Sources on Windows Only The following Sources are available **only** when running Cribl Edge on Windows (not on Linux): - [Windows Event Logs](sources-windows-event-logs) - [Window Metrics](sources-windows-metrics) ### Functions The [Grok Function](grok-function) is unavailable on Windows. If you include it in a Pipeline, Cribl Edge processing will skip over it. ### Data Formats Cribl Edge on Windows does not support reading or writing Parquet files. This is a limitation on the following Destinations: Amazon S3, Azure Blob Storage, MinIO, and FileSystem/NFS. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-windows.md ############################################################ # Install Cribl Edge on Windows Install and deploy Cribl Edge Nodes on-prem on Windows. --- You can install Cribl Edge in a [supported Windows environment](#os-requirements). ## Minimum Requirements The following requirements are the minimum for installing and running an Edge Node on Windows. > Below is a summary of requirements for a Cribl Edge deployment. > See [Requirements](requirements) for more detailed information. {.box .warning} ### OS Requirements Cribl Edge supports these versions of Windows: |
Version
|Notes| |-------------|----------------| |Windows 10 and 11| You can deploy Cribl Edge on laptops, desktops, and workstations running Windows 10 and 11.
Keep these things in mind when deploying Cribl Edge on Windows 10 and 11 workstations:
  • Cribl Edge might lose some data sent to TCP Destinations after a workstation resumes from a suspended or sleep state. This happens when the data is in local network buffers but hasn't been sent out to the Destination. Instead, you can send data to an HTTP Destination.
  • You might see partially broken events after a laptop resumes from a suspended state.
  • HTTP Destinations might contain duplicate events.
  • Some users have observed excessive logging when a Leader is unavailable to receive heartbeat messages from an Edge Node.
| | Windows Server 2016
Windows Server 2019
Windows Server 2022
Windows Server 2025 | Functionality is the same as generally supported Windows Server platforms. | ### Application Requirements Minimum application requirements for Edge Nodes are: - ~1 Ghz processor - 1024 MB RAM - 5 GB free disk space per volume for operational purposes ## Before You Install Cribl Edge on Windows 1. Set a compatible browser as your default browser: Microsoft Edge, Firefox, or Chrome. (Cribl supports the five most-recent versions of these browsers. Cribl Edge does not support Internet Explorer.) 1. Ensure that the required ports are available (see [Ports](ports)). 1. Ensure you have an authentication token prepared on the Leader. See [Create a New Provisioning Token](securing-auth-token#create) for more information. 1. Review [Windows User Permissions and Requirements](deploy-windows-msi-options) for important details regarding user accounts and installer settings. 1. Go to the Cribl [Download page](https://www.cribl.io/download) and set the **Software** drop-down to `Cribl Edge for Windows`. 1. Select **Download Now** to get the `.msi` installer. If you want to connect the Edge Node to a Cribl.Cloud Leader, get the **Leader URI** from your Cloud instance like this: 1. Navigate to the [**Manage Edge Nodes**](managing-edge-nodes) page. 1. From the **Add/Update Edge Node** control at upper right, select **Bootstrap new**. 1. Select **Add Windows**. 1. Copy the **Leader or Outpost hostname/IP** value. 1. The **Leader Port** field is `4200`. > To install Cribl Edge, you might need to add exceptions to your antivirus or endpoint security tools (such as Windows Defender). For details, see [Stop Endpoint Security from Blocking Edge on Windows​](deploy-antivirus-exceptions#endpoint-sec). {.box .warning} You now have two installation options: - Launch the `.msi` to install via an interactive [wizard](#wizard). - Use the `.msi` to install via a [command prompt](#cli), or to script bulk installs. Either method installs Cribl Edge as a Windows service. This enables Cribl Edge to automatically restart whenever the Windows Server reboots. ## Install Edge on Windows Using the Wizard {#wizard} 1. Select the Cribl Edge `.msi` to launch the Cribl Edge Setup Wizard. Select **Next** to start. 1. Read the **End-User License Agreement** and check the box to accept the terms. For the most current copy and details, see [Terms of Service](https://cribl.io/legal/cribl-subscription-services-agreement/). 1. On the wizard's next page, confirm or change the **Destination Folder**. (The default path is `C:\Program Files\Cribl`). 1. If the installer detects a config file from a previous Cribl Edge installation, the modal will ask you if you want to keep your current config or create a new config file for the installation. Select **Keep config** to persist your previous configurations stored in the `instance.yml` file. 1. Select either **Managed** or **Single-instance** as the installation type. See [Type of Deployment](deploy-planning#type-of-deployment) for information on these options. If you chose **Keep config** in the previous window, the installer will skip the installation type selection. > For Cribl.Cloud, select **Managed**. {.box .cloud} 1. If you select **Managed** mode, enter the Leader hostname or IP address, port, auth token, and optionally the Fleet and any tags. For details on getting these credentials from Cribl.Cloud, see [Retrieve Cribl.Cloud Credentials](#cloud-creds). For sites using secure TLS connections to the Leader, including Cribl.Cloud, ensure that **Enable TLS** is selected. ![Connection Details](wizard-managed-settings.png) {border="true"} 1. Select a Windows account type for the Cribl Edge service: - **Local System Account**: The default account type. This is a local Windows service account that does not have a corresponding user profile. - **Username / Password**: Enter your **Username** and **Password** credentials to run Cribl Edge. To successfully log Cribl Edge as a service, you might need to include the domain name in the **Username**. 1. Optionally, select **Set Environment Variables** to set environment variables for the Edge service during installation. You can only add variables here, not remove them. ![Set Environment Variables](environment-variables1.png) {border="true"} In this example screenshot, HTTP and HTTPS proxy settings are being defined to enable Cribl Edge to communicate through corporate proxies, with each variable specified on a separate line. > Setting environment variables is optional and typically not needed for standard installations. This feature is primarily used for special configurations such as configuring proxy settings, enabling FIPS compliance mode, or other advanced scenarios. {.box .info} If you've already provided environment variables via the command line, or if there are existing variables, the UI will be pre-populated with these values when you open it. 1. Optionally, you can create a desktop shortcut. 1. On the final **Ready to Install** page, select **Install** to confirm. ![Installation summary](ed-windows-install-4.7d20fd6f8e.png) {border="true"} 1. When installation is complete, the Edge Node should report to the Leader. In a Single-instance deployment, you can select the Cribl Edge icon on your Desktop or in File Explorer. This will launch the Cribl Edge login page in your default browser. Or go to `http://localhost:9420` and log in with default credentials (`admin`:`admin`). ## Install Edge on Windows Using the Command Line {#cli} To install Cribl Edge on Windows from the command line, you can either use the Leader UI to concatenate and copy/paste the [bootstrap script](edge-nodes-add-update#bootstrap), or construct and customize the command yourself. > If you want to configure different installation or data directory locations than the default, > see [Configure Installation Directories](#install-dirs). {.box .info} ### Install Edge via Bootstrap Script Using the Cribl Edge UI, you can add or update Windows Edge Nodes in your existing deployment. To add or update a Windows Edge Node via a bootstrap script: 1. In your Cribl Edge instance, select **Edge Nodes** from the sidebar (you can also select **Fleets**). 1. Select **Add/Update Edge Node** then **Windows** > **Add** or **Update**. 1. Fill out the fields in the Add Windows Node window. The scripts update in real-time as you change the fields. ![Add or update a Windows Edge Node](add-windows-node-4101.png) {border="true" scale="75%"} 1. Copy and paste the resulting bootstrap script into a command prompt. 1. The result is a new Edge Node configured with the options you chose. You should see the Edge Node appear in the **Edge Nodes** list. For more information about adding or updating Edge Nodes via the bootstrap script, see [Adding and Updating Edge Nodes](edge-nodes-add-update). #### Log the Time of Installation The Windows bootstrap script includes a log file with a string of zeros (`/log "%SYSTEMROOT%\Temp\cribl-msiexec-0000000000000.log"`). You can replace the zeros with a timestamp in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (in milliseconds), to log when you first installed the Windows Node. For example, if you're adding a Windows Node on October 4, 2024 at 6:07:44 PM Pacific Time, update the log file in the script to `/log "%SYSTEMROOT%\Temp\cribl-msiexec-1728090464000.log"`. This log is included in the Cribl Edge diag, which is helpful for troubleshooting issues with Windows Node deployments. > When the Leader initiates an upgrade of Cribl Edge, the log file name will > automatically include Unix time in milliseconds as the timestamp. {.box .success} ### Install Edge via Custom Command To install Cribl Edge via command line directly, use the following command for a silent install: ```shell msiexec /qn /i cribl---.msi MODE=mode-managed-edge HOSTNAME= PORT=4200 AUTH= FLEET= ``` For example: ```shell msiexec /qn /i cribl-4.18.2-fd1f0d2f-win32-x64.msi MODE=mode-managed-edge HOSTNAME=192.0.2.1 PORT=4200 AUTH= FLEET=myFleet ``` ### Set MSI Installer Properties You can customize your installation command by using MSI properties. See [MSI Installer Properties Reference](#msi-ref) for a full filst of available properties. #### Configure TLS The installer by default configures the Edge Node to use TLS. If you want to disable TLS, add `TLS=false` to the command. #### Set Multiple Environment Variables To set one or more environment variables during installation, use the `SETENVVARS` parameter with pipe-delimited key-value pairs. The entire string must be quoted: ```shell msiexec /qn /i cribl--.msi setenvvars="HTTP_PROXY=http://203.0.113.1:8080|HTTPS_PROXY=http://203.0.113.1:8080|CRIBL_DIST_WORKER_PROXY=socks5://203.0.113.1:1080|NODE_EXTRA_CA_CERTS=C:\Temp\mitmproxy-ca-cert.pem" MODE=mode-managed-edge HOSTNAME= PORT=4200 AUTH= FLEET=myfleet ``` Environment variables specified here take precedence over existing environment variables already configured for the service. This ensures that command-line specifications take precedence over existing configurations, while preserving any previously set variables not explicitly overridden. The variable names and values cannot contain the pipe character ("|") as it's used as the separator. #### Persist Data Between Installations For prior versions, use the flag `COPYDATA=1` to persist data between installs. `COPYDATA` copies the `instance.yml` file from `C:\Program Files\Cribl` to `C:\ProgramData\Cribl`. You can now manage this node from the specified Leader. > If you want to run Edge as a Single-instance deployment on your own machine, > you do not need to provide any parameters to the installer. > Instead, enter the following at your command prompt for a silent install: > > ```shell > msiexec /qn /i cribl---.msi > ``` > > Next, go to `http://localhost:9420` and log in with default credentials (`admin:admin`). {.box .info} #### Configure Installation Directories {#install-dirs} When installing Cribl Edge on Windows via the command line, you can configure the directories for the application binaries and runtime data. These options are intended for first-time installs only. Changing the installation or data directory is explicitly disallowed during an upgrade. To change directories for an existing installation, you must perform a full uninstall and then start a new installation with the desired paths. ##### Change the Installation Directory If you want to change the installation directory during a first-time install, use the `APPLICATIONROOTDIRECTORY` property in your `msiexec` command. For example: ```shell msiexec.exe /i cribl--.msi APPLICATIONROOTDIRECTORY="C:\test\" /log "C:\Log\CriblInstall.log" ``` If you're using PowerShell to run the silent install, add two extra pairs of quotes to escape the command's own quote delimiters. For example: ```shell msiexec.exe /i cribl--.msi APPLICATIONROOTDIRECTORY="""D:\Custom\Cribl\""" MODE=mode-managed-edge HOSTNAME= PORT=4200 AUTH= /qn ``` ##### Change the Data Directory Location By default, Cribl Edge stores its runtime data in `C:\ProgramData\Cribl`. To choose a non-default data directory during a first-time install, use the `VOLUMEDIR` property in your `msiexec` command. `VOLUMEDIR` specifies the runtime data location, not where application binaries are stored. If the directory doesn't already exist, the installer creates it. ```shell msiexec /qn /i cribl--.msi VOLUMEDIR=D:\CriblData MODE=mode-managed-edge HOSTNAME=192.0.2.1 PORT=4200 AUTH= FLEET=myfleet ``` This stores runtime data in `D:\CriblData` instead of the default `C:\ProgramData\Cribl`, while keeping application binaries in `C:\Program Files\Cribl`. If you completely uninstall and then reinstall Cribl Edge but want to reuse the existing data directory, you can add `KEEPDATA=1` to preserve configuration, state, and logs in that directory. For example: ```shell msiexec /qn /i cribl--.msi VOLUMEDIR=D:\CriblData MODE=mode-managed-edge HOSTNAME=192.0.2.1 PORT=4200 AUTH= FLEET=myfleet KEEPDATA=1 ``` #### MSI Installer Properties Reference {#msi-ref} The following table lists installer properties specific to the Cribl Edge MSI package, along with their descriptions. These properties allow you to customize your Cribl Edge installation when using the `msiexec` command. | Installer Property | Description | | ------------------ | ----------- | | `MODE` | Deployment mode for Cribl Edge. For example, use `mode-managed-edge` for a managed node. If not specified, a Single-instance deployment is implied. | | `HOSTNAME` | Leader's hostname or IP address used when installing Cribl Edge in `mode-managed-edge`.| | `PORT`| Leader port used when installing in `mode-managed-edge`. The default port is `4200`. | | `AUTH` | The authentication token required for the Edge Node to connect to the Leader. | | `FLEET`| Fleet to assign the new Edge Node to. | | `SETENVVARS` | Multiple environment variables to be defined for the installed Cribl Edge service. Pass a string of pipe-delimited `KEY=VALUE` pairs. This property injects environment variables into the service's configuration at installation time. | | `KEEPDATA` | How data is treated when Cribl Edge is uninstalled, then reinstalled. When set to `1`, the installer preserves configuration, state, and logs, ensuring your data is not overwritten. | | `USERNAME` | Windows account under which the Cribl Edge service will run. Examples include `LocalSystem` (the default) or a specific user account. | | `PASSWORD` | Password for the username, only valid when using a specific user account (not LocalSystem). | | `APPLICATIONROOTDIRECTORY`| Installation directory for the Cribl Edge application binaries. This is where the core program files will be placed. | | `VOLUMEDIR` | Separate directory for Cribl Edge's runtime data, including configurations, logs, and state information. This allows you to store data independently from the application binaries. | | `TAGS` | List of comma-delimited tags to assign to the Edge Node. | | `TLS`| TLS for Leader communication. Enabled by default. Set to `false` to disable. | ### Set Logging Options To debug `.msi` installation or upgrade issues, you can run `msiexec.exe` to set logging options. See Microsoft's [Logging Options](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec#logging-options) topic. ## Change Configuration After Installation After the installation is complete, if you need to update any settings you configured during installation, make use of the [`mode-managed-edge`](cli-mode-managed-edge) command (or [`mode-edge`](cli-mode-edge) for Single-instance deployment). Running this command resets all the related options. This means that even if you want to change only one option, you also need to provide values for all the other arguments. ## Troubleshooting Here are some common challenges you can encounter when deploying Cribl Edge on Windows. ### Upgrading a Pre-4.3.0 MSI Installation MSIs older than 4.3.0 install Cribl Edge so it belongs to the user running the installer. If you later try to upgrade it as another user, the upgrade can result in a mix of the old and new package contents on disk. We recommend adding `ALLUSERS=1` to the `msiexec` command when installing or upgrading versions older than 4.3.0 for testing. Example command: ```shell msiexec /i cribl--.msi /qn MODE=mode-managed-edge HOSTNAME= PORT=4200 AUTH= FLEET=myfleet USERNAME=LocalSystem ALLUSERS=1 ``` ### Debugging MSI Installations For troubleshooting an MSI installation that does not pull configuration settings from the Leader Node, you need to know the log path on Windows. The full path depends on where you chose to install. `$INSTALL_PATH\cribl\log` and `local\edge\` are the log location and conf location, respectively. ### Installation Issues with Leader Auth Token If you encounter problems installing newer versions of Cribl Edge, this may be due to Leader Auth token issues. To resolve: 1. Verify the Auth token is correct, current, and has not been revoked in your Leader Node. 1. Check network connectivity between Edge Nodes and the Leader. 1. Validate successful connections with both Cribl Edge and Cribl Stream products after installation. ### Installing or Upgrading Nodes with Endpoint Security {#endpoint-sec} If you are having trouble installing or upgrading Cribl Edge, check for antivirus or other endpoint security tools that may be blocking the `cribl` process (like Windows Defender). To install Cribl Edge, you may need to add temporary or permanent exceptions to these tools. See [Stop Endpoint Security from Blocking Edge on Windows](deploy-antivirus-exceptions#endpoint-sec) for details. ### Cribl Edge Installed an `nssm.exe` Process `nssm.exe` is a wrapper for the `cribl.exe` binary. It gives Windows Service Manager the ability to manage an executable program without having to provide a number of required binary APIs on the executable. So, instead of the `cribl.exe` binary needing to provide the APIs, `nssm.exe` acts as an intermediary, providing the necessary APIs itself and subsequently spawning `cribl.exe` as a child process. The `nssm.exe` process ensures that Cribl Edge is stable and reliable on Windows, both by booting up Cribl Edge and restarting it for you. With the `nssm.exe` process running, Cribl Edge remains operational even if it closes unexpectedly. While some antivirus software might flag `nssm.exe` due to its monitoring and restart functionality, `nssm.exe` is a legitimate and essential component of Cribl Edge. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-windows-msi-options.md ############################################################ # Windows User Permissions and Requirements Learn what user accounts and administrator privileges you need to run Cribl Edge on Windows. --- When installing Cribl Edge on Windows, it's important to distinguish between two user accounts: - **Installer User:** This is the user account you use to run the Cribl Edge installer (MSI). This user must have `administrator` privileges to install the software and create the Cribl Edge service. - **Service Account:** This is the user account the Cribl Edge service runs under. This account needs appropriate permissions to access your data and APIs. If you want to perform Leader-initiated Edge Node upgrades across a Fleet, the account also requires `administrator` privileges. `LocalSystem` (the default account) already has those privileges. See [Service Accounts and Edge Node Upgrades](#upgrade) for more information. ## Required Administrator Privileges Ensure you launch the installer (MSI) from a command-line interface (command prompt or PowerShell) that is running with full administrator privileges. Simply being logged in as an `administrator` might not be sufficient; you need to explicitly **Run as administrator**. ## Service Account Configuration You have three options to choose from when selecting the service account to run Cribl Edge as: two passwordless options (`LocalSystem` and MSA/gMSA), and local user. - **LocalSystem**: Cribl Edge on Windows, by default, runs under the `LocalSystem` account (also referred to as `SYSTEM`). This is a predefined system account with extensive privileges on the local machine. It is a passwordless account, meaning it cannot be logged into interactively, and no password is associated with it. - **Managed Service Accounts (MSA/gMSA)**: You can use Managed Service Accounts (MSA) or Group Managed Service Accounts (gMSA) for the Cribl Edge service. These accounts provide automatic password management and improve security posture. MSA/gMSA are passwordless options. Refer to Microsoft documentation for details: [Group Managed Service Accounts Overview](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/group-managed-service-accounts/group-managed-service-accounts/group-managed-service-accounts-overview). - **Virtual Service Account**: You can use Cribl Edge with a Virtual Service Account (VSA), a type of Windows-managed local account that allows the service to run with the necessary permissions without requiring a password. Refer to Microsoft documentation for details: [Virtual Accounts](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-service-accounts#virtual-accounts). - **Local user**: You can configure Cribl Edge to run under a local user. > Avoid storing passwords in scripts or config files. Exposed credentials jeopardize the local system and any networked resources accessible by that account. > {.box .warning} > If you installed Cribl Edge using one service account type, > you can't switch to a different type while performing an upgrade. > If you want to use a different account type, uninstall and reinstall Cribl Edge with the desired account type. {.box .info} ### Service Account Username and Password During installation, depensing on the service account you are using, you may need to specify the username and/or password for the account. You can do it, for example, by using the `USERNAME` and `PASSWORD` parameters with the `msiexec` command. The following table summarizes whether username and/or password is required depending on the service account type: | Service Account Type | Username | Password | |--------------------------------|-----------|-----------| | `LocalSystem` | x | x | | gMSA (Managed Service Account) | ✓ | x | | VSA (Virtual Service Account) | ✓ | x | | Local user | ✓ | ✓ | The following is an example `msiexec` command using the `LocalSystem` account (note the absence of `USERNAME` and `PASSWORD` parameters): ```shell msiexec /i cribl--.msi /qn ^ MODE=mode-managed-edge ^ HOSTNAME= ^ FLEET= ^ AUTH= ``` > This and following examples use command prompt line-continuation syntax (`^`). > If you are using PowerShell, replace `^` with `` ` `` (backtick). {.box .success} #### Username with gMSA or VSA Using gMSA or VSA requires specifying the username in the full form: - **gMSA**: `domain\gmsaAccountName$` - **VSA**: `NT SERVICE\Cribl` These two options do not require you to provide a password. To install Edge and run the service under a gMSA, you can use the following command: ```shell msiexec /i cribl--.msi /qn ^ MODE=mode-managed-edge ^ HOSTNAME= ^ FLEET= ^ AUTH= ^ USERNAME= ``` To install Edge and run the service under a VSA, use the following command: ```shell msiexec /i cribl--.msi /qn ^ MODE=mode-managed-edge ^ HOSTNAME= ^ FLEET= ^ AUTH= ^ USERNAME="NT SERVICE\Cribl" ``` #### Username with a Local User When running as a local user, the user name can take the form of `domain\user` or `user@domain`. Select **OK** in the installer's user prompt to show the resolved user name. The following example shows how to specify the local user name and password: ```shell msiexec /i cribl--.msi /qn ^ MODE=mode-managed-edge ^ HOSTNAME= ^ FLEET= ^ AUTH= ^ USERNAME= ^ PASSWORD= ``` ## User Requirements To successfully run the Edge service under a specific user account, Managed Service Accounts (MSA), Group Managed Service Accounts (gMSA), or Virtual Service Account (VSA), the following requirements must be met. ### Group Memberships The user must be a member of the following groups: * Event Log Readers * Network Configuration Operators * Performance Log Users * Performance Monitor Users * Users (default) ### User Rights The user must have the "Manage Auditing and Security Log" right, which can be assigned via Local Security Policy or Group Policy tools. ## Service Accounts and Edge Node Upgrades {#upgrade} Upgrading Windows Edge Nodes in a Fleet (Leader-initiated upgrade), is performed by running the MSI installer in the background. The service account that runs the upgrade must have administrator permissions, otherwise the installer will fail. When you run the Cribl Edge service as `LocalSystem` (default), you can run upgrades in a Fleet without additional steps, because `LocalSystem` already has the required permissions to perform upgrades. To run a Fleet upgrade with MSA/gMSA, add the account to the local administrators group. Configuring MSA/gMSA as an administrator lets you run Edge Node upgrades, but also grants broader privileges to the service account. If you want to avoid it, keep the MSA/gMSA as a non-admin service account and perform Edge upgrades manually. See [Upgrade Edge Nodes Manually](upgrade-nodes-manually) for information on how to do it. ## Troubleshooting If you encounter issues, check the Windows Event Viewer for error messages related to the installation or the Cribl Edge service. For detailed installer logs, use the `/log logfile.txt` option with `msiexec`. Also, check the Cribl logs themselves for more application-specific information. ############################################################ # SOURCE: https://docs.cribl.io/edge/proxy-config-win.md ############################################################ # System Proxy Configuration on Windows Configure the proxy server to handle HTTP/S requests on Windows. --- You can direct all outbound HTTP/S requests to go through proxy servers. ## Enable Proxy Server First, you need to make sure the proxy server is enabled. There are a two ways to do it, using Windows system settings and Group Policy Objects. ### Windows Proxy Settings To enable the proxy server for all processes and services on a host, you can use the system proxy settings: 1. In Windows settings go to **Network & Internet** > **Proxy**. 1. Under **Manual proxy setup**, toggle **Use a proxy server** to **On**. 1. In the **Address** and **Port** boxes, enter the proxy server name or IP address and (optionally) port. 1. Confirm with **Save**. ### Group Policy Object Alternatively, you can use a Windows Group Policy Object to enable the proxy server across groups of accounts or groups of servers. See [Microsoft Q&A thread](https://learn.microsoft.com/en-us/answers/questions/1263144/setting-up-gpo-for-proxy-settings#answers) for a detailed instruction. ## Communication with Leader over Proxy If you outbound TCP connection from an Edge Node to the Leader must go through proxy, you need to set the [`CRIBL_DIST_WORKER_PROXY`](environment-variables#cribl_dist_worker_proxy) environment variable: `CRIBL_DIST_WORKER_PROXY=://:@:` ## HTTP and/or HTTPS? {#proxy-protocol} Several Cribl Edge endpoints rely on the HTTPS protocol - the Cribl [telemetry endpoint](/billing-licensing/on-prem-licensing#telemetry-data) - which must be accessed with some license types, as well as the CDN used to propagate application updates, certain documentation features (API Reference and docs PDFs), and config bundle downloads. You might configure certain other Cribl Edge features that require access to HTTP endpoints. For maximum flexibility, consider setting environment variables to handle both the HTTPS and HTTP protocols. ## Authenticating on Proxies You can use HTTP Basic authentication on HTTP or HTTPS proxies. To do this, [during installation](deploy-windows#wizard) set the `HTTP_PROXY` and `HTTPS_PROXY` environment variables and specify the user name and password in the proxy URL: |Variable|Value| |---|---| |`HTTP_PROXY`|`http://:@:`| |`HTTPS_PROXY`|`https://:@:`| ## Bypassing Proxies with `NO_PROXY` {#bypass} If you've set the above environment variables, you can negate them for specified (or all) hosts. Add the `NO_PROXY` environment variable to identify URLs that should bypass the proxy server, to instead be sent as direct requests. Use the following format: ```shell NO_PROXY="" ``` Cribl recommends including the Leader Node's host name in the `NO_PROXY` list. #### `NO_PROXY` Usage {#bypass-usage} Within the `NO_PROXY` list, separate the host/domain names with commas or spaces. Optionally, you can follow each host/domain entry with a port. If not specified, the protocol's default port is assumed. To match subdomains, you must either list them all in full (for example, `NO_PROXY=foo.example.com,bar.example.com`), or apply a wildcard by prefixing the domain name with a period or `*.`: `NO_PROXY=".example.com` or `NO_PROXY="*.example.com`. To match the whole domain including its subdomains, add it both with and without wildcard to the list: `NO_PROXY="example.com,.example.com`. To disable all proxies, use the `*` wildcard: `NO_PROXY="*"`. `NO_PROXY` with an empty list disables no proxies. #### Cloud `NO_PROXY` Usage {#bypass-cloud} You must include any cloud metadata endpoints (such as the [AWS Instance Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html)) in the `NO_PROXY` list: - AWS EC2 and Azure VM instances must include `169.254.169.254` in the list. If using IPv6 on AWS EC2, add `fd00:ec2::254` to the list. - AWS ECS Fargate tasks must include `169.254.170.2`. - GCP (Google Cloud Platform) VM instances must include `metadata.google.internal` and `169.254.169.254`. ## Where Proxies Apply Proxy configuration is relevant to the following Cribl Edge components that make outbound HTTP/S requests: ### Destinations * [S3 Compatible Stores](destinations-s3) * [Amazon Kinesis Data Streams](destinations-kinesis-streams) * [AWS CloudWatch Logs](destinations-cloudwatch-logs) * [AWS SQS](sources-sqs) * [Azure Blob Storage](destinations-azure-blob) * [Azure Monitor Logs](destinations-azure-monitor-logs) * [Cribl HTTP](destinations-cribl-http) * [CrowdStrike Falcon LogScale](destinations-humio-hec) * [Elasticsearch](destinations-elastic) * [Grafana Cloud](destinations-grafana_cloud) * [Honeycomb](destinations-honeycomb) * [Loki](destinations-loki) * [Prometheus](destinations-prometheus) * [Splunk HEC](destinations-splunk-hec) * [Webhook](destinations-webhook) ### Notification Targets * [PagerDuty](notifications-targets#pagerduty) * [Webhook](notifications-targets#webhook) ## Testing Proxies {#proxy-test} To initially test your proxy configuration, consider setting up a simple, free proxy server like mitmproxy (https://mitmproxy.org), and then monitoring traffic through that server. Verify that you can trace proxied requests from your Cribl Edge instance, and can validate that outgoing requests (to [Destinations](destinations)) are working properly. ############################################################ # SOURCE: https://docs.cribl.io/edge/windows-troubleshooting.md ############################################################ # Windows Troubleshooting When running Cribl Edge on Windows, you can encounter the following issues. Read on to find the proposed solutions. > For potential issues you can encounter during installation of Windows Edge Nodes, > see [Windows Installation Troubleshooting](deploy-windows#troubleshooting). {.box .info} ## Windows Event Fields Configuration If you're encountering issues when collecting Windows events in both `JSON` and `XML` modes, it's likely due to improper configurations. To resolve: 1. Configure Windows events via `XML` format in Cribl Edge (recommended over `JSON`). 1. Build a basic Pipeline/transformation to ensure all expected fields are present. 1. Verify fields are in the desired format after processing. 1. Consider implementing data reduction in your pipeline to optimize usage. ## PowerShell Performance Issues with Windows Sources PowerShell-based collection for System State, Windows Metrics, and Windows Event Log Sources is a legacy option that will be removed in a future release. We highly recommend keeping this option disabled and using the newer native capabilities. To disable PowerShell-based collection: 1. Upgrade to Cribl Edge `4.13.x` or newer. 1. Disable **Advanced Settings** > **Use Windows Tools**. The optimized non-PowerShell collection methods provide better performance and reliable data ingestion. ## CPU/Memory Issues on Windows If you notice high CPU/Memory usage on your Windows Cribl Edge Nodes: - [Create a Fleet](fleets) dedicated to Windows Nodes, and constrain Windows Sources to that Fleet. - If you want to collect logs only, disable the Windows Metrics Source. - The [Users and Groups collector](sources-system-state#users-groups) in the System State Source can trigger high CPU utilization in the Windows `lsass.exe` process where there are many user accounts on the host. This is not uncommon on Domain Controllers. Consider disabling the User and Groups collector if you see that process consuming excessive CPU. To optimize the Windows Event Logs Source: - During the Windows Event Log capture, run the collection for 10 seconds and tweak the settings if necessary so that collection doesn't always have to catch up. Consider changing the Windows Events Log Batch Size and Frequency. Example command to capture a certain number of events: `measure-command {Get-WinEvent -Oldest -MaxEvents 500 @{LogName='Security'} | ForEach-Object -Process {ConvertTo-Json -Compress $_}}` - For Domain Controllers with heavy log volumes, consider using the Windows Event Forwarder and sending the logs to Cribl Stream, instead of using the Windows Event Log Source in Cribl Edge. - If you're collecting Windows Events Logs in JSON format, you may experience disk space issues. You can either set XML as the event format on the Windows Events Logs Source, or upgrade Cribl Edge to v.4.8.x or newer and toggle off **Use Windows Tools**. See the [Windows Event Logs Source](sources-windows-event-logs#advanced-tab) topic for more details. ############################################################ # SOURCE: https://docs.cribl.io/edge/fips-mode-win.md ############################################################ # FIPS Mode for Cribl Edge (Windows) This guide will walk you through the process of setting up and running Cribl Edge in FIPS (Federal Information Processing Standards) mode on Windows systems. FIPS [140-2](https://csrc.nist.gov/pubs/fips/140-2/upd2/final) or FIPS [140-3](https://csrc.nist.gov/pubs/fips/140-3/final) compliance is required for software deployed in U.S. Federal Government and regulated industries. Cribl Edge supports operation in FIPS mode to meet these requirements. ## Prerequisites * Cribl Edge Windows installer (.msi). * Administrative access to the Windows system. * FIPS-validated OpenSSL provider (instructions below). ## What You Need to Know About Pre-Configuration > Before configuring FIPS-enabled Edge Nodes, ensure your Leader environment is already configured and running in FIPS mode. {.box .warning} * When running in FIPS mode, Cribl Edge uses only FIPS-approved cryptographic algorithms, ensuring all data handling meets Federal security standards. * When connecting to a FIPS-configured Leader, Cribl Edge must also be in FIPS mode for full compliance. ## Set up Cribl Edge in FIPS Mode To set up Cribl Edge in FIPS mode, you'll need to build your own OpenSSL FIPS provider. For details, see [OpenSSL: Notes for Windows platforms](https://github.com/openssl/openssl/blob/master/NOTES-WINDOWS.md#native-builds-using-visual-c). ## Build Your Own FIPS Provider This section guides you through the process of building your own OpenSSL FIPS provider. ### Install Required Tools 1. Install [Strawberry Perl](https://strawberryperl.com/), which includes the Netwide Assembler -- (NASM). 2. Microsoft C++ toolchain (Visual Studio). 3. If you have `git` installed, you may need to rename/move its `perl.exe` to avoid conflicts. ### Build the Provider 1. Find and open the Visual Studio (20XX) Native Tools Command Prompt for `x64` architecture. You can search for it, by typing `x64` in the **Start** menu. Right-click on it and select **Run as administrator**. (Do not use PowerShell or plain CMD). 2. Download the latest FIPS-validated version of OpenSSL: ``` curl -LO https://www.openssl.org/source/openssl-3.0.9.tar.gz tar -xf openssl-3.0.9.tar.gz cd openssl-3.0.9 ``` If you run into an error message: `ERROR: module machine type 'x86' conflicts with target machine type 'x64'`, it means you're not using the right version of the command prompt for what you're trying to do. Make sure you've selected the `x64 Native Tools Command Prompt`. 3. Run the following commands in the Visual Studio Developer Command Prompt (with `x64` architecture selected): ``` perl configure VC-WIN64A enable-fips nmake ``` The build process might take considerable time to complete. Once the build is complete, you'll have a `providers` directory. The providers directory is created within the OpenSSL build directory (for example, `openssl-3.0.9/providers/`).
4. Once built, you'll need the following files from the build directory: * `providers\fipsmodule.cnf` - This specific file from your build is essential as it contains a unique hash that validates the DLL you built. * `providers\fips.dll` * `providers\legacy.dll` ### Set up the Provider This step creates a dedicated directory for Cribl's FIPS-related files and copies the necessary DLL and configuration files into it, preparing the application for FIPS-compliant operation. In the same Native Tools Command Prompt, type the following: ``` mkdir "C:\Program Files\Cribl-FIPS" copy providers\fips.dll "C:\Program Files\Cribl-FIPS" copy providers\legacy.dll "C:\Program Files\Cribl-FIPS" copy providers\fipsmodule.cnf "C:\Program Files\Cribl-FIPS" ``` ### Generate the `nodejs.cnf` Configuration File {#config} This step creates a necessary configuration file that enables FIPS compliance for the `Node.js` environment used by Cribl. You have two options. #### Option 1: Manual Configuration Creation 1. Open an Administrative Command Prompt 2. Run the following command to create and open the configuration file: ``` notepad "C:\Program Files\Cribl-FIPS\nodejs.cnf" ``` 3. Copy and paste the following configuration content into the file: ``` nodejs_conf = nodejs_init openssl_conf = nodejs_init .include "C:\\Program Files\\Cribl-FIPS\\fipsmodule.cnf" [nodejs_init] providers = provider_sect alg_section = algorithm_sect [provider_sect] default = default_sect fips = fips_sect [default_sect] activate = 1 [algorithm_sect] default_properties = fips=yes ``` 4. Save the file and close Notepad. This configuration redirects `Node.js` to use FIPS-compliant cryptographic modules and algorithms. The file includes references to the FIPS module configuration and sets default properties to enforce FIPS compliance across all cryptographic operations. #### Option 2: Using the Cribl CLI (Post-Installation) Alternatively, after installing Cribl Edge, you can generate the configuration file using the Cribl CLI: `cribl generateFipsConf -d ` You can generate the `nodejs.cnf` configuration once on any machine and then distribute it to others, eliminating the need to repeat this step on each individual machine. ## Install Edge with FIPS Configuration {#install} To install Cribl Edge with FIPS mode enabled: 1. Use the `SETENVVARS` parameter with the MSI installer: ``` msiexec /i CriblEdge-.msi SETENVVARS="OPENSSL_MODULES=C:\Program Files\Cribl-FIPS|OPENSSL_CONF=C:\Program Files\Cribl-FIPS\nodejs.cnf" ``` 2. This opens the Windows Installer Wizard. Choose `Managed Mode` and complete the configuration to connect to the FIPS-enabled Leader. When executing the MSI installer command, pay attention to these important parameter requirements: * The pipe character (`|`) separates multiple environment variables. * Make sure to enclose the entire `SETENVVARS` string in quotes. * `OPENSSL_MODULES` points to the directory containing the provider files. * `OPENSSL_CONF` points to the specific configuration file. Alternatively, you can set the environment variables through the Installation Wizard: ![Set Environment Variables](environment-variables.png) {border="true"} For details, see [Install Cribl Edge on Windows](deploy-windows). ## Confirm Cribl Edge is in FIPS Mode After installation, validate that Edge is running in FIPS mode by checking for FIPS initialization messages: 1. On the Leader or Edge Node, search `cribl.log` for this message: ``` "level":"info","message":"running with FIPS enabled", "OpenSSLVersion":"3.0.13+quic","OpenSSLFIPSProviderVersion":"3.0.8" ``` 2. In the UI, navigate to: **Node Settings** > **Diagnostics** > **System Info**. The presence of the above message confirms that Cribl Edge is in FIPS mode. ## Troubleshooting If Edge fails to start after FIPS configuration: - Verify that all required files exist in the specified locations. - Check that the `nodejs.cnf` properly references the location of `fipsmodule.cnf`. - Review Edge logs for specific error messages related to FIPS initialization. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-macos.md ############################################################ # Cribl Edge on MacOS Learn about running Cribl Edge on macOS. --- Cribl Edge on macOS offers easy-to-use tools for exploring and collecting macOS events. You can run Cribl Edge on a supported macOS machine to collect logs and track local files. Edge on macOS does not include support for system metrics or system state at this time. See below for a more detailed list of limitations. ## Limitations Cribl Edge on macOS is subject to the following limitations. ### Modes Cribl Edge on macOS supports only the following modes: - `Edge: Single` - `Edge: Managed Edge (managed by Leader)` This means you can't switch Cribl Edge on macOS into Cribl Stream mode (Single-instance, Worker, or Leader). You can, however, switch between the Cribl Edge supported modes via the UI, in **Settings** > **Distributed Settings** > **Mode**. > Do not select an unsupported mode from this drop-down! Doing so will cause the > Cribl service to fail. {.box .warning} ### Sources and Destinations Cribl Edge on macOS supports the same [Sources](sources) and [Destinations](destinations) as Cribl Edge on Linux, with the following exceptions. #### Unavailable Sources The following Sources are unavailable on macOS - [System Metrics](sources-system-metrics) Source - [System State](sources-system-state) Source #### Unavailable Destinations The following Destination is unavailable on macOS: - [Amazon Security Lake](destinations-security-lake) Destination #### Other Limitations on Sources and Destinations Other limitations include: - The [Kafka](destinations-kafka) Destination does not support Kerberos authentication on macOS. - The [File Monitor](sources-file-monitor) Source only allows **Manual** discovery mode, not **Auto**. ### Functions The [Grok Function](grok-function) is unavailable on macOS. If you include it in a Pipeline, Cribl Edge processing will skip over it. ### Data Formats Cribl Edge on macOS does not support reading or writing Parquet files. This is a limitation on the following Destinations: Amazon S3, Azure Blob Storage, MinIO, and FileSystem/NFS. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-macos.md ############################################################ # Install Cribl Edge on MacOS Install and deploy Cribl Edge Nodes on-prem on macOS. --- You can install Cribl Edge in a supported macOS environment to collect logs and track local files. ## Supported MacOS Versions {#supported-versions} Cribl Edge supports the following macOS versions: - 26.x (Tahoe) - 15.x (Sequoia) - 14.x (Sonoma). You can install Cribl Edge using the same universal binary on both Intel and Apple silicon processors. ## Before You Install Cribl Edge on MacOS 1. Set a compatible browser as your default browser: Microsoft Edge, Firefox, Safari, or Chrome. (We support the five most-recent versions of these browsers. Cribl Edge is not compatible with Internet Explorer.) 1. Ensure that the required ports are available (see [Ports](ports)). 1. Ensure you have an authentication token prepared on the Leader. See [Create a New Provisioning Token](securing-auth-token#create) for more information. 1. Go to the Cribl [Download page](https://www.cribl.io/download) and set the **Software** drop-down to `Cribl Edge for macOS`. 1. Select **Download now** to get the `.pkg` installer. You can also install a macOS Edge Node in a Distributed deployment by running the [bootstrap script](edge-nodes-add-update#bootstrap) in your command prompt. Run the bootstrap script with `sudo`. ## Install Cribl Edge From the command line, you can install and configure Cribl Edge to act either as a Single-instance deployment, or as a managed Node. 1. To install Cribl Edge from the package you downloaded, enter the following at your command prompt: ```shell sudo installer -pkg .pkg -target / ``` This will install Cribl Edge to `/opt/cribl/`. > To prevent issues with Cribl file operations, `/opt/cribl` and all its subdirectories must reside on the same device. > Mounting separate devices within `/opt/cribl` is not recommended. > For external storage needs, such as lookups or persistent queues (PQs), > create a completely separate directory outside of `/opt/cribl`. {.box .warning} 1. Set `/opt/cribl` as your `$CRIBL_HOME` directory. > To make the [`$CRIBL_HOME`](environment-variables#cribl_home) environment variable available on your command line, you can: > > - Assign it once, using the `export` command: `export CRIBL_HOME=/opt/cribl` > - Set it as a default, by adding it to your terminal profile file. > {.box .info} 1. Set the installation mode to `mode-managed-edge` to connect the Node to the designated Leader: ```shell sudo /opt/cribl/bin/cribl mode-managed-edge / -H / -p / -u / [-g ] ``` - The new Node will be assigned to a [Fleet](fleet-management) on the Leader, either `default_fleet`, or a different one according to [Fleet mappings](mapping-edge-nodes). - You can manually point to a specific Fleet by providing its name as `-g `, but Fleet mappings will override this choice. > If you only need a Single-instance deployment of Cribl Edge (without a Leader), > do not change the mode. Cribl Edge will run in `mode-edge` automatically. {.box .info} 1. Restart the Cribl service: ```shell sudo /opt/cribl/bin/cribl restart ``` 1. Allow Cribl to run in the background. In macOS system settings, select **General**, then **Login Items & Extensions**. Make sure that Cribl is enabled in **App Background Activity**. ![macOS settings screen with Cribl enabled in App Background Activity](macos-enable-cribl.png) {caption="Enabling Cribl for background activity in macOS settings"} 1. You can now log in to your Leader and locate the newly installed Cribl Edge Node and start configuring [Sources](sources) and [Destinations](destinations), or creating [Routes](routes) and [Pipelines](pipelines). > If you installed a single instance of Cribl Edge without a Leader, > go to `http://localhost:9420` (or another port you defined) and log in with default credentials (`admin:admin`). {.box .info} > For more ways to configure Leader and Edge Nodes, see [Set Up Leader and Edge Nodes](setting-up-leader-and-edge-nodes). {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-macos-jamf.md ############################################################ # Deploy Cribl Edge on MacOS with JAMF Deploy Cribl Edge on macOS machines managed with JAMF Pro. --- If you are using JAMF Pro to manage macOS machines, you may choose to deploy Cribl Edge using JAMF as well. You can do it by getting a bootstrap script for adding Edge Nodes from your Leader, and then configuring a JAMF policy that will run it. See [Add and Update Edge Nodes](edge-nodes-add-update#bootstrap) for more information about the bootstrap script. > Before you start, ensure that your environment meets the [OS and System Requirements](requirements). {.box .success} ## Create Fleet for Edge Nodes on MacOS First, create a new Fleet that will house your macOS Edge Nodes. > Cribl generally recommends creating separate Fleets for different OS platforms. {.box .success} 1. In the sidebar, select **Fleets**, then select **New Fleet**. 1. Give the Fleet a descriptive **Name**, for example, `MacLaptops`, and confirm with **Save**. ## Prepare Bootstrap Script Now, prepare the bootstrap script that will be used to add new Edge Nodes. 1. In the sidebar, select **Fleets**, then select your new `MacLaptops` Fleet. 1. Select **Add/Update Edge Node**, then **macOS**, then **Add**. 1. Check that the target Fleet, the Leader hostname or IP, port, auth token, and any other options have been prefilled correctly, and correct them if necessary. 1. Copy the generated script. ## Use the Bootstrap Script in JAMF Now you will run the script through JAMF Pro to create new Edge Nodes. 1. Log in to your JAMF Pro console. 1. Navigate to **Settings** in the sidebar. Then, in the **Computer management** section, select **Scripts**. 1. Select **New**, give the new script a name (for example, "Install Cribl Edge") and add an optional description. 1. On the **Script** tab, enter the bootstrap script you copied from Cribl Edge. 1. Confirm with **Save**. ## Configure JAMF Pro Policy Finally, you need to ensure JAMF runs the script on the desired macOS machines. 1. In the JAMF Pro console, navigate to **Computers** > **Policies**. 1. Select **New** to create a new policy and give it a descriptive name. 1. In the **Trigger** section, enable **Recurring Check-in** to ensure the policy triggers with the recurring check-in frequency. 1. In **Execution Frequency**, select **Once per computer** to ensure JAMF does not attempt to reinstall Cribl Edge. 1. Select **Scripts**, then in the list of available scripts locate the "Install Cribl Edge" script and select **Add**. With this configuration, JAMF will run the script that deploys Cribl Edge once for every machine it manages, adding the new Edge Nodes to the `MacLaptops` Fleet. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-in-containers.md ############################################################ # Cribl Edge in Containers You can deploy Cribl Edge in containerized environments using Docker or Kubernetes. Running Cribl Edge in a container ensures consistent deployment, simplifying installation and upgrades. Containerization enables easy scaling and management via orchestration tools like Kubernetes. Read the following topics for more information about running Cribl Edge in a container: | Topic | Description | | --- | --- | | [Run Cribl Edge in a Docker Container](deploy-running-docker) | Install Cribl Edge in a container using a Docker image. | | [Deploy Cribl Edge on Kubernetes](deploy-running-kubernetes) | Deploy Cribl Edge in Kubernetes Pods to collect logs, metrics, and events. | | [Upgrading Containers](upgrading-containers) | Upgrade a Cribl Edge instance in a container. | ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-running-docker.md ############################################################ # Run Cribl Edge in a Docker Container Install Cribl Edge in a container using a Docker image. --- You can easily deploy and run Cribl Edge from a container image into a Docker container, making it simple to integrate Cribl Edge into your existing containerized environments. In this article, you'll learn how to pull the Cribl Edge Docker image, configure it, and manage its lifecycle within your containerized environment. ## Add a Docker Node from the Cribl Edge UI As a best practice, we recommend using the UI to create and copy/paste the bootstrap script for adding a Docker node. See our documentation on how to [Add a New Edge Node with a Bootstrap Script](edge-nodes-add-update#bootstrap). ## Start the Container with a Docker Command For a Single-instance deployment, start the container with the Docker command below (replace `4.13.2` in the last line with the version of Cribl Edge you want to install): ```shell docker run -d -e CRIBL_EDGE=1 \ -p 9420:9420 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /:/hostfs:ro \ --privileged \ --restart unless-stopped \ --name cribl-edge \ cribl/cribl:4.13.2 ``` For a Distributed deployment, edit the Docker command below to replace `INSERT_TOKEN` with a unique, [secure token value](securing-auth-token). Then start the container with the revised command. ```shell docker run -d \ -e CRIBL_DIST_MODE=managed-edge \ -e CRIBL_DIST_LEADER_URL=tcp://@leader:4200?group=fleet_name \ -e CRIBL_EDGE=1 \ -p 9420:9420 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /:/hostfs:ro \ --privileged \ --restart unless-stopped \ --name cribl-edge \ cribl/cribl:4.13.2 ``` > With a Leader on Cribl.Cloud, encryption is enabled by default. Set the hybrid > worker's `CRIBL_DIST_LEADER_URL` > [environment variable](environment-variables#cribl_dist_master_url) to begin > with the `tls://` protocol. For example: > > ```shell > CRIBL_DIST_LEADER_URL=tls://@logstream-.cribl.cloud:4200 > ``` > {.box .cloud} Once that's running, the UI displays on `http://localhost:9420/` You can now start configuring Cribl Edge with [Sources](sources) and [Destinations](destinations), or start creating [Routes](routes) and [Pipelines](pipelines). > When a Node in a Kubernetes Fleet restarts, it might receive a new GUID, > which can cause duplicate entries to appear on the **Edge Nodes** page. > To resolve this issue, navigate to **General Settings > Fleet Configuration** > and set **Time to keep disconnected Nodes** to 0. {.box .info} ### Find Edge Nodes Running in a Container Edge Nodes running in a container report additional metadata about the container to the Leader. This helps you quickly identify which of your Edge Nodes are running in a container from the Leader UI and map them to the appropriate Fleets. When Cribl Edge is running in a container, you will see the `hostOs` property in events collected by the [System State Source](sources-system-state). This object will contain properties about the container when they're available, such as: - `arch` - `cpu_count` - `cpu_speed_mhz` - `cpu_type` - `interfaces` - `memory` - `platform` - `release` - `hostname` - `timezone` From the **Mappings** menu, you will also see the `hostOs` property in the **Edge Node info** panel. This object will include the `id`, `addresses`, and `version` of the container when available. > `interfaces` is a set of key-value pairs that contain an array of CIDR values. {.box .info} ## Run Cribl Edge as a Non-Root User You can run the Cribl image as a non-root user within a container using Docker's `--user` option or the user setting in Compose. You can specify any desired `UID` (User ID). To ensure correct functionality, you must set the `CRIBL_VOLUME_DIR` environment variable to a location the non-root user can write to. This is because the software requires write permissions to directories like `/opt/cribl/state`, `/opt/cribl/log`, and `/opt/cribl/local`. Failure to set `CRIBL_VOLUME_DIR` will result in a warning and potential functional issues. If you mount a persistent volume, setting `CRIBL_VOLUME_DIR` to the mount point is strongly recommended for optimal performance and reliability. While `/tmp/cribl_data` might be used, a dedicated persistent volume ensures data integrity and prevents potential data loss or corruption. We recommend specifying `CRIBL_VOLUME_DIR` whenever running as a non-root user to avoid unexpected behavior. See example below: ```shell docker run -d \ -u 999:999 -e CRIBL_DIST_MODE=managed-edge \ -e CRIBL_DIST_LEADER_URL=tcp://@leader:4200?group=fleet_name \ -e CRIBL_EDGE=1 \ -p 9420:9420 \ -e CRIBL_VOLUME_DIR=/tmp/ \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /:/hostfs:ro \ --restart unless-stopped \ --name cribl-edge \ cribl/cribl:4.13.2 ``` > To prevent issues with Cribl file operations, `/opt/cribl` and all its subdirectories must reside on the same device. Mounting separate devices within `/opt/cribl` is not recommended. For external storage needs, such as lookups or Persistent Queues (PQs), create a completely separate directory outside of `/opt/cribl`. While `/opt/cribl` is the default installation path, Cribl can be installed to other locations if necessary. {.box .warning} ## Override Default Ports {#ports-override} You can override default ports in the following [configuration files](/Edge/configuration-files): * Edge UI port (`9420`): Default definitions for `host`, `port`, and other settings are set in `$CRIBL_HOME/default/cribl/cribl.yml`, and can be overridden by defining alternatives in `$CRIBL_HOME/local/cribl/cribl.yml`. * Data Ports, for example HTTP In (`10080`), TCPJSON in (`10420`) have default definitions for `host`, `port` and other settings defined in `$CRIBL_HOME/default/cribl/inputs.yml`, and can be overridden by defining alternatives in `$CRIBL_HOME/local/cribl/inputs.yml`. > In the case of an API port conflict, the process will retry binding for 10 > minutes before exiting. > {.box .info} ## Update the Docker Image and the Packaged OS For details, see the following topics: - [Updating the Docker Image](upgrading-containers#docker-updates) - [Updating the Packaged OS](upgrading-containers#os-updates) ## Shut Down Docker Containers To shut down Docker containers that are running Cribl Edge, use `docker stop` instead of `docker kill`. This allows Docker to shut down the container cleanly. When you run `docker stop` for your Cribl Edge containers, the following happens: - The container runs `cribl stop` and waits for all `cribl` processes to exit before shutting down. - Docker waits up to 10 seconds by default. If this is not enough time for your processes to exit, you can increase the default time using `docker stop -t 30 `. Replace the number `30` in this example with the amount of time you need, in seconds. ## Troubleshooting {#troubleshooting} - When you deploy containers via [Kubernetes](/stream/deploy-kubernetes) in `managed-edge` mode, this Node will - after applying the first config bundle from the Leader - listen on the Fleet's configured **API Server Settings** > **Host**. - If you have Fleets running Edge Nodes with version 4.8.2 and older, you can encounter failing health checks that require specific API server configuration. See [Common Challenges on the Edge](edge-common-challenges#failing-health-checks) for more information. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-running-kubernetes.md ############################################################ # Deploy Cribl Edge on Kubernetes Deploy Cribl Edge in Kubernetes Pods to collect logs, metrics, and events. --- Cribl Edge connects to the Kubernetes Cluster API and the `kubelet` API on each node to read logs, metrics, and events. To correctly collect logs, metrics, and events using its dedicated Sources, the Cribl Edge agent must be deployed as a DaemonSet in your Kubernetes cluster. Use [Cribl-provided Helm charts](#deploy-helm) for most streamlined deployment of Cribl Edge on Kubernetes. If you want to customize your deployment and provide your own manifest, refer to [Deploy Cribl Edge on Kubernetes Without a Helm Chart](#deploy-no-helm). > Cribl Edge supports both Docker and `containerd` runtimes. > {.box .info} ## Deploy Cribl Edge on Kubernetes via Helm Chart {#deploy-helm} The simplest way to deploy Cribl Edge on Kubernetes is to bootstrap it using the Cribl Edge [Helm chart](https://github.com/criblio/helm-charts/tree/master/helm-chart-sources/edge). The chart defines the Service Account, access control, tolerations, and other required configurations. To deploy a Cribl Edge Node on Kubernetes using the Helm chart: 1. Install Helm 3. See [Helm documentation](https://helm.sh/docs/v3/intro/install) for details. 1. Create or select a Fleet for the Nodes. 1. Set the Fleet API server **Host** to `0.0.0.0` under **Fleet Settings > General Settings > API Server Settings > General**. See [Configure Fleet Settings](fleet-settings) for more information. 1. Create a provisioning token. See [Create a New Provisioning Token](securing-auth-token#create) for details. 1. Select **Edge Nodes**, then **Add/Update Edge Node**, then **Kubernetes**. Confirm or modify the settings, then copy the install script. 1. On your target host, run the copied script. The script will take the following form: ```shell {showcopybutton=false} helm install --repo "https://criblio.github.io/helm-charts/" --version "" --create-namespace -n "" --set "cribl.leader=tls://@?group=" "" edge ``` Replace `` with a descriptive name for the Kubernetes DaemonSet that the script will create. The name must be a valid DNS subdomain. 1. If your cluster uses a certificate that Cribl Edge cannot validate, set the `CRIBL_K8S_TLS_REJECT_UNAUTHORIZED` environment variable to `0` on the Edge Pods. You can set this variable in the script with: `--set extraEnv.CRIBL_K8S_TLS_REJECT_UNAUTHORIZED=0`. See [Environment Variables](environment-variables) for more details. ## Deploy Cribl Edge on Kubernetes Without a Helm Chart {#deploy-no-helm} To deploy Cribl Edge on Kubernetes with your own manifests for GitOps, operators, or platform-specific packaging, deploy the agent as a DaemonSet. You must then define the same objects the [Cribl Edge Helm chart](https://github.com/criblio/helm-charts/tree/master/helm-chart-sources/edge) creates: Service Account, ClusterRole, and ClusterRoleBinding. ### Prerequisites for Manual Deployment on Kubernetes {#prerequisites} To deploy Cribl Edge on Kubernetes without a Helm chart, you need to: - [Configure a Service Account](#service-account). - [Configure access control](#rbac). - [Define a DaemonSet](#daemonset). - [Set tolerations](#tolerations). - [Configure health checks](#health-checks). #### Configure a Service Account {#service-account} Create a Kubernetes Service Account for the Edge Pods, or use an existing one. Define it in a `ServiceAccount` manifest in the namespace where you deploy Cribl Edge. Then reference its name in the [ClusterRoleBinding](#rbac) and in the `serviceAccountName` field of the [DaemonSet](#daemonset). In the manifest, configure the following fields: | Field | Description | | :--- | :--- | | `metadata.name` | Name of the Service Account. | | `metadata.namespace` | Namespace where you deploy Cribl Edge. | | `metadata.annotations` | Optional annotations, such as an IAM role association. | | `automountServiceAccountToken` | Mounts the Service Account token that Cribl Edge needs to access the Kubernetes API. Kubernetes defaults this to `true`. Do not set it to `false`. | For example, create a Service Account with an Amazon EKS IAM role annotation: ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: cribl-edge-sa namespace: annotations: eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/cribl-edge-role automountServiceAccountToken: true ``` > If you want the Kubernetes Source to look for connection details in a different directory > than the default `/var/run/secrets/kubernetes.io/serviceaccount`, > use the `CRIBL_SERVICEACCOUNT_PATH` [environment variable](environment-variables) > to set the new path to the `ServiceAccount`. {.box .note} > For information on how to configure the Service Account for the Leader Node, > see [Configure a Service Account](/stream/deploy-kubernetes-leader#configure-a-service-account) in Cribl Stream documentation. {.box .success} #### Configure Access Control {#rbac} Cribl Edge Kubernetes Sources use the Kubernetes API to read logs, metrics, and events from the cluster. When the cluster uses role-based access control (RBAC), authorize the Cribl Edge Pod Service Account to read that data. Add the rules for the Sources you enable under `rules` in a ClusterRole manifest. Bind that ClusterRole to the Edge Service Account with a ClusterRoleBinding, then apply the manifests with `kubectl apply`. This is a `read-only` role, which does not require `write` permissions. Plan ahead with your Kubernetes admins and security team to authorize the installation of this `ClusterRole`. ##### RBAC for Kubernetes Events Source {#events} To collect cluster-level events, the Kubernetes Events Source needs watch access to the Kubernetes API. An example RBAC rule is: ```yaml - apiGroups: - "events.k8s.io" resources: - events verbs: ['watch'] ``` ##### RBAC for Kubernetes Logs Source {#logs} The Kubernetes Logs Source requires the ability to get, list, and watch Pods in all namespaces. An example RBAC rule is: ```yaml - apiGroups: - "" resources: - pods verbs: ['get', 'list', 'watch'] ``` ##### RBAC for Kubernetes Metrics Source {#metrics} The Kubernetes Metrics Source reads metric information from many resources in your cluster. The minimum permissions required are: ```yaml - apiGroups: - "" resources: - configmaps - endpoints - limitranges - namespaces - nodes - persistentvolumeclaims - pods - replicationcontrollers - secrets - services - strategicMergePatches - nodes/log - nodes/metrics - nodes/proxy - nodes/spec - nodes/stats verbs: ['get', 'list', 'watch'] - apiGroups: - "apps" resources: - daemonsets - deployments - replicasets - statefulsets verbs: ['get', 'list', 'watch'] - apiGroups: - "batch" resources: - cronjobs - jobs verbs: ['get', 'list', 'watch'] - apiGroups: - "autoscaling" resources: - horizontalpodautoscalers verbs: ['get', 'list', 'watch'] - apiGroups: - "policy" resources: - poddisruptionbudgets verbs: ['get', 'list', 'watch'] - apiGroups: - "networking.k8s.io" resources: - ingresses - networkpolicies verbs: ['get', 'list', 'watch'] - apiGroups: - "admissionregistration.k8s.io" resources: - mutatingwebhookconfigurations - validatingwebhookconfigurations verbs: ['get', 'list', 'watch'] - apiGroups: - "certificates.k8s.io" resources: - certificatesigningrequests verbs: ['get', 'list', 'watch'] - apiGroups: - "storage.k8s.io" resources: - storageclasses - volumeattachments verbs: ['get', 'list', 'watch'] ``` ##### RBAC for Prometheus Edge Scraper {#scraper} The Prometheus Edge Scraper Source requires specific Kubernetes RBAC rules depending on the **Discovery Type** you configure. ###### Kubernetes Node and Kubernetes Pods To discover Kubernetes Nodes or Pods, the Source must be able to list Pods across all namespaces. ```yaml - apiGroups: - "" resources: - pods verbs: ['list'] ``` ###### Kubernetes Service Monitor (v4.18+) To discover `ServiceMonitor` custom resources and their associated Services, the Source needs the following permissions: ```yaml - apiGroups: - "monitoring.coreos.com" resources: - servicemonitors verbs: ['list'] - apiGroups: - "" resources: - services - namespaces verbs: ['list'] ``` The `namespaces` permission is required only when any `ServiceMonitor` in the cluster defines `namespaceSelector.any: true`, causing the Source to enumerate all namespaces. If you know your `ServiceMonitor` resources use only the `matchNames` selector or default to their own namespace, you can omit `namespaces` from the rule. #### Define a DaemonSet {#daemonset} Define a DaemonSet so one Cribl Edge Pod runs on each node. Set `serviceAccountName` to the Edge Service Account, and set the container image to `cribl/cribl:`. Add these environment variables under `spec.template.spec.containers` in the DaemonSet manifest. Set `CRIBL_K8S_POD` to the Pod name to allow Cribl Edge to detect that it is running inside a Pod. When TLS is enabled, use `tls://` in `CRIBL_DIST_LEADER_URL`: ```yaml env: - name: CRIBL_DIST_LEADER_URL value: "tls://@:4200?group=" - name: CRIBL_DIST_MODE value: managed-edge - name: CRIBL_EDGE value: "1" - name: CRIBL_K8S_POD valueFrom: fieldRef: fieldPath: metadata.name ``` #### Set Tolerations {#tolerations} Kubernetes does not schedule a Pod on a node that has taints. Add a toleration so Cribl Edge can collect logs and metrics from those nodes. Add the following field under `spec.template.spec` in the DaemonSet manifest. `operator: Exists` matches every taint, so the Pod can run on any node: ```yaml tolerations: - operator: Exists ``` #### Configure Kubernetes Health Checks {#health-checks} When you deploy Cribl Edge on Kubernetes, configure health checks so Kubernetes restarts an unresponsive Pod and detects when a Pod is ready. An example health-check configuration for Kubernetes, including liveness and readiness probes, is: ```yaml readinessProbe: httpGet: path: /api/v1/health port: 9420 scheme: HTTP initialDelaySeconds: 15 timeoutSeconds: 1 livenessProbe: httpGet: path: /api/v1/health port: 9420 scheme: HTTP initialDelaySeconds: 15 timeoutSeconds: 1 ``` > If you have Fleets running Edge Nodes with version 4.8.2 and older, > you can encounter failing health checks that require specific API server configuration. > > By default, the Cribl Edge API listens on port 9420 instead of the Cribl Stream default port 9000. This requires special care when you configure your Edge Fleet in the Cribl UI. > > On Fleets running Edge Nodes with version 4.8.2 and older, the API server is configured be default to listen on the loopback interface (`127.0.0.1`). > For your Nodes to remain reachable, you must change the listening interface address to `0.0.0.0` in **Fleet Settings > General Settings > API Server Settings > General**. > This will bind to all IPs in the container. If you do not make this change, your health checks will start failing after the Cribl Edge agent downloads its initial config bundle. > > Another side effect of not changing the listening interface address is that the Edge Node will not appear on the Leader UI. {.box .info} #### Kubernetes CPU Limit Configuration {#cpu-limit} The Cribl Edge [Helm chart](https://github.com/criblio/helm-charts/tree/master/helm-chart-sources/edge) ensures that the number of Worker Processes is determined by the CPU resources allocated to the pod, rather than the physical CPU count on the host. To achieve this, the chart sets the `CRIBL_K8S_CPU_LIMIT` environment variable to the value of the `resources.limits.cpu` setting on the Pod. Cribl Edge then uses the value as a CPU limit to determine how many Worker Processes to start. We recommend maintaining the default configuration of the `CRIBL_K8S_CPU_LIMIT` environment variable to prevent performance problems, such as resource contention and Pod instability, caused by exceeding CPU limits. ### Manually Deploy Cribl Edge on Kubernetes Once you have configured all [prerequisites](#prerequisites), you can proceed with the manual deployment of Cribl Edge on Kubernetes. Use the chart [templates and values](https://github.com/criblio/helm-charts/tree/master/helm-chart-sources/edge) as a checklist when you translate the deployment to raw YAML. 1. Create or select a Fleet for the Nodes. 1. Set the Fleet API server **Host** to `0.0.0.0` under **Fleet Settings > General Settings > API Server Settings > General**. See [Configure Fleet Settings](fleet-settings) for more information. 1. Create a provisioning token. See [Create a New Provisioning Token](securing-auth-token#create) for details. 1. Apply your manifests with `kubectl apply`. You can use any namespace. 1. If your cluster uses a certificate that Cribl Edge cannot validate, set the `CRIBL_K8S_TLS_REJECT_UNAUTHORIZED` environment variable to `0` on the Edge Pods. See [Environment Variables](environment-variables) for more details. ## Run Kubernetes Sources Outside the Cluster Optionally, you can run the Kubernetes Sources (Metrics, Logs, and Events) outside of a cluster, by specifying connection details in a `kubeconfig` file (like `kubectl`). Either place the file in `$HOME/.kube/config`, or use the `$KUBECONFIG` variable to point to it. ## Deploy on OpenShift or Non-Root Environments {#nonroot} To deploy Cribl Edge on OpenShift or other non-root environments, add Linux capabilities to the Edge container. These capabilities let Cribl Edge bind to low ports, read host files, and inspect processes. The Cribl Edge Helm chart leaves `securityContext` empty, and the install script copied from the UI does not set it. To add the capabilities with the Cribl Helm chart: 1. Create a local `values.yaml` file. Adjust the capabilities for your environment: ```yaml securityContext: capabilities: add: - CAP_NET_BIND_SERVICE - CAP_SYS_PTRACE - CAP_DAC_READ_SEARCH - CAP_NET_ADMIN ``` 1. Install the chart with that file and the Leader URL from the install script: ```shell {showcopybutton=false} helm install --repo "https://criblio.github.io/helm-charts/" --version "" --create-namespace -n "" --set "cribl.leader=tls://@?group=" -f values.yaml "" edge ``` Replace `` with a descriptive name for the Kubernetes DaemonSet that the script will create. The name must be a valid DNS subdomain. For a description of the capabilities, see [Set Capabilities for Cribl Edge](deploy-runtime-user#cap). To set the same capabilities without a Helm chart, add this `securityContext` block under the Edge container in the DaemonSet manifest. Then apply the manifest with `kubectl apply`. ## Uninstall Cribl Edge from a Kubernetes Cluster To remove the Cribl Edge agent from your Kubernetes cluster, run the following command: `helm uninstall -n ` `deployment` is the deployment name you selected when configuring the Helm chart. The `helm uninstall` command automatically deletes all deployed resources associated with the Cribl Edge Helm Chart. ## Troubleshooting Here are some common challenges you can encounter when deploying Cribl Edge via Kubernetes. ### Duplicated Nodes in Node List Edge Nodes on Kubernetes restart with new GUIDs, causing the **Edge Nodes** page to track and display each restart as a separate Node. To prevent this behavior in Fleets containing Kubernetes nodes, set **General Settings > Fleet Configuration > Time to keep disconnected Nodes** to `0`. This ensures that Nodes in these Fleets will not be tracked between restarts. ### Certificate Validation Fails By default, the kubelet serves a certificate signed by an ephemeral self-signed certificate authority. If your cluster uses a certificate that Cribl Edge cannot validate, all connection attempts to the Kubernetes API will be rejected. To avoid this, set the `CRIBL_K8S_TLS_REJECT_UNAUTHORIZED` environment variable to `0` to disable the expectation of valid certificates. When you disable this environment variable, all Kubernetes features (including Metadata, Metrics, Logs, and workload instrumentation metadata) will tolerate both self-signed and invalid TLS certificates when connecting to the Kubernetes APIs. ### Log Loss Due to Polling Interval and Rotation The [Kubernetes Logs Source](sources-kubernetes-logs) polls the local kubelet for Pod discovery. While this is a lightweight operation, the **Polling interval** setting is important for complete log capture, especially with high log volumes and frequent rotations. For details, see [Polling Interval and Log Rotation](sources-kubernetes-logs#polling). ############################################################ # SOURCE: https://docs.cribl.io/edge/set-up.md ############################################################ # Set Up Cribl Edge Cribl Edge offers different types of deployments that you can choose based on your needs: - [Cribl.Cloud](deploy-cloud), including a [hybrid](cloud-enterprise#hybrid) option. - Customer-managed deployments, including: - A Single-instance deployment, where you deploy a single Edge Node on [Linux](deploy-linux), [Windows](deploy-windows), or [macOS](deploy-macos). - A Distributed deployment, where you [set up Leader and multiple Edge Nodes](setting-up-leader-and-edge-nodes). You can also [run Cribl Edge on Docker](deploy-running-docker), or [deploy it via Kubernetes](deploy-running-kubernetes). To prepare for a deployment and gather decision-making information, consult [Deployment Planning](deploy-planning). ############################################################ # SOURCE: https://docs.cribl.io/edge/getting-started-guide.md ############################################################ # Get Started with Cribl Edge Quickly set up a working instance of Cribl Edge. --- This quick start guide shows you how to get Cribl Edge running. You can either start with a free Cribl.Cloud instance, or deploy the Cribl Edge agent on a physical or virtual machine. We'll cover both options below, so feel free to jump to the relevant section in this article: - [Download and Install](#install) Cribl Edge. - [Quick Start with a Cloud Instance](#cloud). ## Check the Minimum Deployment Requirements {#requirements} Before you proceed, make sure that the hosts for all Cribl Edge agents - and for any Leader that you install on your own infrastructure - meet the [System Requirements](requirements) that we list for Linux, Windows, and macOS. ## Download and Install Cribl Edge {#install} To install Cribl Edge, select the Linux or Windows tab below and follow the corresponding steps. **Linux** > To avoid permissions errors, install and run Edge as the same Linux user. > For details on creating a new user, see [Enabling Start on Boot](deploy-boot-start). {.box .info} 1. Navigate to the [Cribl Downloads](https://cribl.io/download/) page. 1. Select either `x64` or `ARM` Cribl Suite from the drop-down. You can also copy and paste one of the provided `curl` scripts into a command-line interface. 1. Open a command-line interface and navigate to the `/opt/` directory: ``` cd /opt/ ``` 1. Un-tar the resulting `.tgz` file in the `/opt/` directory. ``` tar xvzf cribl---.tgz ``` For example: ``` tar xvzf cribl-4.3.1-12f82b6a-linux-x64.tgz ``` Edge is now installed in a `cribl` subdirectory, by default: `/opt/cribl/`. 1. Move it to the `cribl-edge` directory with: ``` mv /opt/cribl/ /opt/cribl-edge ``` 1. In your terminal, go to `/opt/cribl-edge/bin` and switch your installation to Edge mode: ``` ./cribl mode-edge ``` **Windows** 1. From Cribl's [Download page](https://www.cribl.io/download), set the **Software** drop-down to `Cribl Edge for Windows`. 1. Click **Download Now** to get the `.msi` file. 1. Enter the following at your command prompt for a silent install: ```shell msiexec /i cribl---.msi /qn ``` > You can also install Cribl Edge from the `.msi` file using the [Setup Wizard](deploy-windows#wizard). {.box .info} **macOS** 1. From Cribl's [Download page](https://www.cribl.io/download), set the **Software** drop-down to `Cribl Edge for macOS`. 1. Click **Download Now** to get the `.pkg` installer. 1. Enter the following at your command prompt: ```shell sudo installer -pkg .pkg -target / ``` This will install Cribl Edge to `/opt/cribl/`. 1. Set `/opt/cribl` as your `$CRIBL_HOME` directory. ### Run Cribl Edge {#running} Now you can start, stop, and verify the Cribl Edge server using these `./cribl` CLI commands: - **Start**: `./cribl start` - **Stop**: `./cribl stop` - **Get status**: `./cribl status` > For other available commands, see [CLI Reference](cli-reference). {.box .success} 1. In your browser, open `http://127.0.0.1:9420` and log in with default credentials (`admin`, `admin`). 1. Register your copy of Cribl Edge when prompted. After registering, you'll be prompted to change the default password. ## Quick Start with a Cloud Instance {#cloud} As mentioned above, the Leader Node can reside in a free Cribl.Cloud account. You'll get a ready-to-use Cribl Leader that includes Cribl Edge functionality. For a detailed comparison, see [Cribl.Cloud vs. Self-Hosted](cloud-vs-self-hosted). To get a Cribl.Cloud account: 1. Go to [https://cribl.cloud/signup/](https://cribl.cloud/signup/?utm_campaign=criblclouddocsreferral&utm_medium=organic&utm_source=cribldocsdeploycloudregisteringcriblcloudportal&utm_content=ctacriblcloudsignuphyperlink) and register an account. 1. On the **Create Organization** page, optionally enter an **Organization Name** (a friendly alias for the randomly generated ID that Cribl will assign to your Organization). 1. Select an AWS Region to host your Cribl.Cloud Leader. Cribl currently supports the following Regions: - `US West (Oregon)` - `US East (Virginia)` - `US East (Ohio)` - `Europe (Frankfurt)` - `Europe (London)` - `Europe (Zurich)` - `Asia Pacific (Sydney)` - `Asia Pacific (Singapore)` - `Canada (Central)` > For details on Cribl.Cloud Organizations, refer to Cribl.Cloud documentation: > > - [Register Cribl.Cloud Organization](cloud-initial-setup). > - [Manage Cribl.Cloud organization](cloud-portal). {.box .success} ## Add Edge Nodes You now have a Cribl Leader running with Cribl Edge capabilities enabled, but still need to add Edge Nodes. To do this: 1. From Cribl Edges's top nav, select **Manage** > **Edge Nodes**. 1. On the resulting **Edge Nodes** tab, click **Add/Update Edge Node** at the upper right and then select **Linux** > **Add** 1. Copy the resulting script to your clipboard and close the modal. 1. Paste the script onto your Edge Node's command line and execute it. > To add an Edge Node on a Windows or using Docker or Kubernetes, refer to [Add and Update Edge Nodes](edge-nodes-add-update#bootstrap). {.box .success} ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-vs-self-hosted.md ############################################################ # Cribl.Cloud vs. Self-Hosted Learn how a Cribl.Cloud deployment differs from an on-prem installation. --- A [Cribl.Cloud](deploy-cloud) deployment differs in several ways from a customer-managed (on-prem) deployment of Cribl Suite software on your own infrastructure. Keep in mind these differences as you choose how to launch Cribl Edge. Also consider these differences as you navigate the product's UI, in-app help (including tooltips), and documentation. ## Cribl Edge and Cribl.Cloud A Cribl.Cloud deployment lets you connect your Edge Nodes to a Cloud-hosted Leader Node. In contrast with Cribl Stream, where you have the option to use [Cribl-managed Worker Groups](/stream/cloud-workers), Cribl Edge Fleets can only be customer-managed. They still benefit from all the features of running a Cloud-hosted Leader Node that are listed on this page. ## Cloud-Only Features {#cloud-only} Certain Cribl products and features are available **only** on Cribl.Cloud: - [Cribl Search](/search/), an application for searching, exploring, and analyzing machine data in place and at API endpoints. - [Cribl Lake](/lake/), a data lake solution for long-term, full-fidelity data storage. - [Workspaces](/stream/workspaces), an option for isolating parallel Cribl Leaders with separate access controls and other configurations. For details about how all Cribl products interoperate to manage data, see the [Full Suite Reference Architecture](https://knowledge.cribl.io/specialized-reference-architectures-95/full-suite-reference-architecture-2137). ## Simplified Administration {#admin} Cribl.Cloud has been designed with options to accommodate everyone - from first-time evaluators to [Enterprise](cloud-enterprise) customers who manage a worldwide network of private-cloud, public-cloud, and/or data-center deployments. Cribl.Cloud's Free offering is designed to help you launch Cribl Edge - and to start processing data - as quickly and easily as possible. Upgrading to a paid Standard or [Enterprise plan](cloud-enterprise) provides expanded deployment and configuration options. > For a comparison of features in Free, Standard, and Enterprise Cribl.Cloud plans, see [Pricing](https://cribl.io/pricing/). > {.box .success} ### Simplified Distributed Architecture {#distributed} Cribl.Cloud is preconfigured as a [Distributed deployment](fleet-management). A Free or Standard plan allows only a single Fleet, and some [Distributed Settings](setting-up-leader-and-edge-nodes) cannot be configured. ### Git Preconfigured {#git} Without an Enterprise plan, the **Settings** > **Global** > **System** > **Git Settings** section is omitted. However, a local `git` client is preconfigured in your Cribl.Cloud Organization. On the top nav, use the **Version Control** button (with a branched symbol) to commit/push changes to `git`. Select **Deploy** to deploy your committed changes. Cribl.Cloud does not support Git remote repos. ### Automatic Restarts and Upgrades {#auto} Without an Enterprise plan, the **Settings** > **Controls** link is omitted. Cribl handles Leader and Fleet restarts automatically on your behalf. ### Simplified Access Management and Security {#access} In Cribl.Cloud, you can manage access control for your Organization by selecting **Organization** in the sidebar and then selecting [**Members & Teams**](/iam/members). The options on this tab will vary depending on your plan. If you have a Cribl.Cloud Enterprise plan, you can use the Key Management Service (KMS), which maintains the keys Cribl Edge uses to encrypt secrets on Fleets and Edge Nodes. Go to **Settings** > **Security** > **KMS** to configure KMS. If you add an Enterprise Plan, cloud and [hybrid](cloud-enterprise#hybrid) Leaders support Local and Google SSO [authentication](/iam/authentication), along with OpenID Connect (OIDC) and SAML [federated authentication](/iam/cloud-sso). Cribl.Cloud does not currently support LDAP. Permission- and Role-based access control (RBAC) is simplified in Cribl.Cloud. For details, see [Permissions](/iam/permissions). #### Security Features Comparison: Self-Hosted vs. Cribl.Cloud {#security} The following table outlines the security responsibilities for self-hosted and Cribl.Cloud deployments, highlighting key differences in deployment security, data protection, threat detection, and access control. | Feature | Self-Hosted | Cribl.Cloud | |-----------------------|-----------------------------------------------------|-----------------------------------------------------------------| | **Deployment Security** | Customer responsible for securing the deployment environment (network isolation, physical access control, user access management). | Cribl manages the security of the cloud infrastructure. | | **Configuration Security** | Customer responsible for securing configuration files and tokens. | Cribl manages the security of configuration files and tokens. | | **Git Configuration Security** | Customer responsible for securing the Git repository. | Cribl manages the security of the Git repository. | | **Data at Rest** | Customer responsible for encryption and key management. | Encrypted at rest by using industry standard encryption (e.g., AES-256) for storage services. | | **Data in Motion** | Customer configures encryption (TLS) for data in transit. | Preconfigured TLS for some Sources. Can be further configured. | | **Threat Detection & Response** | Customer responsibility. Use Cribl Stream security features (limited) and external tools. | Cribl bolsters its security posture with internal security teams and an external MSSP, ensuring comprehensive protection for its production and corporate environments through threat detection, workload scanning, and vulnerability management. | | **Patch Management** | Customer responsible for applying security patches to Cribl Stream and underlying infrastructure. | Cribl manages patching of Cribl.Cloud (Cribl-managed) infrastructure. | | **Access Control** | Customer configures user Roles and Permissions (RBAC). | Simplified RBAC with Enterprise plans offering advanced options (SSO, KMS). | | **Authentication** | Customer configures authentication methods. | Local and SAML/OIDC IDP with Enterprise plans (additional options). | | **Key Management** | Customer manages encryption keys. | Enterprise plans offer Key Management Service (KMS) for key storage. | | **Compliance** | Customer responsible for adhering to compliance standards. | SOC 2 Type II compliant and GDPR-compliant (Cribl.Cloud). | ### Transparent Licensing {#licensing} The Cribl.Cloud sidebar does not display a **Settings** > **Global** > **Licensing** link, nor does the **Monitoring** > **System** submenu include **Licensing**. Your plan is managed by your Cribl.Cloud Organization, and you can check credits and usage history in the [FinOps Center](/billing-licensing/finops-center). ## Other Simplified Settings {#features} These features are available only in on-prem deployments: - **Settings** > **Global** > **Scripts** (if [enabled](scripts#enable-scripts) - Cribl.Cloud does not support configuring or running shell scripts). Configuring [persistent queues](persistent-queues) in a Cribl.Cloud deployment requires an [Enterprise plan](cloud-enterprise). You can freely define the **Queue size limit** on your Edge Nodes, based on the disk space you provision. ## Available Ports and TLS Configurations {#ports-certs} To get data into Cribl.Cloud, your Cribl.Cloud Organization provides several Sources and ports already enabled for you, plus 11 additional TCP ports (`20000`-`20010`) that you can use to add and configure more Cribl Edge [Sources](sources). Additionally, external port `443` is available for TCP-based services - it maps internally to port `10443`. For details, see [Cribl.Cloud Ports](ports#criblcloud). ### TLS Details {#tls} [TLS encryption](securing-tls-cloud) is pre-enabled for you on several Sources, also indicated on your Workspace's **Data Sources** tab. ### Cribl HTTP and Cribl TCP Sources/Destinations Use the Cribl HTTP [Destination](destinations-cribl-http) and [Source](sources-cribl-http), and/or the Cribl TCP [Destination](destinations-cribl-tcp) and [Source](sources-cribl-tcp), to relay data between Edge Nodes that are either connected to the same Leader or different Leaders. For more information about transferring data across Organizations, go to [Transfer Data Between Workspaces or Environments](usecase-transfer-data). ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-connected-env.md ############################################################ # Learn About Connected Environments If you have one or more on-prem Cribl Edge environments and Cribl.Cloud Organization(s), you can configure **Connected Environments**. Connected Environments enables you to: - **Use Cribl.Cloud with on-prem deployments.** Connect an on-prem Leader to Cribl.Cloud to use Cloud infrastructure management, the credit-based billing model, and Cribl Lake and Cribl Search. For example, you can send Cribl metric data to Cribl Lake or Cribl Search, then build dashboards to monitor throughput and performance. - **Move data from on-prem to Cribl.Cloud.** Onboard data from on-prem Edge Nodes to Cribl.Cloud Edge Nodes without incurring double billing costs. See [Send Data from On-Prem to Cribl.Cloud](cloud-connected-data-transfer) for details. >**Connected Environments does not support proxied connections.** Make sure the >connection between your on-prem Leader and Cribl.Cloud does not pass through a >proxy. {.box .warning} To set up Connected Environments, create a connection between the on-prem Leader and the Cribl.Cloud Leader. Then use the **Connections** page in your Cribl.Cloud account to manage credit consumption for all of your on-prem environments from one interface. This feature is called Universal Subscription. ## Understand Environment Compatibility For supported Stream and Edge combinations, auth tokens, recommended transports, and known limitations, see [Cribl-to-Cribl compatibility matrix](cribl-to-cribl-compatibility). ## Before You Begin Connecting On-Prem Leaders Confirm that your environments meet these requirements before you connect an on-prem Leader to Cribl.Cloud: - **Cribl.Cloud plan**: Your Cribl.Cloud account uses an Enterprise plan. See [Cribl.Cloud pricing](https://cribl.io/pricing/plan/?product=cloud). - **On-prem version**: Your on-prem Cribl Edge deployment runs version 4.8.2 or newer. - **Distributed mode**: Your on-prem deployment runs in Distributed mode. Only a Leader can connect to Cribl.Cloud. Single-instance (standalone) deployments aren't supported. - **Port**: Port `4200` is open on the on-prem Leader, using the TCP protocol. - **TLS**: The connection uses TLS. Cribl Edge enforces TLS for the connection. - **No proxy**: The connection does not pass through a proxy. ### Connection Methods Cribl supports two methods for connecting an on-prem Leader to a Cribl.Cloud Leader: - From the Cribl.Cloud account in **Connections** > **Connected Environments**. - From the on-prem Leader in **Distributed Settings** > **Cloud Connection**. >Credits serve as the virtual transaction currency in the Cribl product suite. >Each Cribl product has a predefined usage rate, and as you use the products, >credits are deducted from your initial pool. {.box .success} ### Configuration Considerations {#configuration-considerations} Take these considerations into account for your on-prem Leader, allowlists, security groups, and Workspaces: - **Ports**: Make sure that port `4200` is open on the Leader, with TCP protocol. See [Leader Ports](ports#leader) for more information. - **TLS**: The connection between the Cribl.Cloud Leader and the on-prem Leader must be encrypted using TLS. When you configure the `CRIBL_CLOUD_WORKSPACE_URL` [environment variable](cloud-connected-env-how-to#use-an-environment-variable), the value must start with `tls://`, which enforces TLS. Cribl Edge validates the Cribl.Cloud Leader's certificate against public certificate authorities, so you can't disable certificate validation or supply a custom CA path for this connection. - **Connection host**: The connection URL must point to a Cribl.Cloud hostname, such as `-.cribl.cloud`. - **Static IPs**: For IP address allowlist or security group rules, you can find the static IPs of your Cribl.Cloud Leader in **Workspace** > **Access** > **Leader NLB IPs**. You can also use the `nslookup` command to obtain static IPs. - **Private Link**: As an alternative to allowlisting static IPs, eligible Enterprise Organizations can reach the Cribl.Cloud Leader over AWS PrivateLink, so the connection stays on your cloud provider's private network instead of the public internet. Leader Private Link is AWS only, and the connecting environment must be able to create an AWS VPC interface endpoint. An on-prem Leader that cannot create an AWS interface endpoint cannot use Private Link for this connection. See [Private Link for Cribl.Cloud](/stream/privatelink-cloud#leader). - **Workspaces**: Workspaces are separate infrastructure. For allowlists and security groups, ensure that you add each IP address individually as each Workspace has a unique IP. ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-connected-env-how-to.md ############################################################ # How to Connect On-Prem Leaders to Cribl.Cloud To connect existing on-prem Cribl Edge Distributed deployments to Cribl.Cloud, select an on-prem Leader that is running Cribl Edge 4.8.2 or newer, then follow the steps. >If you have multiple environments, such as staging and production environments >when using GitOps, you must connect each environment individually. {.box .info} 1. On the top bar, select **Products**, and then select **Cribl**. 1. In the sidebar, select **Workspace**, and then select **Connections**. 1. Select **Configure New Environment** and fill out the following fields: |Field|Description|Example| |-----|-----------|-------| |
Environment name
|A name for your environment. This name will display on the **Connected Environments** page. You can search for and filter environments by name.|Goat Farm East Production| |Workspace hostname/ID|
Hostname of your Cribl.Cloud Workspace.
This field is read-only.|`main-random-goat-a12bcdef.cribl.cloud`| |Workspace port number|Port number that the Workspace Leader uses to communicate with the on-prem Leader.|`4200`| |Workspace token| The auth token defined in the Cribl.Cloud Leader.|`a12bcDEFgHiJKLmnOpQRstuvw3x4z56`| |Script type|The format of the script to connect to the on-prem Leader:
  • Environment variable
  • CLI
|**Environment variable**:

CRIBL_DEPLOYMENT="Goat Farm West Production"
CRIBL_CLOUD_WORKSPACE_URL="tls://a12bcDEFgHiJKLmnOpQRstuvw3x4z56@main-random-goat-a12bcdef.cribl.cloud:4200"
**CLI**:

./cribl cloud-workspace
-d "Goat Farm West Production"
-H main-random-goat-a12bcdef.cribl.cloud
-p 4200
-u a12bcDEFgHiJKLmnOpQRstuvw3x4z56
| ## Use a Command-Line Script If you're using the CLI option, follow these steps, in order: 1. Select **Copy Script**. 1. Open a command-line window in the Leader environment that you want to connect to Cribl.Cloud. 1. Navigate to the `$CRIBL_HOME/bin` subdirectory. 1. Paste the script results onto the command line, and run the script. ## Use an Environment Variable The **Environment Variable** script populates with the details you enter when you're configuring a new environment. For example: ``` CRIBL_DEPLOYMENT="On-prem Stream" CRIBL_CLOUD_WORKSPACE_URL="tls://a12bcDEFGHIjKLMnopPqr123@main-random-goat-a12bcdef.cribl.cloud:4200" ``` If you're using the environment variable, copy its output, and set it when - or before - you run `cribl start`. How you set this variable depends on your deployment. - For example, if your Cribl Edge deployment is running in a container, set the environment variable in the container via run call or configuration. - If you're running your own server, you can set environment variables for the `cribl` user, or you can declare the variable along with the `start` command. For details, see our [CLI Reference](cli-cloud-workspace). ## High Availability Leader Configuration Before you configure a connected environment with a High Availability (HA) Leader, ensure you are comfortable setting up and managing Leader HA. See [Leader High Availability/Failover](deploy-add-second-leader) for more information. When you set up the primary Leader to connect to Cribl.Cloud in an HA environment, set the `CRIBL_DEPLOYMENT` and `CRIBL_CLOUD_WORKSPACE_URL` environment variables. You can do this in the Cribl.Cloud UI, using the CLI, or directly in your environment. These variables use the same format that the **Environment variable** script shows in the UI: ``` CRIBL_DEPLOYMENT="aws_leader_prod" CRIBL_CLOUD_WORKSPACE_URL="tls://a12bcDEFgHiJKLmnOpQRstuvw3x4z56@main-random-goat-a12bcdef.cribl.cloud:4200" ``` If you manage the primary Leader as a `systemd` service, set the same variables in the `[Service]` section of the unit file using `Environment=` entries: ``` Environment=CRIBL_DEPLOYMENT=aws_leader_prod Environment=CRIBL_CLOUD_WORKSPACE_URL=tls://a12bcDEFgHiJKLmnOpQRstuvw3x4z56@main-random-goat-a12bcdef.cribl.cloud:4200 ``` The failover Leader inherits the configuration from the filesystem changes made by the primary Leader. ## Enable the On-Prem Leader Connection to Cribl.Cloud {#enable-connection} You can connect a Leader Node to an existing Enterprise Cribl.Cloud Organization. 1. In the sidebar, select **Settings**. 1. On the **Global** tab, select **Distributed Settings**. 1. Select **Cloud Connection**. 1. Toggle **Join Cribl.Cloud Workspace** on. 1. Fill in the required fields: |Field|Description| |-----|-----------| |**Connection URL**|The **Cribl.Cloud URL** to connect to this Leader.
  1. In your Cribl.Cloud Organization, locate the URL field value on the sidebar **Workspace** > **Access** tab.
  2. Copy the URL and paste it into the **Connection URL** field, using the format: `main-random-goat-a12bcdef.cribl.cloud`.
| |**Connection port**|The port for the Cribl.Cloud Leader. Default is `4200`.| |**Connection auth token**|The authentication token for the Cribl.Cloud Leader. You'll need to get this from the Cribl.Cloud environment:
  1. Navigate to **Workspace** > **Connections** and select **Configure New Environment**.
  2. Copy the value in the **Workspace token** field.
  3. In the on-prem environment, paste the Workspace token from Cribl.Cloud.
| 1. Select **Save**. 1. In the Cribl Subscription Services Agreement modal, select **Agree** to accept the agreement. 1. In the confirmation modal, select **Yes** to save changes and restart. >Once you connect an on-prem Leader to a Cribl.Cloud Organization, the license >type changes to a Cribl.Cloud billing account. This means the **Licensing** page will not >be accessible. To return to using an on-prem license, toggle **Join Cribl.Cloud Workspace** off, select **Save**, and select **Yes** in the confirmation modal > to save changes and restart. {.box .info} ############################################################ # SOURCE: https://docs.cribl.io/edge/about-universal-subscription.md ############################################################ # Simplify Billing with Universal Subscription >This feature requires an Enterprise Plan. {.box .cloud} If you have multiple instances of Cribl Edge on-prem, you're likely managing multiple licenses. Instead of letting license management run your life, you can take advantage of the [Universal Subscription](https://cribl.io/pricing/plan/?product=universal-subscription) feature. Universal Subscription lets you manage an existing on-prem license with Cribl.Cloud credits. To get started, connect your on-prem Leader to your Cribl.Cloud Leader to send billing data payloads. Once your environments are connected, you can use the [FinOps Center](/billing-licensing/finops-center) to get a unified, all-product view of your Cribl Edge usage and spending. This replaces an on-prem license, and gives you the flexibility to maintain your on-prem deployments without managing multiple licenses and tracking spend across environments. > An on-prem Cribl Edge environment consists of at least one Leader Node (the control plane) and one or more Fleets. {.box .info} Connecting your on-prem Leader license to Cribl.Cloud billing allows you to: - Monitor credit consumption for each of your on-prem Cribl Edge environments from one user interface. - Create a billing- and usage-based connection between the Cribl Edge on-prem Leader and the Cribl.Cloud Leader, which receives metrics from the on-prem Leader. For information about the data payloads, visit [Data Payloads for Connected Environments](cloud-connected-payloads). ## Configure Connected Environments For the setup procedure, go to [How to Connect On-Prem Leaders to Cribl.Cloud](cloud-connected-env-how-to), then come back here to explore how to view credit and usage data for your on-prem Connected Environments. >Full access to Connected Environments requires you to upgrade Cribl Edge to 4.8.2 or newer. {.box .warning} ## Explore Credit Consumption for Connected Environments Once you set up a Connected Environment, you can view the incoming usage data and credit consumption for your on-prem and Cloud deployments of Cribl Edge. You must be an Organization Owner to view this data. For more information on Cribl.Cloud billing, go to the [FinOps Center](/billing-licensing/finops-center) page. ### View Usage Data 1. In the sidebar, select **Organization**, then **FinOps Center**. 1. Select **Usage Overview**. 1. Go to **Per Product Consumption** and expand either Cribl Edge or Cribl Stream. 1. Find **Connected < Product > GBs In**. ### View Credit Consumption 1. In the sidebar, select **Organization**, then **FinOps Center**. 1. On the **FinOps Center** submenu, select **Invoices**. 1. Select a month to expand the cost items. Select **Stream** or **Edge**. 1. View **Connected < Product > GBs In** usage and cost. Here, you will see each on-prem environment that is connected to this Cribl.Cloud Organization, and the credits each environment is consuming. ## Limitations of the Universal Subscription Feature Connected Environments has some usage limitations: - The Connected Environments feature is available only on Enterprise Cribl.Cloud plans. For Enterprise plan details, see [Pricing](https://cribl.io/pricing/). - Single-instance deployments of Cribl Edge aren't eligible for a Universal Subscription. - The Distributed deployment on-prem Leader must be running Cribl Edge 4.8.2 or newer. ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-connected-payloads.md ############################################################ # Data Payloads for Connected Environments In a [Connected Environment](cloud-connected-env) setup, on-premises Leaders connect to a Cribl.Cloud Leader in the same way that Edge Nodes connect to a Leader. The Cribl.Cloud Leader sends down a license, and the on-premises Leader sends up a heartbeat that includes telemetry, which encompasses metrics and other metadata. ## Why Is the Telemetry Important? The telemetry sent from an on-premises Leader to a Cribl.Cloud Leader is encapsulated in an event. This event serves as a heartbeat, confirming that the connected environment is active and functioning properly. It includes key metadata such as the system's status, timestamp, configuration details, and metrics. Cribl.Cloud uses this data to: - Monitor connectivity between the on-premises Leader and the cloud. - Track system health by evaluating fields like status, edgeNodes, and metrics. - Ensure compliance with licensing by verifying the config.featuresRev field. - Provide insights into data flow, such as input and output metrics. ### How Often Is the Heartbeat Sent? The heartbeat interval is determined by the **Task heartbeat period** field, which specifies the number of seconds between each event. In the provided example below, the heartbeat is sent every `10` seconds. This interval is configurable, meaning administrators can adjust it to optimize performance based on their needs. For details, see [Task Manifest and Buffering Limits](group-settings#task-manifest-and-buffering-limits) in Fleet Settings. ### What Happens if the Heartbeat Is Missed? If a heartbeat event is not received within the expected interval, the following actions may occur: - **Retries** - The on-premises Leader may attempt to resend the heartbeat after a short delay. - **Alerting** - Cribl.Cloud can generate an alert if the heartbeat is missing for an extended period, indicating a potential issue. - **Failure detection** - A prolonged absence of heartbeats may be interpreted as a disconnection or system failure, prompting further investigation or automated recovery steps. ## On-Premises Leader to Cribl.Cloud Leader Payload This section describes the structure of the event payload sent from an on-premises Leader to a Cribl.Cloud Leader in a Connected Environment. ### Sample Event Here is a sample event that Cribl.Cloud received from a connected environment. ```shell { "__criblEventType": "event", "type": "info", "_time": 1737577024.567, "status": "healthy", "localTime": 1737577024, "config.hbPeriodSeconds": 10, "config.featuresRev": "YbK7TIGe4jp2rdujnFiJqq0OBV67r2FKGvrHr4C6I5g=", "edgeNodes": 50, "__socketAddr": 192.168.1.100:443, "__srcIpPort": 10.0.0.5:52314, "metrics": [ [ 0, 0, "total.in_bytes", 233, 1737578280038, 1737578340038, [ "ci", "tcp:in_tcp", "input", "tcp:in_tcp", "input_type", "tcp", "__worker_group", "default", "__dist_mode", "worker", "__worker_node", "46731aec-d220-4cb0-9971-0dd0a7907d54", "__product", "stream" ], null, "float32" ] ], "__raw": "{\"type\":\"info\",\"_time\":173757...}" } ``` ### Event Payload Fields The following table describes the important fields in the event payload. | Field | Usage | Example | |-------------------------|--------------------------------------------------------------------|---------| | __criblEventType | Type of event | event (always) | | type | Type of event | info (always) | | _time | Timestamp of the event in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds) | 1737577024.567 | | status | Status of client | healthy | | localTime | Local timestamp in Unix time (seconds) | 1737577024 | | config.hbPeriodSeconds | Seconds between client heartbeats | 10 | | config.featuresRev | Version of feature flags (internal use) | YbK7TIGe4jp2rdujnFiJqq0OBV67r2FKGvrHr4C6I5g= | | edgeNodes | Number of connected Edge Nodes | 50 | | __socketAddr | Connection detail | `192.168.1.100:443` | | __srcIpPort | Connection detail | `10.0.0.5:52314`| | metrics | Array of metrics (as nested arrays) included in this heartbeat. This sample only shows one nested metric array but an actual heartbeat will contain many metrics such as in bytes, out bytes, in events, out events for each input as well as an aggregated total. | ```[ [ 0, 0, "total.in_bytes", 233, 1737578280038, 1737578340038, [ "ci", "tcp:in_tcp", "input", "tcp:in_tcp", "input_type", "tcp", "__worker_group", "default", "__dist_mode", "worker", "__worker_node", "46731aec-d220-4cb0-9971-0dd0a7907d54", "__product", "stream" ], null, "float32" ] ]``` | | __raw | Holds the full raw data of the event as a JSON string | ```{"type":"info","_time":173757...``` | ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-connected-data-transfer.md ############################################################ # Send Data from On-Prem to Cribl.Cloud You can use Connected Environments to send data from an on-prem deployment to a Cribl.Cloud deployment. For example, if you previously had an on-prem deployment of Cribl and you are moving forward with a Cloud-first or Cloud only solution, you can use connected environments to onboard your data from a on-prem Edge Nodes to their counterpart Cribl.Cloud Edge Nodes. You can transfer data from on-prem Edge Nodes to the Cribl.Cloud Edge Nodes without incurring any data transfer costs. ## Overview of the Data Migration Workflow The workflow for migrating data from on-prem Edge Nodes to Cribl.Cloud Edge Nodes has these phases: 1. [Create a Connected Environment](#new-connected-env). This process generates the information you need to set up the data flow between the on-prem Edge Nodes and the Cribl.Cloud Edge Nodes. 1. [On-Prem Edge Nodes: Configure HTTP or TCP Destination](#on-prem-destination). Add an auth token on the on-prem Edge Nodes to configure the first half of the connection between the on-prem Destination and the Cribl.Cloud Source. 1. [Cribl.Cloud Edge Nodes: Configure HTTP or TCP Source](#cloud-source). Add a matching auth token on the Cribl.Cloud Edge Nodes to complete the connection. 1. [Validate the Data Flow](#validate-data-flow). Confirm that the data is properly flowing from the on-prem Edge Nodes to the Cribl.Cloud Edge Nodes. ### Create a Connected Environment {#new-connected-env} To begin the process of migrating data from on-prem to Cribl.Cloud, you need to first set up a Connected Environment on the on-Prem Leader. This process generates the information you need to set up the data flow between on-prem Edge Nodes and the Cribl.Cloud Edge Nodes. To set up a Connected Environment, follow the instructions on [How to Connect On-Prem Leaders to Cribl.Cloud](cloud-connected-env-how-to). These instructions also explain how to: - Optionally set up environment variables at the time you create the Connected Environment. - Use a command-line script to set up a Connected Environment if needed. Ensure that you also follow the instructions to [Enable the On-Prem Leader Connection to Cribl.Cloud](cloud-connected-env-how-to#enable-connection). ### On-Prem Edge Nodes: Configure HTTP or TCP Destination {#on-prem-destination} On the on-prem deployment, select a Edge Node and configure a new or existing [Cribl HTTP](destinations-cribl-http) or [Cribl TCP Destination](destinations-cribl-tcp). These Destinations enable internal data transfer between Cribl nodes to prevent data transfer billing costs. To configure an HTTP or TCP Destination: 1. Follow the general configuration instructions on the [Cribl HTTP](destinations-cribl-http) or [Cribl TCP Destination](destinations-cribl-tcp) documentation. 1. In the **Auth Token** section of the configuration modal, select **Auth Token** to set up a shared secret between this Destination and the Cribl.Cloud Source: - **Token secret (text secret):** Select the name of the secret that you have created previously or create a new secret using the **Create** button. See [Create and Manage Legacy Secrets](securing-secrets) for specific instructions about creating secrets. - **Enable token:** Toggle the token on to enable it. - **Description:** Optionally, enter a description summarizing the purpose of the secret. > If you don't see the **Auth Token** section of the Destination, it means you have not set up a Connected Environment for your on-prem Leader. > {.box .warning} 1. Commit and deploy the changes. You can add multiple tokens if you need to rotate auth tokens. ### Cribl.Cloud Edge Nodes: Configure HTTP or TCP Source {#cloud-source} On the Cribl.Cloud deployment, select a Edge Node and configure a new or existing [Cribl HTTP](sources-cribl-http) or [Cribl TCP Source](sources-cribl-tcp). These Sources enable internal data transfer between Cribl nodes to prevent data transfer billing costs. To configure an HTTP or TCP Source, follow the same steps listed in the previous section about [Configuring HTTP or TCP Destination for the on-prem Edge Nodes](#on-prem-destination). When you select or create the secret from the **Token secret (text secret)** menu, this secret must match the value of the secret used on the on-prem Cribl HTTP or Cribl TCP Destination. Commit and deploy after making these configuration changes. ### Validate the Data Flow {#validate-data-flow} As a final step, confirm that the data is properly flowing from the on-prem Edge Nodes to the Cribl.Cloud Edge Nodes. A few methods for confirming data flow include: - Capture sample data on your Cribl HTTP or TCP Source on your Cribl.Cloud Edge Nodes and verify it looks correct. See [Add Sample Data](data-preview#add) for specific instructions. - In the configuration modal for your Cribl HTTP or TCP Source on your Cribl.Cloud Edge Nodes, select the **Charts** tab to view data events coming in to verify you see activity. You can also compare this to the outgoing data on the Cribl HTTP or TCP Destination on your on-prem Edge Nodes. ############################################################ # SOURCE: https://docs.cribl.io/edge/tutorials.md ############################################################ # Tutorials Follow these tutorials to get a one-stop overview of the interface and data flow functionalities of Cribl Edge. - [Route Collected Data](route-collected-data) explains the options for routing data collected by Cribl Edge to other products or Destinations. - [Forward Custom Data with Cribl Edge Tags](usecase-custom-tags) shows how to add unique identifiers or metadata to each event for better control of data at scale. - [Monitoring your Infrastructure with Cribl Edge](usecase-infrastructure-monitoring) presents how to monitor infrastructure by collecting, processing, and forwarding data with low overhead cost and resources. - [Monitor and Troubleshoot Cribl Edge](usecase-monitoring-troubleshooting) explores key metrics to monitor for optimal Cribl Edge operation, discusses how to gather this information, and provides effective monitoring strategies and general troubleshooting guidelines. - [Migrate from Third-Party Agents to Cribl Edge](usecase-migrate-to-edge) shows how to migrate your data collection infrastructure from third-party agents to Cribl Edge. ############################################################ # SOURCE: https://docs.cribl.io/edge/route-collected-data.md ############################################################ # Route Collected Data Process and route data collected by Cribl Edge. --- You can route data collected in Cribl Edge in several ways: - **To Cribl Stream:** For further processing and scalable distribution. See [Send Data from Cribl Edge to Cribl Stream ​](usecase-edge-stream). - **To Cribl Search:** For analysis or visualization. Use the [Cribl Search Destination](destinations-cribl-search) or see [Collect and Visualize Nvidia GPU Metrics](collect-nvidia-gpu-metrics) for an example use case. - **Directly to Destinations:** Such as cheap storage, SIEMs, or other security and IT tools. Cribl Edge is not intended for extensive data manipulation. Limit Pipelines on Edge Nodes to basic Cribl Functions. Avoid complex operations, to prevent bottlenecks and ensure optimal performance. A typical workflow offloads major processing from Cribl Edge Nodes, for example by: 1. Collecting data locally. 1. Filtering out unwanted data, using the [Drop Function](drop-function). 1. Routing the remaining data to Cribl Stream for further processing and delivery to your desired Destinations. > You can check the [Pipeline Profiler](data-preview#pipeline-profiling) to access statistics on each Pipeline's performance. {.box .success} ## QuickConnect vs. Routes in Cribl Edge **QuickConnect** and **Data Routes** are both interfaces for managing data flow in Cribl Edge, but they serve distinct purposes, based on the complexity of your routing needs. QuickConnect is ideal for simple, straightforward scenarios with a given Source sending the same set of data through an optional Pipeline to one or more Destinations. It offers ease of use and speedy configuration. Data Routes, which are the default option, are better suited for complex data routing involving conditional processing. They provide flexibility, advanced logic, and scalability for handling intricate data flows. Choose QuickConnect for rapid, minimal configuration setups, and opt for Routes when your data requires more sophisticated routing and processing. ## Processing Cribl Edge Data with Pipelines Once you have collected your data, you have options to transform it before sending it to your Destinations. You can transform data within pre-processing, processing, or post-processing Pipelines. Some examples of common operations performed in Pipelines in Cribl Edge include dropping events and enriching them with metadata. ### Drop Events to Lower Ingest Cost By using the [Drop Function](drop-function), you can effectively eliminate data from your ingestion pipeline without incurring additional costs. There are few ways you can take advantage of this Function: - Use pre-processing Pipelines to filter and drop specific events, based on criteria like event codes. - Use processing Pipelines to drop data before cloning events to send them to multiple Destinations. This reduces data volume. - Safely experiment with configurations, without incurring costs, by routing data to the DevNull Destination. > The number of dropped events that lower the ingestion cost > is calculated based on average event size. > This means it may not represent the exact number of bytes you drop. {.box .info} ### Enrich Events by Adding Metadata To enrich and refine your data within Cribl Edge, effectively use the [Eval Function's](eval-function) **Add Field** option. This feature enables you to dynamically create new fields based on existing data elements - such as tags from mapping rules, or event metadata. By converting tags and metadata to fields, you can enhance data analysis and manipulation capabilities. For instance, a File Monitor might be collecting IIS logs from a Windows server. To ensure that these events are stored correctly in your final analysis system, you could specify a value of `index = 'IIS'`. This creates a new field named `index` with the value `IIS`, providing essential context for your data. ############################################################ # SOURCE: https://docs.cribl.io/edge/usecase-custom-tags.md ############################################################ # Forward Custom Data with Cribl Edge Tags Add unique identifiers to events forwarded from Cribl Edge by using tags. --- Organizations often need to add unique identifiers or metadata to each event forwarded from Cribl Edge to supported Destinations. Whether you're managing a small deployment or thousands of nodes, incorporating Edge tags into your events provides the context needed to make sense of your data at scale. These identifiers can help: * Track the source of events across a large enterprise * Associate events with specific departments, teams, or business units * Maintain custom organizational taxonomy in log data * Enable better filtering and searching in the Destination systems This guide will show you how to set tags during Cribl Edge Installations and use the Preprocessing Pipeline to forward custom data points to a Destination. ## Embed Source Context with Cribl Edge Tags In this guide, we will follow Data Detective Dave, an operator with a knack for getting to the bottom of data origins. His current case involves enriching data streaming from all Development servers within the Engineering Organization before it's dispatched to a central analytics platform. Dave needs to ensure every piece of data clearly shouts its server role and department. Here are the steps Data Detective Dave will follow: 1. **Set meaningful tags while installing Cribl Edge:** Dave's first move is to tag each Development server right at the Source, while installing Cribl Edge. He'll use the installation script to attach labels `development` and `engineering` -- ensuring each server wears its identity from the get-go. 2. **Gather the metadata evidence:** Cribl Edge, like a good informant, automatically collects metadata, including the tags Dave just applied. He'll double-check that the `cribl` metadata option is active in the Fleet Settings, confirming that this crucial data is being gathered. 3. **Set Up the "Interrogation Room" (Preprocessing Pipeline):** Dave will create a new Pipeline in Cribl Edge, which he'll cleverly name `host_tags`. This will be his interrogation room where the data will be questioned and its secrets revealed (in this case, the tags). 4. **Use the "Eval-uator" to surface the clues (Eval Function):** Inside the `host_tags` Pipeline, Dave will employ an **Eval** Function -- his "Eval-uator." This function will dig into the `__metadata.cribl.tags` array, where the installation tags are stashed. It will then create new, easy-to-read fields in the data: `role` and `department`, clearly displaying the tag values. 5. **Apply the interrogation to the Source:** Next, Dave will apply the `host_tags` Pipeline to the specific Source(s) feeding data from the Development servers. This ensures that all incoming data undergoes interrogation and reveals its tags. 6. **Verify the findings with Live Capture:** To ensure his "Eval-uator" is working correctly, Dave will use the **Live Data** capture feature on the configured Source. By examining the data before it's routed, he can confirm that the `role` and `department` fields are present and accurate - case closed (almost)! 7. **Ensure the Destination doesn't lose the evidence:** Finally, Dave will make sure the central analytics platform -- the Destination -- is set up to receive and hold onto these newly revealed role and department fields. He might even need to set up specific routes to handle this tagged data appropriately. If you'd like to follow along Data Detective Dave's journey, we outlined the detailed steps for you below. ### Set Tags During Edge Installation When installing Cribl Edge, you can set tags during the installation. Regardless of your deployment environment (Docker, Linux, Windows, macOS, or Kubernetes), the [Bootstrap script via the UI](edge-nodes-add-update#bootstrap), gives you an option to add tags. These tags help identify and categorize your Edge Nodes such as environment type, geographic location, or server role. As you modify the fields within the script interface, it updates in real-time, reflecting all the configuration choices you make on that screen, including any tags you've added. The result is a new Edge Node configured with the specific options you've selected. In this example, we're setting two tags: * Server Role: `development` * Department: `engineering` ![Add an Edge Node](add_node.png) {border="true"} You can also add tags after you install the Edge Nodes by teleporting directly into the Node. For details, see [Add Tags to Edge Nodes in Teleport View](managing-edge-nodes#add-tags-to-edge-nodes-in-teleport-view). ### Configure Host Info/Metadata Collection Cribl Edge allows you to configure Event metadata sources to enrich events with additional context. In Edge mode, all the Event metadata sources are enabled by default. The Event metadata sources add a `__metadata` property to every event emitted from enabled sources. This metadata can be used to: * Enrich events with additional context. * Display metadata for instance exploration. Ensure the `cribl` metadata option is enabled by checking in: 1. Navigate to **Fleet Settings** > **Limits** > Metadata. 2. Use the **Event metadata sources** drop-down or the **Add source** button to enable and select metadata sources. Ensure the `cribl` option is enabled. ![Event Metadata Sources](edge_metadata.png) {border="true"} ### Create a Pre-Processing Pipeline To add tags or other custom identifiers to events: 1. Navigate to your **Fleet** > **More** > **Pipelines** in your Cribl Edge interface. 2. Add a new Pipeline (e.g., `host_tags`). Pipelines ID can contain only letters (`A-Z`, `a-z`), numbers (`0-9`), and the characters `_` and `-`. 3. Add an **Eval** Function to the Pipeline. 4. Configure the Eval function to surface the tags by adding the following to the **Evaluate fields** section: 1. In the first row enter:
**Name**: `role`
**Value Expression**: `__metadata.cribl.tags[0]` 2. Select **Add Field** and enter:
**Name**: `department`
**Value Expression**: `__metadata.cribl.tags[1]` ![Eval Function](edge_eval.png) {border="true"} 1. Save the Pipeline. ### Apply the Pre-Processing Pipeline To make sure this Pipeline runs for all your data: 1. Go to **Sources > [Your Source]**. 2. In the Source configuration modal, find the **Pre-Processing Pipeline** option. 3. Select your newly created `host_tags` Pipeline. 4. Save the configuration. ### Verify the Output To verify that your custom fields are correctly added: 1. On your Source configuration modal, select **Live Data** > **Capture**. 2. In the **Capture** modal, under **Where to capture?**, select `2. Before the Routes`. 3. Verify that the `role` and `department` fields appear in the events. ![Live Data](edge_systemstate.png) {border="true"} ### Destination Configuration Ensure that your Destination configuration isn't dropping these custom fields: 1. Navigate to **Data** > **Destinations**. 2. Configure the Destination. 3. If needed, create a Route that specifically handles these tagged events. 4. Verify the data captured includes the additional metadata fields you configured. ############################################################ # SOURCE: https://docs.cribl.io/edge/usecase-infrastructure-monitoring.md ############################################################ # Monitor your Infrastructure with Cribl Edge Monitor your infrastructure and visualize performance using Grafana. --- Cribl Edge helps you monitor your sprawling infrastructure by collecting, processing, and forwarding data with low overhead cost and resources. Cribl Edge simplifies agent administration and data collection for your endpoints, and provides a number of charts, graphs, and alerts for the web when connected to supported data sources. To enhance the performance of your environments, combine Cribl Edge with your data visualization tool of choice (this guide uses Grafana as an example). Now, you can identify and investigate issues and monitor applications faster than ever before. ## Useful Metrics Dashboards Cribl has configured a [Prometheus dashboard](https://grafana.com/grafana/dashboards/15280) to display system metrics, which is available in Grafana's public library. This is a relatively simple dashboard, suitable for showing basic aggregate metrics. Another useful dashboard for displaying Linux metrics is the [Node Exporter Full](https://grafana.com/grafana/dashboards/1860) dashboard, commonly used with Prometheus and its Node Exporter agent. This dashboard can handle highly detailed metrics. To display Windows metrics, consider one of Grafana's [Windows dashboards](https://grafana.com/grafana/dashboards/?search=windows). ## Guide Overview This setup guide will walk you through these configuration steps: 1. Configure your Cribl Edge Sources. Depending on your endpoints, you can use the [System Metrics Source](sources-system-metrics) for Linux, [Windows Metrics](sources-windows-metrics), or [Kubernetes Metrics](sources-kubernetes-metrics). 1. Configure the [Grafana Cloud Destination](destinations-grafana_cloud) to send data to Grafana Cloud. 1. Access Grafana Cloud to see the metrics and visualizations. ## Configure the System Metrics Source on Cribl Edge {#source} 1. In Cribl Edge, start by configuring and enabling the applicable Source for system metrics: - Linux [System Metrics Source](sources-system-metrics) - [Windows Metrics](sources-windows-metrics) - [Kubernetes Metrics](sources-kubernetes-metrics) 1. Decide what level of metrics detail you want to collect and display. In the [System Metrics Source](sources-system-metrics) and [Windows Metrics](sources-windows-metrics) Sources, go to the **Host Metrics** and **Container Metrics** tabs: - For the relatively simple dashboard showing aggregate metrics, choose the **Basic** mode for most of your metrics. - For the highly detailed metrics visualizations dashboard, choose the **All** mode for all of your metrics. For the [Kubernetes Metrics](sources-kubernetes-metrics) Source, use the **Filter Rules** to specify the Kubernetes objects that the Source should parse to generate metrics. If you specify no restrictive rules here, the Source will emit all events. 1. For all of the Sources, select **Processing Settings > Pre-Processing**, then select the `prometheus_metrics` **Pipeline**. 1. When you're finished, **Commit** and **Deploy** the changes. Before you move on to the next step, check the **Live Data** tab to make sure the metrics are generated. ![Basic System Metrics](usecase-grafana-1.2a7c8a7847.png) {border="true"} ![Detailed System Metrics](usecase-grafana-2.a6407b2b42.png) {border="true"} ## (Optional) Adjust the `prometheus_metrics` Pipeline Optionally, you can adjust the `prometheus_metrics` Pipeline to include the `host` dimension, or to add/remove more dimensions. Access the `prometheus_metrics` Pipeline by selecting **More** > **Pipelines** in the Fleet submenu. ![Customizing the Pipeline's dimensions](usecase-grafana-3a-4101.png) {border="true"} ## Configure the Grafana Cloud Destination Next, head over to [Grafana Cloud Destination](destinations-grafana_cloud) to configure the Destination and send data to Grafana Cloud. Preview your data on the Grafana Cloud config modal's **Live Data** tab. ![Preview Live Data](usecase-grafana-3.ef68968f67.png) {border="true"} ## Visualize the Data in Grafana You can now visualize metrics in Grafana Cloud. To get started: 1. Navigate to your Grafana Cloud instance, and select **Explore** on the left panel to review the Node metrics. You can select metrics and run a query to produce a chart and table of metric events, which you can add to new or existing dashboards for analysis. If expected metrics are missing, try adjusting the variables in your Grafana Cloud instance. See Grafana's [Variables](https://grafana.com/docs/grafana/latest/dashboards/variables/) topic for details. 1. Use Grafana's **Filter** option to browse the dashboards for your Prometheus data. Below are sample dashboards with the basic and detailed metrics shown. - To show basic aggregate metrics, use the [Cribl Node Observability](https://grafana.com/grafana/dashboards/15280) dashboard. ![Cribl Node observability](usecase-grafana-4.04f7d18311.png) {border="true"} - For the `OS` metrics with `CPU` / `Disk` details, the basic dashboard will not suffice. Instead, we recommend configuring your System Metrics Source (as discussed [above](#source)) to receive **All** metrics, and then using the [Node Exporter Full](https://grafana.com/grafana/dashboards/1860) dashboard below for visualization. ![Node Exporter Full](usecase-grafana-5.7fa4330ef1.png) {border="true"} ############################################################ # SOURCE: https://docs.cribl.io/edge/usecase-monitoring-troubleshooting.md ############################################################ # Monitor and Troubleshoot Cribl Edge Monitor and troubleshoot your Cribl Edge deployment. --- Cribl Edge is a data collection agent for Windows, Linux, macOS, and Kubernetes. Even robust agents like Cribl Edge can encounter issues that disrupt data flow. To maintain optimal performance and reliability, it's essential to implement effective monitoring and troubleshooting strategies. In this topic, we explore key metrics to monitor for optimal Cribl Edge operation, discuss how to gather this information, and provide effective monitoring strategies and general troubleshooting guidelines. Additionally, we highlight the importance of integrating Cribl Edge with your existing IT monitoring and alerting tools to gain comprehensive visibility into its health and performance. ## Cribl Edge and Resource Constraints Cribl Edge is designed to be a lightweight agent that often runs on machines that have limited resources. Unlike Cribl Stream, Edge uses a single Worker Process to limit resource usage and avoid affecting other functions of that machine. While this is beneficial for resource-constrained environments, it's important to remember two things when implementing Edge: * **Data consumption:** A single Worker Process can handle a limited amount data. If you try to ingest a massive amount of data, the process might become overloaded. For guidelines, see [Performance Considerations](deploy-planning#performance-considerations) and [Sizing and Scaling](/stream/scaling/). * **Data manipulation:** Extensive manipulations within Pipelines can also strain the single Worker Process. Be strategic about the transformations you apply to the data. ## Key Metrics to Monitor Cribl Edge offers you multiple ways to monitor your deployments in order to get an operational view of the health of your Fleets, Edge Nodes, Sources and Destinations, and more. ### Edge Node Status The [Edge Nodes](managing-edge-nodes#view-edge-node-status-information) page provides status information for each Edge Node in the selected Fleet. You can use this page to quickly answer the following questions: * Is the agent running? * Is it connected to Cribl Leader? #### Edge Node Connectivity To verify the connectivity of your Edge Nodes, check the **Health** column in the **Edge Nodes** page. A status of "alive" indicates that the Edge Node is running and successfully communicating with the Cribl Leader. For details, see [View Edge Node Status Information](managing-edge-nodes#view-edge-node-status-information) and [Tracking Data Activity for an Edge Node](node-data-activity). #### Set Up Continuous Monitoring for Your Edge Nodes ​​While the Edge Nodes page provides essential information, it's important to note that disconnected Edge Nodes may be automatically removed after a certain period. To ensure continuous monitoring of your Edge Node health and performance, consider implementing centralized monitoring with a third-party solution like Grafana. By configuring your Edge Nodes to send [internal metrics](sources-cribl-internal) to a centralized monitoring solution, you can gain real-time insights into their statuses and troubleshoot potential issues proactively. For details and resources, see the [Centralized Monitoring](#centralized-monitoring) section below. ### Sources and Destinations Health To maintain optimal performance and data reliability, monitor the health of your Sources and Destinations at both the Edge Node and Fleet levels. Monitoring at the Edge Node level provides granular insights into the performance of individual Nodes, while Fleet-level monitoring offers a broader view of overall system health and potential bottlenecks. You can monitor and track the health of Sources and Destinations associated with an Edge Node on the **Edge Nodes** page. By filtering the list to display only Edge Nodes with "Warning" or "Error" statuses for their Sources or Destinations, you can quickly identify and troubleshoot potential issues. For details, see [Monitor Source and Destination Health on Edge Nodes](managing-edge-nodes#monitor-source-and-destination-health-on-edge-nodes) and [Filter Edge Nodes](edge-nodes-filter). Alternatively, you can monitor the health of Sources and Destinations within a specific Fleet. To do this, navigate to the desired Fleet, select **Health**, and then choose either **Sources** or **Destinations**. This will display a color-coded health status for each Source or Destination, providing a quick visual overview of their operational status. For details, see [Overall Source and Destination Health.](monitoring#overall-source-and-destination-health) ### Data Throughput There are several pages you can use to monitor the rate at which data is collected and transmitted (data throughput) across your Edge Nodes. This information can help you determine if an Edge Node is capable of handling the current data generation rate and if data is being successfully transmitted to Destinations. * **Cribl Edge home page:** The Cribl Edge home page displays the aggregate data for all Fleets, Subfleets, and Edge Nodes. The charts display information about traffic in and out of the system. For details, see [Monitor Health on the Edge Home Page](monitoring#monitor-health-on-the-edge-home-page). * **Fleets page:** The **Fleets** page gives you access to more information about each of your Fleets and the health of Sources and Destinations associated with the Fleets. You can view the **Monitor** tab of a selected Fleet to analyze the traffic flowing through your Fleet. For details, see [Monitor Fleet Information](monitoring#monitor-fleet-information). * **Edge Nodes page:** To monitor the activity of your Edge Node and identify potential issues with Sources, Destinations, Routes, Pipelines, or Packs: Navigate to the **Edge Nodes** page, pick a specific Node and click anywhere on the row to launch the **Node Info** modal. Then, select **Data Activity**. This will provide detailed insights into the Node's data flow without teleporting into the Node itself. For details, see [Viewing the Data Activity for a Node](node-data-activity#viewing-the-data-activity-for-a-node). ### Resource Utilization To effectively monitor the health and performance of your Edge Nodes, use node and process information as well as details from logs. Sources of node and process information include: - **System Activity** tab: Gain a detailed view of your Edge Node's health, including CPU usage, memory consumption, network traffic, and disk operations. Please note that these metrics represent the total system usage and may not solely reflect the resource utilization of the Edge Node itself. To view **System Activity**, click the row for an Edge Node. For details, see [Viewing the System Activity for a Node](node-data-activity#viewing-the-system-activity-for-a-node). - **Process-Level Monitoring**: Delve deeper into specific processes, such as `cribl` processes, to pinpoint resource bottlenecks and optimize performance. For details, see [Processes](explore-edge-linux#processes). Logs to analyze include: - **API Server Logs**: Examine the `cribl.log` file at `$CRIBL_HOME/log/cribl.log` for high-level system telemetry and license validation information. - **Worker/Edge Node Process Logs**: Analyze the `cribl.log` files at `$CRIBL_HOME/log/worker/N/cribl.log` to scrutinize detailed resource utilization metrics for each Worker/Edge Node Process at a granular one-minute interval. Combine these approaches to proactively identify and address potential performance issues and ensure optimal data processing and system stability. ## Effective Monitoring Strategies This section explores various strategies for effectively monitoring your Cribl Edge deployments. We'll delve into Edge Node logging, centralized monitoring, and network monitoring techniques to ensure optimal performance and data flow. ### Edge Node Logging Cribl Edge logs at the default `Info` level, providing a good balance between detail and performance for most environments. Analyze logs regularly to identify trends and potential issues. If you encounter a specific issue or need more detailed information, Cribl Edge settings allows you to adjust the log level for individual channels. However, frequently changing log levels from the default `Info` might indicate an underlying issue requiring further investigation. By carefully selecting the appropriate log level, you can obtain valuable troubleshooting information without compromising performance. For details, see [Logging Settings](monitoring#log_settings). ### Centralized Monitoring Centralized monitoring allows you to efficiently collect and analyze data from multiple Edge Nodes. This approach helps you proactively detect issues by enabling you to: * **Implement alerts:** Set alerts for critical metrics, such as agent failures or performance degradation. * **Create dashboards**: Visualize key metrics and gain valuable insights into the overall system health. Combine Cribl Edge with your existing IT monitoring tools to gain a unified view of your deployment's health. This allows you to identify and address issues before they impact performance. By sending Cribl Edge logs to platforms like Elastic, Grafana, or Loki, you can: * **Centralize log management:** Consolidate logs from various Sources for efficient analysis and troubleshooting. * **Create advanced dashboards:** Visualize complex metrics and correlations to gain deeper insights. * **Implement sophisticated alerts:** Set up alerts based on specific conditions and triggers to proactively address issues. For details, see [Monitoring your Infrastructure with Cribl Edge](usecase-infrastructure-monitoring). Additionally, you can use [CriblVision](https://github.com/criblio/criblvision/tree/main) to troubleshoot specific issues in CriblSearch, Grafana, and Splunk. ### Network Monitoring Monitor network traffic between the Edge Node and the Cribl Leader to identify and resolve network-related issues. Use third-party network monitoring tools to track network performance and troubleshoot connectivity problems efficiently. ### Troubleshooting Edge Nodes To troubleshoot potential issues with your Edge Nodes, consider the following: * Start by verifying the Edge Node's configuration, including connection settings, data collection intervals, and permissions. * Analyze the logs in Cribl Edge. For details, see [Search Internal Logs](monitoring#log_search). To isolate issues related to a specific Edge Node, filter the logs by the Edge Node's IP address. This will help you identify any error messages or exceptions that may require attention. * Check network connectivity between the Edge Node and the Cribl Leader by reviewing the Health column on the Edge Nodes page. * To monitor Edge resource utilization, examine the API server logs and Worker Process logs. These logs provide detailed information on CPU usage, memory consumption, network traffic, and other relevant metrics. You can also monitor the System activity for the entire host by [Viewing the System Activity for a Node](node-data-activity#viewing-the-system-activity-for-a-node). Refer to [Common Challenges on the Edge](edge-common-challenges) topic for other troubleshooting tips. ############################################################ # SOURCE: https://docs.cribl.io/edge/usecase-migrate-to-edge.md ############################################################ # Migrate from Third-Party Agents to Cribl Edge Migrate your data collection infrastructure from third-party agents to Cribl Edge --- This guide provides strategic considerations for migrating your data collection infrastructure from traditional third-party agents to Cribl Edge. Whether you're migrating from Splunk Universal Forwarders (UFs), Fluentd, Filebeat, or other agent technologies, the fundamental migration principles remain consistent. Any migration to Cribl Edge generally follows the same path: 1. Decide on your migration strategy 2. Complete pre-migration planning 3. Implement your Edge configuration 4. Rollout your changes in a controlled environment We'll examine each phase and what you need to consider along the way. > This is a considerations guide, not step-by-step instructions. Complex migrations require careful planning and benefit from professional services engagement. > {.box .info} For specific details on UF migrations, see: [Migrating from Splunk Universal Forwarders to Cribl Edge](https://knowledge.cribl.io/edge-55/migrating-from-splunk-universal-forwarders-to-cribl-edge-1722). ## Migration Strategy Overview Your migration success depends heavily on choosing the right approach from the start. The complexity of your current deployment, available resources, and timeline constraints will all influence which path you should take. Understanding these options upfront will save time and reduce risk throughout the migration process. ### Choosing Your Migration Approach Before beginning any migration, you must decide between two primary approaches: - Customer-managed migration - Professional services engagement #### Customer-managed Migration * **Best for:** Simple deployments with limited configuration complexity. * **Challenges:** Trying to migrate complex agent deployments, beyond simple deployments, can be challenging and time-consuming. Requires deep understanding of both current infrastructure and Cribl Edge architecture. * **Suitable for:** Organizations with dedicated resources and Cribl Edge expertise, or proof-of-concept implementations. #### Professional Services Engagement * **Best for:** Large-scale or complex agent deployments. * **Provides:** Automated migration tools, in depth analysis, and enhanced support. * **Recommended for:** Organizations requiring minimal downtime, deployments with extensive customization, time-sensitive migrations. ## Pre-Migration Planning This phase involves understanding your current environment, identifying potential challenges, and ensuring you have the necessary resources in place. ### Environment Assessment The first step in migration planning is gaining a complete understanding of your current deployment. This comprehensive assessment will inform every subsequent decision and help identify potential migration challenges before they become problems. Begin by conducting a thorough inventory of your current deployment, document both essential infrastructure components and organizational factors that could impact your migration strategy. **Required inventory items:** * OS types and versions across your infrastructure. * Current data volumes and peak load patterns. * Existing input configurations and custom settings. **Additional considerations that may impact your migration:** * Company span, subsidiaries, separate entities. * Network topology, connectivity, and bandwidth constraints. * Change control processes for your infrastructure. * Rollback plan documentation before beginning the migration. ### Configuration Analysis The goal of configuration analysis is to determine the data flow and topology of your current system, so that you can use this information to inform your Fleet design. For example, in environments using centralized configuration management (like Splunk's Deployment Server), the way your current server classes are organized will significantly impact your Edge Fleet design decisions. Key areas to document include: * Centralized configuration management systems and their hierarchies * Application or configuration packages deployed to agents * Client-to-configuration mappings * Custom configurations and transformations For example, in Splunk UF environments specifically, you would examine: * Deployment Server configuration using serverclass.conf * Splunk Apps stored in $SPLUNK\_HOME/deployment-apps * Client-to-serverclass mappings ### Resource Requirements Planning Inadequate resource planning is one of the most common causes of migration failures. Cribl Edge introduces new components and data flow patterns that require careful capacity planning. Understanding these requirements upfront prevents performance issues and data loss during the migration. #### Leader Scaling For Cribl.Cloud deployments, first assess your current Leader's performance before adding Edge Nodes. Evaluate whether your Leader is already overtaxed or operating smoothly, examining CPU utilization, memory usage, disk space availability, and disk I/O performance. For details, see [Monitoring Health and Metrics](monitoring). Once you've confirmed your Leader can handle additional load, ensure Leader resources are scaled to support expected Fleet/Worker Group counts. To spin up the right number of connection processes, add the number of Edge Nodes you will deploy into the [Edge Nodes Count field](deploy-planning#configure-edge-node-count). This field crunches numbers in the background and automatically spins up the correct number of Edge connection processes for you. For on-prem deployments as well as other considerations, see [Deployment Planning](deploy-planning). #### Cribl Stream Worker Nodes Ensure Stream Worker Nodes receiving data from Edge Fleets are properly sized for peak load. Undersized infrastructure can cause performance bottlenecks and data loss during high-volume periods. #### Data Routing and Flow Cribl Edge offers more sophisticated data routing capabilities than traditional agents, but this flexibility requires careful planning to avoid performance bottlenecks and ensure reliable data delivery. Key considerations: * Configure appropriate outputs based on your data routing needs * Consider routing complexity when routing from Cribl Edge to Cribl Stream then to Destinations * Plan for backpressure management, especially when routing to multiple Destinations ## Understanding Architectural Differences Most third-party agent migrations involve fundamental architectural changes that affect every aspect of your migration planning. Understanding these differences is critical for designing an effective migration strategy. ### Configuration Management Models Traditional agents often use different configuration management approaches than Cribl Edge. #### Composition vs. Inheritance * **Traditional agents:** Many use composition models where a single agent can belong to multiple configuration groups or classes * **Cribl Edge:** Uses inheritance where one Edge Node belongs to a single Fleet/Subfleet For example, in Splunk UF environments, one UF can belong to multiple serverclasses, but in Cribl Edge, one Edge Node belongs to a single Fleet/Subfleet. #### Fleet Design Strategy Fleet design is perhaps the most critical decision in your migration. Poor Fleet architecture can lead to management complexity, performance issues, and operational challenges. The goal is to balance functionality with maintainability while leveraging Cribl Edge's strengths. ##### Fleet Rationalization Approach * Review your current configuration management to understand what needs to be collected * Use tags, Pipelines, and Cribl Stream to reduce configuration variability * Consolidate similar configurations to minimize Fleet count * Group by function rather than direct configuration translation ##### Fleet Count Optimization * Keep Fleet counts to a minimum for optimal performance * Avoid direct translation of existing configuration groups to Edge Fleets (leads to Fleet proliferation) > Direct translation of existing configuration management structures to Edge Fleets often leads to management complexity and potential performance issues. > {.box .warning} * Consider creating Fleets for unique combinations of configuration requirements only when necessary ### Configuration Translation Challenges Understanding these caveats upfront allows you to plan alternative approaches and avoid migration roadblocks. #### Automatic Metadata Population One advantage of Cribl Edge is its automatic handling of common metadata fields, reducing configuration complexity compared to traditional agents. Cribl Edge automatically populates these metadata fields without additional configuration: * `sourcetype` * `index` * `source` * `host` * `connection_host` ### Configurations Requiring Alternative Approaches Some agent configurations have no direct equivalent in Cribl Edge and require additional steps. Common examples include: * **Path-based host extraction:** Some agents (like Splunk UF) can automatically extract the hostname from the file path itself. For example, the `host_regex` and `host_segment` settings from UF don't translate directly. However, you can achieve the same functionality using Cribl Edge's Pipeline processing to extract and transform the hostname data as needed. * **File handling behaviors:** Some agents often have granular control over how they interact with files. Cribl Edge may not have equivalent settings for every file handling behavior. For example, symbolic linking or file opening behavior. * **Custom transformations:** Some agents can perform data transformations at the collection point. Cribl Edge operates on a different model where most data transformation happens in Cribl Stream rather than at the edge. While Cribl Edge can do some processing, it's not designed to replicate all the transformation capabilities that agents might have built-in. #### Alternative Implementation Methods * Create corresponding Pipelines in Cribl Edge * Use Edge Node metadata mapping for system information * Implement data transformation through Routes (all inputs forward to Routes) ## Migration Implementation Considerations Once you've completed your planning phase, the implementation phase requires attention to configuration details and platform-specific considerations. ### Configuration Review Areas Each configuration area requires careful review to ensure optimal performance and functionality. #### File Monitor Settings * Determine whether to start from the beginning or end of files * Consider the impact of large file sizes or many old events * Assess network bandwidth and Destination capacity implications #### System State Configuration The System State Source is enabled by default on Cribl Edge Fleets, but you can disable the Source or specific collectors if System State data is not needed. #### Pipeline Configuration * Review existing agent configurations and enable similar functionality in Cribl * Optimize regexes for performance * Consider data transformation requirements previously handled in agents #### Persistent Queue Management * Review Persistent Queue settings in your agents, Cribl Edge, and Stream * Ensure proper queue sizing for expected data volumes ### Platform-Specific Considerations - Windows Environments Windows environments present unique challenges during migration, particularly around policy management. #### Group Policy Objects Check for Group Policy Objects (GPOs) that might automatically reinstall or enable removed third-party agents, and update policies before migration to prevent conflicts. #### PowerShell Usage For optimal performance on Windows Edge Nodes, ensure the "Use Windows Tools" setting is disabled for all data Sources. When disabled, the system uses native Windows Management Instrumentation (WMI) API methods for faster and more reliable data collection. When enabled, the system falls back to legacy PowerShell cmdlets. The PowerShell-based collection methods will be removed in future releases as native methods provide superior speed and reliability. #### Policy Management Some sites might have policies to re-enable/re-install agents if missing/removed. Update or exclude policies before migration. #### Windows Event Log Read Mode When configuring the **Windows Event Log** Source, always review the **Read mode** setting. The default is **From last entry**, which only collects new events. While this is the recommended setting, you have the option to change it to read the **Entire log**. For machines that have been in use for a long time, this can cause a massive, one-time spike in data ingestion as it sends years of historical events. This sudden influx can easily overwhelm your infrastructure, causing performance issues and data loss. Sticking with the default setting helps you avoid this risk. ### Addressing Inheritance Limitations When working with Edge's inheritance model, be aware of these challenges: * **Configuration integrity**: Changes to a Source/Destination in a Subfleet can break inheritance from the parent * **Limited flexibility**: Sources that allow only one configuration at a time create inheritance challenges when customization is needed ## Migration Rollout Strategy The rollout phase is when your plans become reality. A good rollout ensures things go smoothly, problems are fixed fast, and your data collection isn't interrupted. ### Controlled Rollout Process A controlled rollout allows you to validate your migration approach on a small scale before committing to full deployment. This approach significantly reduces the risk of widespread issues and provides opportunities to refine your process. #### Progressive Batch Sizing * Start with test servers * Then proceed to small batches (e.g., 200 machines) * Progress to larger batches (400, 800, 2000 machines, etc.) * Validate system performance and data flow at each stage * Only proceed when previous stage is validated #### Validation Requirements * Execute controlled rollout with proper validation at each stage * Address any issues early in rollout before expanding * Maintain visibility into migration rollout progress ### Continuous Monitoring To ensure a smooth migration, you need to monitor everything. This means watching both how things are performing technically and making sure your important data is flowing correctly. Additionally, monitor the Edge Nodes themselves as they get onboarded to track their connectivity status. Cribl Edge v.4.13 introduced Disconnected Node Tracking to help you identify and troubleshoot nodes that lose connection during the migration process. #### Resource Utilization Monitor Cribl Edge, Leader, and Stream components continuously to watch for performance bottlenecks or data loss indicators. Validate data flow and collection accuracy throughout the process. #### Rollback Capabilities Maintain (previously-documented) rollback capabilities in case issues are discovered. ## TL;DR Migrating from third-party agents to Cribl Edge requires careful planning and a systematic approach. The key to success lies in understanding the architectural differences between your current system and Cribl Edge, properly planning your Fleet design, and executing a controlled rollout process. Remember that this is a considerations guide, and complex migrations often benefit from professional services engagement to ensure success and minimize risk to your data collection infrastructure. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-planning.md ############################################################ # Deployment Planning Plan your Cribl Edge deployment, taking into account requirements, deployment types, scaling, and billing. --- When you're planning an Edge deployment, consider these key factors: * The amount of data (metrics, logs, custom command outputs, and so on) that you plan for Edge to collect from the endpoint and ingest per unit of time. For example, MB/s or GB/day. * The amount of processing that will happen on incoming data. For example, are there a lot of transformations, regex extractions, parsing functions, field obfuscations, and so on? * Routing and/or cloning: Is most data going to a single Destination, or is it being cloned and routed to multiple places? This is important, because Destination-specific serialization tends to be relatively expensive. * Deploying onto servers with no internet access: If you plan to deploy Edge Nodes on air-gapped on-prem servers (servers with no internet access), you must ensure that every Edge Node can communicate with a Leader that is also on-prem (that is, not in Cribl.Cloud). > See [Requirements](requirements) for detailed information about system and OS requirements for a Cribl Edge deployment. {.box .info} ## Types of Deployment - **[Cribl.Cloud](deploy-cloud)**: Quickly launch a Cribl-managed deployment of the combined Cribl applications suite (Edge, [Stream](/stream/), [Search](/search/), and [Lake](/lake/)). In Cribl.Cloud, Cribl provisions and manages all infrastructure on your behalf. - **Managed Edge**: A central Leader Node controls, manages, and pushes configuration updates to all managed Edge Nodes. This deployment type provides a centralized view for multiple Edge instances, which is beneficial for large-scale deployments of Cribl Edge. - **Single-instance**: Single-instance Edge Nodes operate without a central Leader. You will configure and manage Edge Nodes locally. Single-instance Edge is suitable for smaller deployments or environments with limited network connectivity. When you have a large number of Edge Nodes to manage, you can use Fleets to group Nodes together and apply configurations centrally. Use [Fleet Management](fleet-management) to accommodate increased load. See [Add and Update Edge Nodes](edge-nodes-add-update#bootstrap) to streamline deploying Edge Nodes via scripting. ## Leader Scalability {#scaling} Our [System Requirements](#requirements) suffice for on-prem Leaders handling up to 10,000 Edge Nodes. To support more than 10,000 Nodes, see our [Planning Large-Scale Deployments of Cribl Edge](how-to-scale-edge) guide. For large on-prem deployments handling high traffic, review the recommended OS-level tuning detailed in [OS Tuning for Large Deployments](os-tuning). ## About Billing and Usage Cribl.Cloud offers a one-page view of your total credits consumed and remaining credits for the current active contract in place. This is called Cribl FinOps Center. Here, you can view per-product consumption for the Cribl products you use. The **Invoices** tab lets you download and export your usage by month. For more details, go to the [FinOps Center](/billing-licensing/finops-center) docs. ### On-Prem Licenses If you're deploying on-prem, there are three license options. The [Cribl Plans](https://cribl.io/pricing/edge/?product=software-license) page provides details feature comparisons for each license. You can configure [Connected Environments](cloud-connections) to use the Cribl.Cloud FinOps Center billing model with your on-prem deployments instead of managing multiple licenses. ## Permissions and Rights You do **not** need elevated privileges to install Edge. However, you will need: * Administrator (or equivalent) rights in order to enable Edge to start on boot. * Sufficient rights to access the resources that need monitoring - files, metrics, and so on. > ##### Network Requirement (DPI/IPS Exclusion) > Deep Packet Inspection (DPI) and Intrusion Prevention Systems (IPS) on network devices situated between your Edge Fleets can cause high resource utilization and connection instability in all environments (both Cribl.Cloud and on-prem). > Explicitly exclude all Cribl data streams from DPI/IPS inspection for stable operations and optimal performance. {.box .warning} ## Performance Considerations As with most data-collection and -processing applications, Cribl Edge's expected resource utilization will be proportional to the data volume and type of processing. For instance, a Function that adds a static field on an event will perform faster than one that applies a regex to find and replace a string. * Processing performance is proportional to CPU clock speed. * All processing happens in-memory. * Processing does not require significant disk allocation. Thinking about your planned Edge deployment as a whole, it's critical to consider **cardinality**: how many Fleets, of what size, will send metrics to a given Leader. In a very low-cardinality deployment, a Leader Node might aggregate metrics from one small Fleet; in a very high-cardinality deployment, a Leader Node might aggregate metrics from many large Fleets. Too many Edge Nodes sending too many metrics can degrade Leader performance and/or integrity. By carefully choosing what metrics each Fleet sends to its Leader Node, you can ensure that you collect the metrics most important to you, within the limits of the Leader's capacity to process them. As part of your deployment planning, decide which of the following four sets of metrics each Fleet in your deployment will send to its Leader Node: * **Minimal**: Limited to metrics for events and bytes in and out. Recommended for high-cardinality deployments. * **Basic** (the default set): All the metrics required to display all monitoring data available in the Edge UI. Contains all the metrics in the **Minimal** set, and more. * **All**: All metrics, sent without filtering. * **Custom**: Only metrics that match a JavaScript expression that you define. For a listing of the metrics each set provides, see [Control Metrics in Cribl Edge](internal-metrics#edge-metrics-controls). ## Configure Edge Node Count Enter the estimated number of Edge Nodes in this deployment, which is used to calculate how many Edge-specific connections service processes to spawn. Changing this number could restart any currently running service processes. If left blank, defaults to 0. To configure the Edge Node Count: 1. From **Settings**, select the **Global** tab, then select **General Settings**. 1. In an on-prem deployment, select **Limits**, and then **Others**. 1. Enter the number of Edge Nodes in the **Edge Nodes count** field. ## Configure Connection Processes {#connection} To configure the connection processes for your Edge Nodes in an on-prem deployment: 1. From **Settings**, select the **Global** tab, select **Service Processes**, and then select **Services**. 1. Confirm that **Connections listener number of processes** is set to its default `1`. > The **Connections listener number of processes** is automatically determined by the **Edge Node Count** setting you enter above. Any value you enter manually will be overridden by this calculation. {.box .warning} ############################################################ # SOURCE: https://docs.cribl.io/edge/requirements.md ############################################################ # OS and System Requirements For a successful Cribl Edge deployment, verify that your system meets the minimum hardware and software specifications outlined below. > All the quantities listed below are **minimum** requirements. > Adjust them as needed based on your specific use case. > {.box .info} ## OS Requirements You can install Cribl Edge Nodes on Linux, Windows, and macOS systems. ### Linux Requirements Cribl Edge Nodes can run on any common Linux distribution that fulfils the following criteria: - 64-bit kernel >= 3.10 - glibc >= 2.17 - OpenSSL >= 3.0 (if FIPS mode is enabled) Highly customized or rare Linux distributions might not be supported even when based on a supported kernel version. Enforcing mode in SELinux is supported, but not required. #### Tested Linux Platforms Cribl tests the following Linux versions to confirm compatibility with the supported kernel. This list does not constitute a comprehensive record of all supported distributions and versions. - Ubuntu 24.04 - RHEL 9, 9.3 - CentOS Stream 9 - SUSE Linux Enterprise Server 15.6 - Amazon Linux 2023 > As of October 16, 2024, Cribl has deprecated support for the CentOS Linux 7 distribution, which reached its end of life on June 30, 2024. > {.box .info} ### Windows Requirements Cribl Edge supports these versions of Windows: |
Version
|Notes| |-------------|----------------| |Windows 10 and 11| You can deploy Cribl Edge on laptops, desktops, and workstations running Windows 10 and 11.
Keep these things in mind when deploying Cribl Edge on Windows 10 and 11 workstations:
  • Cribl Edge might lose some data sent to TCP Destinations after a workstation resumes from a suspended or sleep state. This happens when the data is in local network buffers but hasn't been sent out to the Destination. Instead, you can send data to an HTTP Destination.
  • You might see partially broken events after a laptop resumes from a suspended state.
  • HTTP Destinations might contain duplicate events.
  • Some users have observed excessive logging when a Leader is unavailable to receive heartbeat messages from an Edge Node.
| | Windows Server 2016
Windows Server 2019
Windows Server 2022
Windows Server 2025 | Functionality is the same as generally supported Windows Server platforms. | ### MacOS Requirements {#macosreq} Cribl Edge supports the following macOS versions: 26 (Tahoe), 15 (Sequoia), 14 (Sonoma). You can install Cribl Edge on both Intel and Apple silicon processors. ## System Requirements Edge Nodes should have sufficient CPU, RAM, network, and storage capacity to handle your specific workload. While minimum specifications are provided, optimal configurations vary widely. Consider data volume, types, processing needs, and organizational standards when selecting hardware. Make sure to test the performance of your Edge Nodes before deploying to production. Minimum application requirements for Edge Nodes are: - ~1 Ghz processor - 1024 MB RAM - 5 GB free disk space per volume for operational purposes If your installation uses multiple volumes (for example, one volume to store [persistent queues](persistent-queues) and one for Destination [staging directories](destinations#staging-directory)), 5GB is the minimum disk space for each of those volumes. You can configure the disk space limit per Fleet with the [**Min free disk space**](fleet-settings#storage) setting. > See also [Cribl Stream Requirements](/stream/requirements) to learn about the requirements for the Leader Node. {.box .info} ## Browser Support {#browser} The Cribl Edge UI can run on Chrome, Firefox, Safari, and Microsoft Edge, on their five most-recent versions. ############################################################ # SOURCE: https://docs.cribl.io/edge/how-to-scale-edge.md ############################################################ # Plan Large-Scale Deployments of Cribl Edge Learn how to scale on-prem Cribl Edge deployments to support one Leader managing up to 250,000 Nodes. --- Our standard [Deployment Planning](deploy-planning) guide is a great place to start if you intend to deploy 10,000 or fewer Nodes in your Cribl Edge environment. For larger deployments, an on-prem Leader can support a maximum of 250,000 Edge Nodes when metrics are set to **Minimal** mode and 100,000 Edge Nodes with metrics set to **Basic**. This guide covers: - The specific Leader configuration we recommend for best performance. - Overview of upgrading a large Cribl Edge deployment. - Limitations to the UI resulting from a large number of Edge Nodes. ## Recommended On-Prem Leader Configuration The base configuration detailed on [Cribl Stream Sizing and Scaling](/stream/scaling#vms) is a good starting point. From there, you can configure these settings on the on-prem Leader so it can manage up to 250,000 Edge Nodes: - Add 2GB of RAM for every 10,000 Edge Nodes. - Deploy one vCPU core for every 10,000 Edge Nodes. - For Cribl Edge to support up to 100,000 Nodes, you can [configure internal metrics](internal-metrics#edge-metrics-controls) to **Basic** in **Fleet Settings**. - For 250,000 Nodes, you must configure internal metrics to **Minimal** in **Fleet Settings**. >You should configure these metrics for every Fleet if your Edge Node count >is more than 10,000. See [Performance Considerations](deploy-planning#performance-considerations) >for more information. {.box .info} - To spin up the right number of connection processes, add the number of Edge Nodes you will deploy into the [**Edge Nodes Count** field](deploy-planning#configure-edge-node-count). This field crunches numbers in the background and automatically spins up the correct number of Edge connection processes for you. - There is no change to the default values when pushing config bundles from the Leader. ## Upgrading a Large Number of Edge Nodes The [upgrading framework](upgrading) allows Edge Nodes to pull down upgrade packages from the Leader asynchronously, rather than the Leader pushing packages to Nodes all at one time. Nodes communicate to the Leader every 60 seconds via a heartbeat. Additionally, Nodes request upgrade packages from the Leader in batches of 500. This allows you to upgrade Nodes without overloading the Leader, even with a large number of Nodes. >In our controlled test environment, we found that >upgrading can take 25-40 minutes. This is an expected time frame >to upgrade that number of Nodes. {.box .info} ## User Interface Limitations For Fleets with a large number of Edge Nodes, the UI is limited in certain places where a complete list of Nodes can't be displayed. ### Searching for Nodes in the Explore Tab The [**Node**](explore-nodes) field in the **Explore** tab returns only the first 100 matching Nodes. When you start typing, the results match the search query and are sorted alphabetically by hostname. ### Previewing Node Mappings Preview Node mappings by selecting **Mappings** in the Leader Node's sidebar. (Only the first 10,000 mappings are displayed.) ### Other Limitations - **Logs**: The drop-down where you can select an Edge Node will display a maximum of 100 Nodes. - **Import Edge Data**: The **Import Edge Data** window in Cribl Stream returns a maximum of 100 Edge Nodes. - **Test tab**: The **Test** tab on Destinations displays a maximum of 100 results. - **KMS Status report**: In **Fleet Settings**, the **KMS Status report** (under **Security**) does not display all Nodes. Instead, search for your desired Node. ############################################################ # SOURCE: https://docs.cribl.io/edge/setting-up-leader-and-edge-nodes.md ############################################################ # Set Up Leader and Edge Nodes Configure a Leader Node and a Cribl Edge Node. --- This page covers how to: - [Configure a Leader Node](#config-leader) - [Configure an Edge Node](#config-edge) ## Configure a Leader Node {#config-leader} You can configure a Leader Node either through the UI or through the `instance.yml` config file. ### Use the UI 1. Navigate to **Settings** > **Global** > **Distributed Settings** > **General Settings**. 1. Select **Mode**: **Leader**. 1. Select the **Leader Settings** menu. 1. Confirm or enter the required Leader settings (**Address** and **Port**). 2. Confirm Leader API Access: Toggle **Forward to Leader API** on (default) to enable API requests on the distributed port and provide backward compatibility. 3. Customize the optional settings if desired. 4. Select **Save** to restart the Cribl Edge server. ### Add Authentication Tokens To enable the Leader to communicate with Edge Nodes, you need to create an authentication token. A provisioning token lets you deploy multiple Edge Nodes. See [Create a New Provisioning Token](securing-auth-token#create) for information on how to create and manage authentication tokens. ### Edge Node UI Access {#edge-access} This useful option enables you to click through from the Leader's **Edge Nodes** page to an authenticated view of each Node's UI. We call this [Teleporting into an Edge Node](managing-edge-nodes#teleport-into-an-edge-node). The instructions below correspond to enabling the `groups.yml` file's `workerRemoteAccess` configuration key. To enable teleporting (remote UI access) to Nodes from the Leader's UI: 1. Select **Fleets** from the sidebar. 1. For each desired Fleet, toggle on **Teleport**. ![Manage Fleets](edge-node-ui-access-4.12.2.png) {border="true" scale="70%"} 3. From the sidebar, select **Edge Nodes**. 4. On the **Edge Nodes** page, click the link for any Node you want to teleport into. To confirm that you are remotely viewing a Edge Node's UI, Cribl Edge displays a purple border, with a badge labeled **Viewing host:** ``. ![Authenticated view of an Edge Node](ed-teleport-node.4cf3e55509.png) {border="true"} > The Leader will override any changes that you make directly to this Edge Node. {.box .warning} #### Use the YAML Config File In `$CRIBL_HOME/local/_system/instance.yml` (`C:\ProgramData\Cribl\local\_system\instance.yml` on Windows), under the `distributed` section, set `mode` to `master`: ```yaml {title="$CRIBL_HOME/local/_system/instance.yml or C:\ProgramData\Cribl\local\_system\instance.yml"} distributed: mode: master master: host: port: 4200 forwardToLeaderApi: true tls: disabled: true ipWhitelistRegex: /.*/ authToken: enabledWorkerRemoteAccess: false compression: none connectionTimeout: 5000 writeTimeout: 10000 ``` ### Persisting Socket Connections {#socket} A distributed deployment creates socket files for inter-process communication (IPC) between the Leader and distributed processes and services. These sockets are essential for ensuring that Edge Nodes successfully connect to the Leader, and for certain metrics services. On the Leader's host, the default location for these files is the operating system's temp directory (for example, `/tmp`). Many Linux distros maintain a system cleaner service (for example, [systemd-tmpfiles](https://man.archlinux.org/man/systemd-tmpfiles-clean.service.8)) that removes files from this directory periodically, such as every 10 days. If Cribl's sockets are removed, this breaks certain UI pages, such as those for [Fleets](managing-edge-nodes#fleets-tab) and [Monitoring](monitoring). You can protect the sockets in either of two ways. #### Block the Cleaner {#block} Stop the host OS from cleaning socket files out of `/tmp/cribl-*` subdirectories. For example, on Amazon Linux 2 instances, add a new `tmp.conf` file to `/etc/tmpfiles.d` with the line: `X /tmp/cribl-*`. To restart the system cleaner here and reload its configuration, use this command: ```shell sudo systemctl restart systemd-tmpfiles-clean.service ``` #### Move the Sockets {#move} Alternatively, you can move Cribl's socket files to a different directory. This directory must be outside your operating system's temp directory, and the user that owns the `cribl` process must have the necessary permissions to write to it. In Unix-like operating systems, the maximum length for Unix domain socket paths is 108 bytes. To minimize the path length, use a directory that is close to the root, such as `/var/tmp`. In the UI, you specify the directory at **Settings** > **Global Settings** > **System** > **Distributed Settings** > **Leader Settings** > **Helper processes socket dir**. ## Configure an Edge Node {#config-edge} On each endpoint, you can configure Cribl Edge variously through the UI, the `instance.yml` config file, environment variables, or the command line. ### Use the UI 1. Navigate to **Settings** > **Global** > **Distributed Settings** > **General Settings**. 1. Select **Mode**: **Managed Edge**. 1. Select the **Leader Settings** menu. 1. Confirm or enter the required **Address** (for example, `criblleader.mycompany.com`). Customize the optional settings if desired. 1. Select **Save** to restart the Cribl server. ### Use the YAML Config File In `$CRIBL_HOME/local/_system/instance.yml` (`C:\ProgramData\Cribl\local\_system\instance.yml` on Windows), under the `distributed` section, set `mode` to `managed-edge`: ```yaml {title="$CRIBL_HOME/local/_system/instance.yml or C:\ProgramData\Cribl\local\_system\instance.yml"} distributed: mode: managed-edge envRegex: /^CRIBL_/ master: host: port: 4200 authToken: compression: none tls: disabled: true connectionTimeout: 5000 writeTimeout: 10000 tags: - tag1 - tag2 - tag42 group: teamsters ``` ### Use Environment Variables You can configure Edge Nodes via environment variables, as in this example: `CRIBL_DIST_LEADER_URL=tcp://@:4203 ./cribl start` For additional details, see [Configure Environment Variables](configure-env-vars). ### Use the Command Line You can configure an Edge Node using CLI commands of this form: ```shell ./cribl mode-managed-edge -H -p -u [options] [args] ``` The command requires the `-H`, `-p`, and `-u` parameters. For other options, see the [CLI Reference for mode-managed-edge](cli-mode-managed-edge). Here is an example command: ```shell ./cribl mode-managed-edge -H -p -u && ./cribl restart ``` Edge will need to restart after you issue this command. ############################################################ # SOURCE: https://docs.cribl.io/edge/outpost.md ############################################################ # Connect Nodes to Leader Through Cribl Outpost Simplify Node-to-Leader communication with Cribl Outpost. --- Cribl Outpost simplifies management of deployments by acting as a relay between individual Edge Nodes or Stream Workers and the Leader Node. Once you establish an Outpost and configure it to accept traffic from Edge Nodes or Stream Workers, control plane communication between those Nodes and the Leader will pass through the Outpost. Cribl Outpost is ideal in situations where you can't establish direct communication between Edge Nodes or Workers and the Leader, for example due to restrictions in opening up firewall ports. Using an Outpost limits the need to set up third-party proxies and simplifies maintenance by reducing the complexity of firewall setups. > Cribl Outpost requires an Enterprise plan or Enterprise license. For details, see [Pricing](https://cribl.io/pricing/). > > If you connect an Outpost to a Leader that does not have a proper plan or license, > the Outpost node will close the listener for communication incoming from Edge Nodes or Workers, > but will be shown as healthy on the Leader. {.box .info} ## How Outpost Works An Outpost is a special type of Node that rests between Edge Nodes or Stream Workers and the Leader. ![Overview of how Outpost connects Leader with Edge Nodes and Stream Workers](outpost-diagram-4.15.png) {border="false" scale="90%"} For an individual Edge Node or Worker, an Outpost is indistinguishable from the Leader: Nodes communicate with the Outpost the same way they would with a Leader, using the same configuration (for example, using the URL defined in the `CRIBL_DIST_LEADER_URL` environment variable or in `instance.yml`). Instead of connecting directly to multiple Nodes (possibly thousands), the Leader maintains those connections with one Outpost only. This means you only need to configure communication lines such as firewall exceptions once per Outpost. ## Outpost Capacity You can connect a maximum of 28,000 Edge Nodes to a single Outpost. The specific number of possible connections up to this limit depends on the Outpost Node specifications, in particular on CPU and RAM. The recommended specifications for serving a given number of Edge Nodes are as follows: | Number of Edge Nodes | vCPU | RAM | Connection listener processes | | --- | --- | --- | --- | | up to 10,000 | 2 | 4 GiB | 1 | | 10,000 - 25,000 | 4 | 8 GiB | 2 | While the maximum limit is 28,000 Edge Nodes, if you need to connect more than 25,000 Nodes, Cribl recommends using more than one Outpost to share the load. ## High Availability for Outposts Outposts only participate in control plane communication between the Leader and Edge Nodes. This means that data plane communication (actual data flow) continues successfully even if an Outpost Node becomes unavailable. However, and Outpost Node going down will interrupt control plane communications, including downloading latest configuration changes or product updates. You can ensure continued flow of control plane communications by deploying multiple Outpost Nodes behind a network load balancer or a round-robin DNS. In such a case, point all Node that should connect to the Outpost at the load balancer instead. ############################################################ # SOURCE: https://docs.cribl.io/edge/set-up-outpost.md ############################################################ # Set Up Cribl Outpost Create a Cribl Outpost to relay communication between Edge Nodes and the Leader. --- ## Prerequisites Cribl Outpost requires an Enterprise plan or Enterprise license. For details, see [Pricing](https://cribl.io/pricing/). You can install Cribl Outpost on Linux only. Do not run an Outpost Node on the same host as a Stream Worker to avoid both Nodes competing for resources. Before deploying an Outpost Node, ensure you have an authentication token created on the Leader. See [Create and Manage Authentication Tokens](securing-auth-token) for information on how to create and manage authentication tokens. ## Prepare Outpost Group The Outpost Group defines the listener URL on which Edge Nodes connect to the Outpost, TLS settings that secure that connection, as well as other options such as the retention time for disconnected Outpost Nodes. Before you add an Outpost Node, revise the settings in the `default_outpost` Group and, if needed, change them, or create a new Outpost Group. To create a new Outpost Group: 1. In the sidebar, select **Outposts**, then select **Add Outpost Group**. 1. Enter a **Name** for the group, an optional **Description**, and **Tags**. 1. In **Time to keep disconnected Outposts**, define how long the Group should retain information about an Outpost that disconnects from the Leader. Leave empty to use the default of one day. 1. Select **Save**. 1. Select the new Group you created, and then **Settings** to configure its more advanced parameters. 1. In **Distributed Settings > Listener Settings**, configure **Address** and **Port**. These will form the URL that Edge Nodes will use to connect to Outposts in this Group. 1. In **Distributed Settings > TLS Settings**, enable **Use TLS** to secure Outpost-Edge Node communication with TLS. If you enable TLS, you also need to provide certificate and private key information, as needed. 1. Optionally, configure any other Outpost Group settings. Refer to [Outpost Group Settings](outpost-group-settings) for more information. > In versions older than v4.16, TLS information for Outposts was included in the individual Outpost Node settings > instead of the Outpost Group. > On upgrade to v4.16, Outposts Nodes running older versions are placed in the `default_outpost` Group. {.box .info} ## Create an Outpost There are two ways of adding a new Outpost Node: - using the [bootstrap script](#bootstrap) provided in the UI - from a [binary file](#binary) ### Add an Outpost with a Bootstrap Script {#bootstrap} To add a new Outpost Node using a CLI bootstrap script: 1. From the sidebar, select **Outpost**, then select an Outpost Group. 1. Select **Add/Update Outpost Node**, then select **Add**. 1. Fill and modify the deployment option fields: - The **Install package location** defaults to `Cribl CDN`. If desired, change this to `Download URL`. - Enter the authentication token in **Auth token**. (For more information about creating tokens, see [Create a New Provisioning Token](securing-auth-token#create).) - As needed, correct the target **Outpost Group**, as well as the **Leader hostname/IP** (URI). - As needed, correct the **User** and **User Group** to run Cribl as. - As needed, correct the **Installation directory**. 1. Optionally, add **Tags** that you can use for filtering and grouping Outposts. Use a tab or hard return between (arbitrary) tag names. 1. Copy the resulting script to your clipboard. Finally, to add the Outpost, paste the script onto the command line where you want to set up the node, and execute it. If your script successfully added the Outpost, you will see it in the **Outposts** list for your selected group. ### Add an Outpost from a Binary File {#binary} To add a new Outpost Node using a downloaded binary file: #### Download and Untar the Binary 1. Go to the Cribl [Download page](https://www.cribl.io/download) and set the **Software** drop-down to `Cribl Suite (Edge and Stream)` for your processor architecture. 1. Select **Download now** to get the `.tgz` archive. 1. Un-tar the install package in your directory of choice: ```shell cd /opt/ tar xvzf cribl---.tgz ``` #### Set Installation Mode Set the installation mode to `mode-outpost` to connect the Outpost to the designated Leader. Use one of the authentication tokens as `` to allow Nodes to connect to the Leader: ```shell /opt/cribl/bin/cribl mode-outpost / -H / -p / -u / -S 1 ``` > You can use SOCKS proxies for the communication between Outpost Nodes and the Leader. > See [Configure SOCKS Proxy](proxy-socks-config) for more information. {.box .success} ##### Token `` must match an existing authentication token. For more information about creating tokens, see [Create a New Provisioning Token](securing-auth-token#create). ##### TLS The `-S 1` parameter enables secure communication between the Outpost Node and the Leader via TLS. If you omit this parameter, the connection will not use TLS. However, TLS must be enabled for the Outpost Node to connect to a Leader in Cribl.Cloud. ##### Group By default, a new Outpost Node will be placed in the `default_outpost` group. You can specify a different Group by providing the `-g` parameter to the `mode-outpost` command, for example: ```shell /opt/cribl/bin/cribl mode-outpost / -H / -p / -u / -g / -S 1 ``` #### Configure Installation as a Service Finally, configure the installation as a service and start it: ```shell sudo /opt/cribl/bin/cribl boot-start enable -m systemd -u cribl sudo systemctl restart cribl-outpost.service ``` At this point your Cribl Outpost is ready for use and you can start configuring Edge Nodes to connect to it. ## Connect Nodes to an Outpost {#connect} Edge Nodes see Outpost in the same way as a Leader Node. This means that, to connect a Node to an Outpost, you only need to provide the Outpost listener URL and the Leader auth token. The Outpost doesn't have a separate auth token. When configuring Node connection, use the auth token of the Leader. Configure the connection either from Settings (**Global > Distributed Settings > Leader Settings**), or by setting the `CRIBL_DIST_LEADER_URL` environment variable: ``` CRIBL_DIST_LEADER_URL=tcp://@: ``` ############################################################ # SOURCE: https://docs.cribl.io/edge/manage-outpost.md ############################################################ ############################################################ # SOURCE: https://docs.cribl.io/edge/outpost-group-settings.md ############################################################ # Configure Outpost Group Settings Configure settings for an Outpost Groups, including connection parameters, retention of disconnected nodes, proxy, storage, and TLS settings. --- > Required Permission: **Admin** > {.box .info} To edit Outpost Group settings: 1. In the sidebar, select **Outposts**. 1. Select an Outpost Group, then go to the **Settings** tab. ## General Settings {#general} ### Outpost Group Configuration You can configure the following general Outpost Group options on the **Overview** tab: |
Outpost Group Configuration Setting
|Description| |---------------------------|-----------| |**Description**|Optionally, add or edit the Outpost Group description.| |**Tags**|Use tags to organize Outpost Groups into logical categories.| |**Time to keep disconnected Outposts**|Configure how long the Outpost Group should retain information about an Outpost that disconnects from the Leader. Format examples: `8h`, `5d`, `1w` (format defaults to days if you only specify a number). Default: 1 day.| ### API Server Settings #### General You can set the following options for the API server. |
API Server Setting
|Description| |------------------|-----------| |**Host**|The hostname or IP address you want to bind the API server to.
  • Defaults to `0.0.0.0`.
  • You can override the value with the `CRIBL_API_HOST` [environment variable](environment-variables).
| |**Port**|API port to listen to.
  • Defaults to `9000`.
  • You can override the value with the `CRIBL_API_PORT` [environment variable](environment-variables).
| #### TLS For information on TLS options, see [Configure TLS](securing-configure-tls). ### Proxy Settings |
Proxy Setting
|Description| |---------------------------|-----------| |**Use proxy env vars**|Honors the `HTTP_PROXY/HTTPS_PROXY` environment variables. Defaults to toggled on.

Cribl prioritizes environment variables for proxy settings in this order: Process, User, and System.

If your Cribl service is managed by a service manager other than systemd (such as upstart or init), the `Use proxy env vars` toggle might not behave as expected because Cribl might prioritize environment variables set by the service manager instead of using the proxy settings you intended.| ### Limits The **Limits** tab provides access to controls for metrics, storage, metadata, jobs, the Redis cache and connections to it, and CPU settings. #### Storage {#storage} You can configure the following options for storage: |
Storage Setting
|Description| |---------------------------|-----------| |**Min free disk space**| The minimum amount of disk space on the host before various features take measures to prevent disk usage (KB, MB, and so on). Default: `5 GB`. To avoid the ["Unable to write to the filesystem, disk space low" error](/stream/common-errors/#unable-to-write-to-the-filesystem-disk-space-low), ensure that the available disk space remains above this threshold by monitoring disk usage and configuring alerts.| #### Metadata **Event metadata sources**: List of event metadata sources to enable. Available sources: `os`, `cribl`, `aws`, `env`, and `kube`. No sources are enabled by default. ### SNI |
SNI Setting
|Description| |---------------------------|-----------| |**Disable SNI-based connection routing**|This setting affects how the Cribl Edge control plane routes connections.| > Do not change this setting without consulting Support first. > {.box .warning} ### Support |
Support Setting
|Description| |---------------------------|-----------| |**Feature Flag Overrides**|Cribl thoroughly tests all releases in Cribl.Cloud environments to ensure stability and reliability. However, new features can sometimes behave unpredictably in customer-managed data environments. The scale of some environments and the complexity of many possible configurations make it difficult to test for every possible scenario, occasionally leading to unforeseen issues.

To ensure the stability of your production environment, Cribl Stream includes a safety mechanism that makes it possible to disable specific new features if they are causing unexpected issues. This is a customer-first tool designed to minimize impact and avoid the need to roll back upgrades or wait for a full patch release.

If you suspect that a new feature is impacting your environment, please contact the Support team for assistance. This process ensures that Cribl can quickly stabilize your environment while also collecting the necessary information to improve Cribl Stream for everyone.

**Do not change this setting without consulting Support first.**| |**Log file max size**|Maximum size of each log file before rotation. Enter a numeral with units of KB or MB (for example, "5 MB", "1024 KB"). Default: 5 MB. Minimum: 1 MB.| |**Number of log files to keep**| Number of rotated log files to keep before purging. Default: 5. Range: 1-100. Only new rotations use this limit. Existing files above the previous limit are not removed.| ### Distributed Settings #### Listener Settings |
Listener Setting
|Description| |------------------|-----------| |**Address**|The hostname or IP address you want to bind the API server to.| |**Port**|API port to listen to. | |**IP allowlist regex**|Regex matching IP addresses that are allowed to establish a connection.| #### TLS Settings For information on TLS options, see the documentation for any Source or Destination that supports TLS. ### Service Process #### Services |
Services Setting
|Description| |---------------------------|-----------| |**Number of connection listener processes**|The number of Outpost connection listeners to spawn. Positive numbers specify an absolute number of listeners. Negative numbers specify a number of listeners relative to the number of CPUs in the system. The default is `-2`.| ## Other Settings This page's remaining options work essentially the same way as their counterparts in **Settings** > **Global**. Use the following links for details about [logging](monitoring#log_settings) levels/redactions and [security](securing-and-monitoring). ############################################################ # SOURCE: https://docs.cribl.io/edge/version-control.md ############################################################ # Set Up Version Control As part of the Cribl Edge installation process for on-prem deployments, verify that Git is installed on the hosts running your deployment. Git is a required component for various reasons: - It is a dependency for many Cribl Edge features. - The [Monitoring > Licensing](monitoring#licensing) dashboard will display configuration change markers only if you have `git` installed. - All configuration changes must be committed before they are deployed. The Leader notifies Edge Nodes that a new configuration is available, and Edge Nodes pull the new configuration from the Leader Node. > See [Commit and Deploy Changes](commit-deploy) for more information about how to deploy changes with the UI. You can also use the Cribl API to automate commit and deploy commands. Read [Commit and Deploy Changes](/cribl-as-code/commit-deploy/) in the API documentation for more information. > {.box .info} ## Requirements Cribl Edge requires Git **1.8.3.1.** or later. For [distributed deployments](requirements#git), `git` **must** be installed and available locally on the host running the Leader Node. ## Verify Git To verify that `git` is available and running the required version, run: ```bash git --version ``` ## Install Git To install Git, see the [Git Installation](https://git-scm.com/install/) steps in the official Git documentation. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-nodes-config-bundle.md ############################################################ # Manage Edge Node Config Bundles Learn about Edge Node config bundles and how to manage them --- ## Config Bundles Config bundles are compressed archives of all config files and associated data that an Edge Node needs to operate. Both Leader and Worker Nodes automatically manage config bundles in the following ways. ## Bundle Storage and Delivery The delivery mechanism for config bundles depends on where your Leader resides: - **Cribl.Cloud Leader**: Bundle storage is managed for you in a Cribl-owned Amazon S3 bucket. You do not need to configure S3 settings. Edge Nodes will automatically attempt to pull from the Cribl S3 bucket first, then fall back to the Leader over port `4200`. For details on preventing deployment delays by white-listing the required S3 and Leader endpoints, see [Network Access for Config Bundles](/stream/cloud-workers#network). - **Customer-managed Leader**: By default, the Leader serves bundles directly. To reduce Leader load, you can store bundles in S3 using your own bucket. For details, see [Store Bundles Remotely](#remote-bundle). For details on ports, see [Ports](ports) and [Required Ports in Cribl.Cloud](reference-architectures/arch-cloud-ports). ## Bundle Lifecycle and Retention Regardless of where bundles are stored, Cribl Edge maintains a cleanup policy to optimize disk space. ### Leader Node Bundles The Leader creates bundles upon Deploy, and manages them as follows: - Bundles are wiped clean on startup. - While running, at most 5 bundles per group are kept. - Bundle cleanup is invoked when a new bundle is created. ### Edge Node Bundles The Edge Node pulls bundles from the Leader and manages them as follows: - Last 5 bundles and backup files are kept. - At any point in time, all files created in the last 10 minutes are kept. - Bundle cleanup is invoked after a reconfigure. ## Store Bundles Remotely {#remote-bundle} For customer-managed Leaders, you can optionally reduce Leader load by storing bundles in an Amazon S3 bucket. This offloads bundle distribution from the Leader to your designated S3 bucket. Edge Nodes will pull bundles directly from S3, minimizing Leader strain. You can configure bundling in S3 through the following ways: - **UI**: [Configure](setting-up-leader-and-worker-nodes#config-leader-ui) the Leader settings on the Leader Node. In the sidebar, select **Settings**. In the **Global** tab, select **System > Distributed Settings > Leader Settings**. In the **S3 Bundle Bucket URL** field, specify an S3 bucket for remote bundle storage. Format: `s3://${bucket}`. - **YAML**: In the [`instance.yml` config](instanceyml) file, specify the S3 bucket in `master.configBundles.remoteUrl`. - **Environment Variable**: Use the `CRIBL_DIST_LEADER_BUNDLE_URL` [environment variable](environment-variables#distributed). ### Optimized Bundle Delivery from S3 {#optimized-S3bundle} Cribl prioritizes efficient updates for Edge Nodes, regardless of their network environment. Here's how: - **Direct S3 Downloads (Preferred)**: Cribl prioritizes downloading upgrade packages directly from Amazon S3 (S3) whenever possible, ensuring efficient updates for Edge Nodes connected to Cribl.Cloud or an on-premise Leader. The source is specified in the Leader's **Global Settings** > **Upgrades** > **Package source** setting. - **Automatic Failover**: If the S3 download fails, a built-in failover automatically retrieves the bundle from the Leader itself (port `4200`). This redundancy guarantees updates even in challenging network environments, including private networks with restricted internet access. For these networks, Cribl prioritizes a CDN download before reverting to the Leader Node as a final resort. - **Allowlist S3 Access (Optional)**: To further optimize downloads for Edge Nodes with internet access, consider allowlisting the regional Amazon S3 endpoint used by your bundle bucket in your firewall or proxy configuration. For example, endpoints look like `s3.eu-central-1.amazonaws.com` or `s3.us-west-2.amazonaws.com`, and dual-stack variants look like `s3.dualstack.us-west-2.amazonaws.com` or `bucket-name.s3.dualstack.us-west-2.amazonaws.com`. S3 endpoints are regional and do not share a single wildcard hostname, so patterns such as `*.s3.amazonaws.com` are not sufficient for firewall or proxy allowlists. Refer to the [AWS documentation: Using Amazon S3 dual-stack endpoints](https://docs.aws.amazon.com/AmazonS3/latest/API/dual-stack-endpoints.html) for the complete and current list of S3 regional and dual-stack endpoints. ### Authenticating to S3 When storing configuration bundles in an Amazon S3 bucket, Cribl Edge needs appropriate credentials to access the bucket. There are several ways to provide these credentials, with IAM roles being the most secure and recommended approach. #### IAM Roles (Recommended) The best practice is to configure an IAM role with read access to your S3 bucket and attach this role to the EC2 instance (or other AWS service) where your Leader and Edge Nodes are running. Cribl Edge will automatically use the instance's IAM role to authenticate to S3. This method avoids the need to manage AWS credentials directly within Cribl and is the most secure option. To authenticate via IAM roles: 1. Create an IAM role with the `AmazonS3ReadOnlyAccess` policy (or a custom policy with more restrictive permissions if needed) for the S3 bucket containing your bundles. 2. Attach this IAM role to the EC2 instance(s) running your Leader and Worker Nodes. 3. Provide the path to your S3 bucket using the [CRIBL_DIST_LEADER_BUNDLE_URL environment variable](environment-variables#distributed) or the [S3 Bundle Bucket URL field in the **Distributed**/ **Leader** settings](setting-up-leader-and-edge-nodes#use-the-ui) (For example, `s3://your-bucket-name/path/to/bundles`). `path/to/bundles` is optional. #### AWS Access Keys Alternatively, you can provide AWS access keys directly. Ensure the environment in which Cribl Edge runs in contains the following variables: ```bash export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY_ID" export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_ACCESS_KEY" export CRIBL_DIST_LEADER_BUNDLE_URL="s3://your-bucket-name/path/to/bundles" ``` ### Encryption and Backward Compatibility {#compatibility} If your Edge Nodes are running versions older than 4.9.0 and your Leader is v.4.9.0 or newer, deployments will always use Leader-hosted bundles. This happens because of how encryption works: - Newer Leaders encrypt bundles when uploaded to S3 to enhance security and prevent the exposure of sensitive information like secret keys. - Older Edge Nodes check the code for errors by comparing its checksum (a unique identifier). - Since the Edge Nodes check the encrypted code, they will always find errors because the checksum changes after encryption. You might see an error similar to the one below in your logs: `Checksum mismatch, expected=f781b2bace2e1869e840b0ee200b57378ecae985, found=a59af697c140521ea7f42af7630ac1fce88e4ff0"**` ############################################################ # SOURCE: https://docs.cribl.io/edge/configs-and-restarts.md ############################################################ # Configurations and Restart In a Distributed deployment, Edge Nodes poll the Leader for configuration changes. Many of these changes require a quick reload to read the new configuration, while others require a restart of the Cribl processes on the Edge Node. You can **Restart** and **Reload** via the UI. In the sidebar, select **Settings**, then **Global**. Under **System** > **Controls** select **Reload** or **Restart**. Upon restarts, be aware of the following: - Syslog data still being received over UDP might be dropped. - Edge Nodes will temporarily disappear from the Leader's **Workers** or **Edge Nodes** page. - Aggregation and suppression operations will start over. - Edge Nodes' local copies of Monitoring metrics will be dropped. - Cribl Edge will drop any events still in RAM that were bound for persistent queues. (However, PQ data already written to disk will persist through the restart.) Changes that require reloads include configuration changes to: - Functions - Pipelines - Packs - Routes - Lookups - Parquet schemas - Global variables - Fleet Settings > Limits - Fleet Settings > Logging > Levels Changes that require restarts include configuration changes to: - Distributed mode (Leader versus Managed Edge Node or Single instance) - Fleet assignment - Event Breakers - QuickConnect configs - Sources - Destinations - Fleet Settings > General Settings > TLS - Fleet Settings > General Settings > Advanced - Fleet Settings > Worker Processes > Process count and Memory ## How Configuration Changes Apply {#rolling} In a Distributed deployment, how a change applies across each Edge Node in a Fleet depends on the type of change: - **Sources and Destinations**: Cribl Edge restarts Worker Processes on each Edge Node to apply the change. - In Cribl Stream, a Worker Node can run multiple Worker Processes, so they restart in a rolling fashion and the Node keeps processing data during the change. For the rolling rollout mechanics and configurable settings, see [Worker Process Configuration Rollout](/stream/deploying-configurations#worker-process-rolling-restart) in the Cribl Stream docs. - In Cribl Edge, each Edge Node runs a single Worker Process, so it simply restarts that process. - **Routes, Pipelines, and Lookups or other knowledge objects**: Cribl Edge reloads the configuration without restarting Worker Processes, so data flow continues uninterrupted. - In Cribl Stream, reloads also roll out in batches across Worker Processes. If a Worker Process does not finish reloading within the configured timeout, Cribl Stream restarts it. For details, see [Worker Process Configuration Rollout](/stream/deploying-configurations#worker-process-rolling-restart). - **Fleet settings that involve the API Process** (such as API, TLS, Proxy, and Security settings): Cribl Edge restarts all Worker Processes at once rather than in a rolling fashion. All Worker Processes stop before the API Process restarts, and then the API Process starts them again. Some general guidelines to keep in mind: * Most UI interactions, such as changing the order of Functions in a Pipeline or changing the order of Routes, do not require restarts. * Some configuration changes in the **Settings** UI do require restarts. These prompt you for confirmation before restarting. * All direct edits of configuration files in `$CRIBL_HOME/local/` require restarts. * Edge Nodes might temporarily disappear from the Leader's **Workers** or **Edge Nodes** tab while restarting. * A `git commit` command on the Leader Node's host (using a freestanding `git` client not embedded in Cribl's CLI or UI) requires either a reload or restart. * When using the [Cribl App for Splunk](/stream/deploy-splunkapp), changes to Splunk configuration files might or might not require restarts. Please check current [Splunk docs](http://docs.splunk.com). ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-add-second-leader.md ############################################################ # Leader High Availability/Failover To handle unexpected outages in on-prem Distributed deployments, Cribl Edge supports configuring standby Leaders for failover. In this High Availability (HA) scenario, if the primary Leader goes down, one of the other Leaders, called standby Leaders, take its place. This ensures continuity of operation, including functions that require the Leader, such as Collectors and Collector-based Sources, which can ingest data without interruption. For scheduling Collector jobs, [High-availability Collectors](/stream/collectors-ha) complements Leader HA. An eligible Fleet can elect a temporary Worker Captain to orchestrate jobs when the Leader is unreachable, without shared Network File System (NFS). > High-availability Collectors does not replace standby Leaders (or a Cribl.Cloud-managed Leader) when you need full control plane resilience. It only covers Collector job orchestration inside the Fleet. While the Leader is down, you still lack an active Leader for anything that requires one, including the Leader UI and API, new commit and deploy changes, ad hoc Collector runs started from the Leader, license updates to restarted nodes, Leader-side metrics aggregation, and notifications generated on the Leader. During a Leader outage, those capabilities still rely on Leader HA (self-hosted) or on Cribl.Cloud operating the Leader for you. > {.box .info} Cribl.Cloud handles High Availability and configuring standby Leaders automatically, requiring no configuration or action on your part. > For license tiers that support configuring standby Leaders, see [Cribl Pricing](https://cribl.io/pricing/stream/). > {.box .info} ## Primary and Standby Leaders Only one Leader Node is the elected primary at any given time, and only the primary Leader owns Leader state. A standby Leader (or Leaders) takes over as primary in the event of failover, when the primary Leader becomes unavailable. Leader state backed by SQLite, such as Worker connection data, is always written to local disk, because SQLite file locking is not compatible with NFS. With Leader replication enabled, the active git repository is also on local disk and is replicated to the failover volume rather than being read and written across NFS. All changes to configurations and git commits are replicated to a shared failover NFS volume, and from it to the standby Leaders. The shared volume coordinates the Leaders and holds replicated configuration, git data, and shared Leader state. It is not where you install Cribl Edge. See [High Availability Requirements](ha-requirements) for the distinction between the installation directory and the NFS failover volume. If the primary Leader becomes unavailable, a standby Leader takes its place. The standby then pulls the required configuration and the latest git commits from the failover volume. All Edge Nodes will connect to the new primary Leader, which retains the state and metrics of the old primary Leader. By default, a standby Leader reports a standby status from the `GET /health` endpoint, so the load balancer routes client requests only to the primary Leader. When you enable [Active-Active (Proxy) Mode for HA Leaders](ha-requirements#ha-proxy), the load balancer can route requests to either Leader, and the standby proxies incoming requests to the primary. ![Leader High Availability/Failover Design](leaderha_summary.55ac71c8f8.png) {border="false"} ### Git-Backed Configuration and Leader Replication {#git-branch-ha} In Leader High Availability (HA) deployments with GitOps enabled, Leader replication aligns branches. The local Git branch for the active Leader Node matches the branch on the failover (HA) volume repository. For more information about `CRIBL_GIT_REMOTE`, `CRIBL_GIT_BRANCH`, and related bootstrap behavior, see [usage notes for `CRIBL_GIT_REMOTE`](environment-variables#cribl_git_remote-bootstrapforce-sync). ### Leader Settings in High Availability Setups {#leader-settings} When you first configure Leader High Availability, Cribl Edge will create a new [`leader.yml`](leaderyml) file in the local `$CRIBL_HOME/local/cribl` directory and will upload it to the failover volume. Configuration stored in the `leader.yml` file on the failover volume will take precedence over what is stored in the local `instance.yml` file. The `leader.yml` file replicates most of the content of the local `instance.yml`, but leaves out the failover configuration. While running in failover mode, when you change **Settings > Distributed Settings** via the UI, Cribl Edge applies those changes to `leader.yml` in the failover directory. See [Configure Standby Leader Nodes](configure-standby-leaders) for information on how to prepare standby Leaders for a failover scenario. ############################################################ # SOURCE: https://docs.cribl.io/edge/ha-requirements.md ############################################################ # High Availability Requirements Before adding a standby Leader, ensure that you fulfill all requirements in this section. ## Disk Space Requirements {#disk-requirements} Ensure that all Leaders, both the primary and the standby ones, have enough disk space available. You need enough space to hold the contents of the failover volume (except the `state` directory), all your configuration files, plus at least 10 GB in reserve for future use. ## Leader Health Check Timeouts {#timeouts} Configure adequate timeout for Leader health checks to ensure the Leader has enough time to pull all the configuration and the git repository from the failover volume. Too low timeout could results in the Leader being terminated prematurely. The recommended timeout scales with the number of Worker Groups and Fleets the Leader manages. The exact value depends on the size of the git repository, size of the `groups` directory, and the total number of configuration files. Approximate recommendations are: - 2 minutes for smaller deployments - 5 minutes for deployments with > 50 Worker Groups/Fleets - 10 minutes for deployments with > 100 Worker Groups/Fleets ## Git Configuration Requirements If you have git timeout configured in `local/cribl.yml`, ensure that it is equal or greater than the system default of 10 minutes. ## Auth Token Requirements All Leaders must have matching auth tokens. See [Create and Manage Authentication Tokens](securing-auth-token) for more information about creating and managing authentication tokens. ## NFS Requirements > ##### The failover volume is not the installation directory > > The NFS failover volume is separate from each Leader's installation directory. > Install Cribl Edge on fast local disk on every Leader, both primary and standby. > Network filesystems (NFS, EFS, and similar) are not supported for the installation directory. > Use NFS only for the failover volume, which coordinates Leaders and holds replicated configuration, git data, and shared Leader state. > A running Leader in failover mode resolves the `$CRIBL_HOME` variable to a path that depends on its replication state. > Read this requirement as applying to the installation directory rather than to `$CRIBL_HOME`. > See [OS and System Requirements](/stream/requirements) and [Leader High Availability/Failover](deploy-add-second-leader). > {.box .warning} - On all Leader Nodes, use the latest version of the NFS client. **NFSv4 is required.** - Ensure that the NFS volume has at least 100 GB available disk space. - Ensure that the NFS volume's IOPS (Input/Output Operations per Second) is ≥ 200. (Lower IOPS values can cause excessive latency.) - Ensure that ping/latency between the Leader Nodes and NFS is < 50 ms. - Ensure your NFS system supports updating `mtime`. > You can validate the NFS latency using a tool like `ioping`. Navigate to the NFS mount, and enter the following command: > > ```shell > ioping . > ``` > > For details on this particular option, see the [ioping docs](https://github.com/koct9i/ioping/). > {.box .info} ## NFS Mount Option Requirements The Leader Node will access large numbers of files whenever you use the UI or deploy configurations to Edge Nodes. When this happens, NFS's default behavior is to synchronize access time updates for those files, often across multiple availability zones and/or regions. To avoid the problematic latency that this can introduce, Cribl recommends that you add one of the following NFS mount options: 1. `relatime`: Update the access time only if it is more than 24 hours ago, or if the file is being created or modified. This allows you to track general file usage without introducing significant latency in Cribl Edge. To do the same for folders, add the `reldiratime` option. 1. `noatime`: Never update the access time. (Cribl Edge does not need access times to be updated to operate correctly.) This is the most performant option - but you will be unable to see which files are being accessed. To do the same for folders, add the `nodiratime` option. ## Recommended NFS Configuration If you are on AWS, we recommend the following: - Use Amazon's Elastic File System (AWS EFS) for your NFS storage. - Ensure that the user running Cribl Edge has read/write access to the mount point. - Configure the EFS **Throughput mode** to `Enhanced` > `Elastic`. - For details on NFS mount options, see [Recommended NFS mount options](https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html). For best performance, place your Leader Nodes in the same geographic region as the NFS storage. If the Leader and NFS are distant from each other, you might run into the following issues: - Latency in UI and/or API access. - Missing metrics between Leader restarts. - Slower performance on data Collectors. ## Load Balancer Requirements {#loadbalancers} Configure all Leaders behind a load balancer. - [Port `4200`](ports#leader) must be exposed via a network load balancer. - [Port `9000`](ports#leader) can be exposed via an application load balancer or network load balancer. ### Active-Active (Proxy) Mode for HA Leaders {#ha-proxy} By default, a standby Leader returns a standby status (HTTP `420`) from `GET /health`, so a load balancer that routes only to Leaders returning `200` sends client requests to the primary Leader. UI/API requests that reach the standby on port `9000` are proxied to the primary. You can enable Active-Active (Proxy) Mode to simplify load balancer routing. In this mode, both primary and standby Leaders report healthy (`200`), allowing the load balancer to route client requests to either Leader. The standby proxies incoming requests to the elected primary, which preserves single-writer semantics because only the primary owns Leader state. To enable proxy mode, set `connection_proxy.procs` to a nonzero value on each Leader, either in [`service.yml`](serviceyml) or on the Leader's **Service Processes** > **Services** settings page. The standby must be able to reach the primary over port `9000` to forward UI/API traffic. With proxy mode enabled, control-plane connections on port `4200` are also proxied. Ensure firewall rules allow Leader-to-Leader communication on these paths. ### Load Balancer Health Checks {#load-balancer-health-checks} To ensure reliable load balancing for your Leader Nodes, configure health checks using the `GET /health` endpoint. Load balancer health checks are supported only on port `9000`. [Configure TLS](securing-configure-tls) to use `https` for health checks. Otherwise, use `http`. Load balancers that support such health checks include: - Amazon Web Services (AWS) [Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB). Suitable for TCP, UDP, and TLS traffic. - AWS [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) (ALB). Application-aware, suitable for HTTP/HTTPS traffic. - [HAProxy](https://docs.haproxy.org/). - [NGINX Plus](https://docs.nginx.com/nginx/). For optimal performance and to avoid potential throttling, adhere to the following guidelines: - **Polling frequency**: Set your load balancer to check the health endpoint every `60` seconds. This interval aligns with Cribl.Cloud's internal monitoring and prevents excessive API calls. - **Avoid overly frequent checks**: Polling more often than every `60` seconds (for example, every `5` seconds) can overload the Leader's API Process. - **Load balancer routing**: Configure your load balancer to direct traffic exclusively to Leader Nodes that return a `200` status code from the health check. For detailed information on query and response formats for the `GET /health` endpoint, refer to the code example for [querying the health endpoint](/cribl-as-code/query-health-endpoint). > ##### AWS Network Load Balancers > > If you need to access the same target through a Network Load Balancer, use an IP-based target group and deactivate client IP preservation. For details, see: > - [Why can an instance in a target group not reach itself via NLB?](https://repost.aws/questions/QU_9Dcea7NR3W3MzaZKVkcBA/why-can-an-instance-in-a-target-group-not-reach-itself-via-nlb) > - [Why can't a target behind my Network Load Balancer connect to its own Network Load Balancer?](https://repost.aws/knowledge-center/target-connection-fails-load-balancer) > {.box .warning} ### Source-Level Health Checks For many HTTP-based Sources, you can enable a Source-level health check endpoint in the **Advanced Settings** tab. Load balancers can send periodic test requests to these endpoints, and a `200 OK` response indicates that the Source is healthy. Frequent requests to Source-level health check endpoints can trigger throttling settings. In such cases, Cribl will return a `503 Service Unavailable` response, which can be misinterpreted as a service failure. A `503` response may indicate that the health checks are running too frequently instead of an actual service failure. ############################################################ # SOURCE: https://docs.cribl.io/edge/configure-standby-leaders.md ############################################################ # Configure Standby Leader Nodes To prepare your deployment for High Availability, in the configuration for all Leaders, both primary and standby, you must specify the same failover volume - a shared Network File System (NFS) volume. You can configure standby Leader Nodes in the following ways. These configuration options are similar to configuring the primary [Leader Node](setting-up-leader-and-worker-nodes): - [Using the UI](#ui) - [Updating the YAML config file](#yaml) - [Using the Command Line](#cli) - [Using Environment Variables](#env-vars) > Remember, the `$CRIBL_VOLUME_DIR` environment variable overrides `$CRIBL_HOME`. > {.box .success} ## Use the UI {#ui} For all Leader Nodes, both primary and standby, configure the following: 1. In **Settings** > **Global** > **Distributed Settings** > **General Settings**, select **Mode**: `Leader`. 1. Next, on the **Leader Settings** left tab, select **Resiliency**: `Failover`. This exposes several additional fields. 1. In the **Failover volume** field, enter the NFS directory that the configurations and git commits will be replicated to. This directory must be outside of the installation directory. One valid solution is to use `CRIBL_DIST_LEADER_FAILOVER_VOLUME=` (alternatively `CRIBL_DIST_MASTER_FAILOVER_VOLUME`). See [Use Environment Variables](#env-vars) for more information. 1. Optionally, adjust the **Lease refresh period** setting, which determines how often the primary Leader tries to refresh its hold on the Lease file, and the **Missed refresh limit**, which determines how many Lease refresh periods elapse before standby Nodes attempt to promote themselves to primary. Increase these two values to avoid unnecessary failovers if your NFS has higher latency or is occasionally slow. 1. Select **Save** to restart. > When you save the **Resiliency**: `Failover` setting, further **Distributed Settings** changes via the UI will lock for both the primary and backup Leader. (This prevents errors in [bootstrapping Workers](/stream/deploy-workers) due to incomplete token synchronization between the two Leaders.) However, you can still update each Leader's distributed settings by modifying its configuration files. > {.box .warning} ## Use the YAML Config File {#yaml} For all Leader Nodes, both primary and standby, configure the following in `$CRIBL_HOME/local/_system/instance.yml`, under the `distributed` section: 1. Set `resiliency` to `failover`. 1. Specify a volume for the NFS disk to automatically add to the Leader Failover cluster and trigger automated data migration. ```yaml {title="$CRIBL_HOME/local/_system/instance.yml"} distributed: mode: master master: host: port: 4200 resiliency: failover failover: volume: /path/to/nfs ``` > Note that `instance.yml` configs are local, not on the shared NFS volume. > {.box .info} ### Use the Command Line {#cli} For all Leader Nodes, both primary and standby, use a command of this form: `./cribl mode-master -r failover -v /mnt/cribl` For all options, see the [CLI Reference](cli-mode-master). ## Use Environment Variables {#env-vars} For all Leader Nodes, both primary and standby, configure environment variables listed in [Environment Variables Reference: Adding Fallback Leaders](environment-variables#fallback-leaders). ## Address HA Migration Timeouts {#timeouts} When enabling Leader High Availability (HA) on a production system with a lot of data, or when booting up new Leader Nodes, the process of moving data can sometimes take longer than expected. If the system runs out of time during this move, it might only copy part of the data, which can cause problems when the system restarts. To mitigate the risk of incomplete data transfers, temporarily increase the system's transfer time prior to enabling HA. You can do this by adjusting a setting called `TimeoutSec` in the `cribl.service` configuration file. Locate the **Service** section and add or modify the `TimeoutSec` directive. For example, set it to `600` seconds (10 minutes): ``` [Service] TimeoutSec=600 ``` A successful data transfer will be confirmed by specific messages in the system's log, such as: `{"time":"2025-02-17T22:01:46.295Z","cid":"api","channel":"ResiliencyConfigs","level":"info","message":"failover migration is complete"}` A failed migration due to timeout might show logs ending with a system shutdown, like this: `{"time":"2025-02-06T15:29:15.416Z","cid":"api","channel":"ShutdownMgr","level":"info","message":"Starting shutdown ...","reason":"Got SIGTERM","timeout":0}` > After the HA setup is complete, revert the `TimeoutSec` setting to its original value. > Leaving the timeout extended indefinitely can lead to prolonged Leader downtime > if a problem occurs during a future failover. > Make sure to document the original setting before making changes to facilitate easy reversion. {.box .warning} ############################################################ # SOURCE: https://docs.cribl.io/edge/manage-ha.md ############################################################ # Manage High Availability Deployment Manage your High Availability deployment by monitoring Leaders, performing an upgrade, and disabling standby Leader Nodes. ## Monitor Primary and Standby Leader Nodes To view the status of your Leader Nodes: 1. On the top bar, select **Products**, and then select **Stream**. 1. In the sidebar, select **Monitoring**, then **System**, then **Leaders**. 1. In the **Leaders** table, you can see the status of all your Leader, including the roles they play (primary or standby). > This page is only accessible when you have a standby Leader configured. {.box .info} ![Monitoring Leader Nodes](se-monitoring-leaders.ecce85b7d7.png) {border="true"} ## Upgrade a High Availability Deployment > Upgrading the Leader Node through the UI is not supported for Distributed deployments with a standby Leader. > Instead, [use the command line (CLI) to upgrade](upgrading#cli). > {.box .warning} Follow this upgrade order: 1. Stop the standby Leader first. 1. Upgrade the standby Leader. 1. Start the standby Leader. 1. Stop the primary Leader; the upgraded standby will take over automatically through the HA failover mechanism. 1. Upgrade the now-stopped former primary Leader for your [Stream](/stream/upgrading/) or [Edge](/edge/upgrading/) deployment. 1. Start the former primary Leader. It will rejoin and assume the standby role (since the other Leader is currently active). 1. Upgrade Edge Nodes in rolling batches; do not upgrade them to a version newer than the Leader. ## Disable a Standby Leader Cribl recommends that you maintain a standby Leader to ensure continuity in your on-prem Distributed deployment. Should you decide to disable it, contact support to assist you. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-antivirus-exceptions.md ############################################################ # Anti-Virus Exceptions Configure your antivirus to prevent accidental blockage of Cribl Edge. --- If you are running anti-virus software on an Edge instance's host OS, here are general guidelines for minimizing accidental blockage of Edge's normal operation. Your overall goals are to prevent the anti-virus software from locking any files while Edge needs to write to them, and from triggering any changes that Edge would detect as needing to be committed. First, if [persistent queues](persistent-queues) are enabled on any Destinations, exclude any directories that these Destinations write to. This is especially relevant if you're writing queues to any custom locations outside of `$CRIBL_HOME`. Next, for any non-streaming Destinations that you've configured, exclude their staging paths. Next, exclude these subdirectories of `$CRIBL_HOME`: - `state/` - `log/` - `.git/` (usually only exists on Leader Nodes) - `groups/` (on Leader Nodes) - `local/` (on Edge or Leader) Finally, avoid scanning any processes. Except for the queueing/staging directories already listed above, Edge runs everything in memory, so scanning process memory will slow down Edge's processing and reduce throughput. ## Stop Endpoint Security from Blocking Edge on Windows {#endpoint-sec} Antivirus or other endpoint security tools on Windows (such as Windows Defender) may block the `cribl` process. To tell Windows Defender to exclude the Cribl Edge process from its security scan, you can run these commands on the appropriate Windows Edge Nodes: ```bash Add-MpPreference -ExclusionProcess "C:\Program Files\Cribl\bin\nssm.exe" Add-MpPreference -ExclusionProcess "C:\Program Files\Cribl\bin\cribl.exe" Add-MpPreference -ExclusionPath "C:\ProgramData\Cribl" ``` ############################################################ # SOURCE: https://docs.cribl.io/edge/ports.md ############################################################ # Ports Learn which ports need to be open for Cribl Edge and its integrations to function. --- Cribl Edge requires certain ports to be open, and additional ports are needed if you intend to use specific integrations or options to work. ## Leader In a Distributed deployment, the following ports must be open on the Leader Node. Ensure that the Leader is reachable on those ports from **all** Edge Nodes. Default Port | Protocol | Purpose | Direction --- | --- | --- | --- `9000` | HTTP/S | Cribl Edge UI. | In `9000` | HTTP/S | Bootstrapping Fleets from Leader (on-prem). | In `443` | HTTP/S | Bootstrapping Fleets from Leader (Cribl.Cloud). | In `4200` | TCP | Heartbeat/Metrics/Leader requests/notifications to clients (for example: live captures, teleporting, status updates, config bundle notifications, and so on). This traffic is separate from the [Notifications](notifications) feature and its external Notification targets such as email, PagerDuty, Slack, webhooks, or AWS SNS. | In `4200` | HTTP/S | Software upgrade (via [path](upgrading#package-source), not CDN). | In **External Notification targets:** If you configure external [Notification targets](notifications-targets) (for example, email, PagerDuty, webhooks, Slack, or AWS SNS), the Leader must be able to initiate outbound network connections to those services. Ensure your firewall rules allow outbound traffic from the Leader to each target endpoint over the ports and protocols required by that service (commonly HTTPS/443, or SMTP ports for email). Because these ports are target-specific, they are not listed individually here. ## Outpost The following ports are used by [Cribl Outpost](outpost). Default Port | Protocol | Purpose | Direction --- | --- | --- | --- `9000` | TCP | Cribl Outpost UI. Login is disabled, but the [Health endpoint](/cribl-as-code/query-health-endpoint) is available. | In `443` | HTTP/S | Optional port for config bundle downloads from S3 endpoints for Leader-initiated upgrades. When this port is not open, Outpost falls back to bundle downloads from the Leader over HTTP/S 4200. | Out `4200` | TCP | Communication between the Outpost and the Leader. | Out `4200` | TCP | Communication between the Outpost and Edge Nodes. | In `4200` | HTTP/S | Config bundle downloads from the Leader. | Out `4200` | HTTP/S | Receiving config bundle requests from Edge Nodes. | In ## Edge Nodes The following ports are used by Edge Nodes. | Default Port | Protocol | Purpose | Direction | | --- | --- | --- | --- | | `9420` | TCP | Cribl Edge UI. | In | | `9000` | HTTP/S | Communication with the Leader for bootstrapping (on-prem). | Out | `443` | HTTP/S | Communication with the Leader for bootstrapping (hybrid deployment), and with `https://cdn.cribl.io` to download configurations from CDN. | Out | | `4200` | TCP | Heartbeat/Metrics/Leader requests/notifications to clients (for example: live captures, teleporting, status updates, config bundle notifications, and so on). | Out | | `4200` | HTTP/S | Config bundle downloads from the Leader. | Out | ## Other Ports ### Common Ports | Default Port | Protocol | Purpose | Direction | | --- | --- | --- | --- | | `53` | UDP | DNS lookups. | Out | | `389` | TCP | LDAP Auth (non-TLS). | Out | | `443` | HTTP/S | OIDC Auth (TLS). | Out | | `636` | TCP | LDAP Auth (TLS). | Out | ### Integrations and Apps Integrations with specific services via Sources and Destinations or apps may require opening dedicated ports on Edge Nodes. The defaults are listed below, but when configuring each Source or Destination you can choose another port. | Default Port | Protocol | Purpose | Direction | | --- | --- | --- | --- | | `162` | UDP | [SNMP Trap](sources-snmp-traps) collection (non-TLS). The preconfigured SNMP Trap Source listens on port `9162`. | In | | `162` | UDP | [SNMP Trap](destinations-snmp-traps) Destination (non-TLS). | Out | | `443` | HTTP/S | Collection from and output to multiple HTTPS-based Sources and Destinations. | In / Out | | `4317` | TCP | Collection from [OpenTelemetry](sources-otel) (gRPC). | In | | `5986` | HTTP/S | [Windows Event Forwarder](sources-wef) Source. | In | | `8081` | TCP | Kafka Schema Registry. | Out | | `8088` | TCP | [Splunk HEC](sources-splunk-hec) input and output. | In/Out | | `8089` | TCP | [Splunk Search](sources-splunk-search). | In | | `8125` | TCP/UDP | Output to [StatsD](destinations-statsd), [StatsD Extended](destinations-statsd-extended), and [Graphite](destinations-graphite) (non-TLS). | Out | | `9090` | TCP | Collection/discovery from [Prometheus Scraper](sources-prometheus). | Out | | `9092` | TCP | Output to [Confluent Cloud](destinations-confluent) or [Kafka](destinations-kafka), used when no port is provided. | Out | | `9093` | TCP | Output to [Azure Event Hubs](destinations-azure-event-hubs). | Out | | `9200` | HTTP/S | [Elasticsearch API](sources-elastic) Source. | In | | `9514` | TCP/UDP | [Syslog](sources-syslog) Source. | In | | `9997` | TCP | [Splunk TCP](sources-splunk) Source. | Out | | `10060` | TCP | [TCP (Raw)](sources-tcp-raw) data. | In | | `10070` | TCP | [TCP JSON](sources-tcp-json) data. | In | | `10080` | TCP | Collection from [HTTP JSON](sources-https) Sources. | In | | `10200` | HTTP/S | [Cribl HTTP](destinations-cribl-http) Destination. | In | | `10300` | TCP | [Cribl TCP](destinations-cribl-tcp) Destination. | In | ### Cribl.Cloud Cribl.Cloud provides a set of ports linked to Sources enabled by default for your Workspace. To view them: 1. From your Cribl.Cloud Organization's top bar, select **Products**. 1. Then from the sidebar, select **Cribl** > **Workspace**, and then **Data Sources**. Additionally, Cribl.Cloud makes the `20000` - `20010` port range available for configuring other Sources. | Available Ports | Protocol | Purpose | Direction | | --- | --- | --- | --- | | `443` | TCP | Mapped to `10443` internally. Available for TCP-based Sources that require port `443`. | In | | `20000` - `20010` | TCP | Additional Sources in Cribl.Cloud. | In | #### Reusing Port 443 for Other Services {#port-443-reuse} External port `443` is transparently mapped by the load balancer to internal port `10443` on the Fleet. You can use this port for TCP-based services that require port `443` (such as DocuSign). To use port `443` for a service: 1. Configure a Source to listen on port `10443` internally. 2. External clients connect to your Cribl.Cloud endpoint on port `443`, which the load balancer routes to port `10443` on the Edge Node. If multiple services share this port, differentiate traffic using a pre-processing Pipeline. For example, inspect `__headers` or other request metadata to identify the data source. > No other custom ports can be opened for Cribl-managed Worker Groups in Cribl.Cloud beyond port `443` and ports `20000`-`20010`. {.box .info} ### Billy Port {#cribl-copilot-port} To use [Billy](/copilot/copilot-chat), your Cribl Edge deployment must be able to establish a connection to `ai.cribl.cloud` on port `443`. ############################################################ # SOURCE: https://docs.cribl.io/edge/configure-env-vars.md ############################################################ # Configure Environment Variables Configure environment variables to control Cribl Edge behavior. --- The procedure for configuring environment variables depends on the operating system the Cribl Edge Node is deployed to. Whenever you change environment variables, you must restart Cribl Edge on the affected Nodes. > For a full list of available variables, see [Environment Variables](environment-variables). {.box .info} ## Configure Environment Variables on Linux ### Set Variables with systemd If Cribl Edge runs as a systemd service, add environment variables to the systemd override file (for example, `/etc/systemd/system/cribl-edge.service.d/override.conf`) so they persist across restarts and upgrades. 1. Open the override file for editing: ```shell sudo systemctl edit cribl-edge ``` 1. Add the variables under the `[Service]` section: ``` {title="override.conf"} [Service] Environment=CRIBL_NOEXEC=1 Environment=HTTP_PROXY=http://proxy.example.com:3128 ``` 1. Reload the systemd daemon and restart Cribl Edge: ```shell sudo systemctl daemon-reload sudo systemctl restart cribl-edge ``` For details on persisting overrides, see [Persisting Overrides](deploy-boot-start#persisting-overrides). ### Set Variables Without systemd If you are not using systemd, add `export` lines to a shell profile file (such as `/etc/environment` or the Cribl user's `~/.bashrc`) so they load on login: ```shell export CRIBL_NOEXEC=1 export HTTP_PROXY=http://proxy.example.com:3128 ``` ## Configure Environment Variables on Windows ### Set Variables During Installation You can configure environment variables while installing Cribl Edge on Windows using either the interactive wizard or a parameter for the MSI installer. - **Wizard**: In the setup wizard, in the **Set Environment Variables** modal, enter one variable per line. See [Install Edge on Windows Using the Wizard](deploy-windows#wizard) for more details. - **MSI installer**: When installing via MSI, use the `SETENVVARS` parameter with pipe-delimited key-value pairs. The entire string must be quoted: ```shell msiexec /qn /i cribl--.msi ^ SETENVVARS="HTTP_PROXY=http://203.0.113.1:8080|HTTPS_PROXY=http://203.0.113.1:8080" ^ MODE=mode-managed-edge ^ HOSTNAME= ^ PORT=4200 ^ AUTH=myAuthToken ^ FLEET=myfleet ``` See [Install Edge on Windows Using the Command Line](deploy-windows#cli) for the full syntax. ### Set Variables After Installation Environment variables specified during installation are stored in the Windows registry under `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cribl` under the `Environment` key. To add or modify variables after installation, edit this registry key directly. Restart the Cribl Edge service for the changes to take effect. ## Configure Environment Variables on macOS ### Add Variables to the LaunchDaemon Plist To define environment variables to a macOS deployment of Cribl Edge, you need to add them to the `io.cribl.plist` file. 1. Open the Cribl plist file, for example: `sudo vi /Library/LaunchDaemons/io.cribl.plist`. 1. Locate the `EnvironmentVariables` key and add your variable under it. For example, to define the `NODE_EXTRA_CA_CERTS` variable, add: ```xml EnvironmentVariables NODE_EXTRA_CA_CERTS path/to/cert/ca.pem ``` 1. Reload the plist file by running: ```shell sudo launchctl unload /Library/LaunchDaemons/io.cribl.plist sudo launchctl load /Library/LaunchDaemons/io.cribl.plist ``` The environment variable added this way is retained when upgrading the Edge Node in a Fleet. However, if you upgrade via the bootstrap script, the plist file is replaced. In that case, re-add the environment variable. ############################################################ # SOURCE: https://docs.cribl.io/edge/deploy-cloud.md ############################################################ # About Cribl.Cloud In a [Cribl.Cloud](https://cribl.cloud/signup) deployment, Cribl assumes responsibility for hosting and managing your Cribl Edge infrastructure. [Watch the video](https://vimeo.com/475959688) Cribl.Cloud comes in both free and paid versions. A free Cribl.Cloud account allows up to 1 TB/day of data throughput (data ingress + egress), but does not have the option to have multiple Fleets. By upgrading to a [Cribl.Cloud Enterprise plan](cloud-enterprise), you can implement a [hybrid deployment](cloud-enterprise#hybrid) of any complexity. In hybrid deployments, the Leader resides in Cribl.Cloud, and manages Stream Workers and Edge Nodes regardless of their location. Your data processing configuration can consist of any combination of Workers and Edge Nodes: Cribl-managed, in private cloud instances that you manage, or in your data centers. ![Standard/free versus Enterprise/hybrid deployment](hybrid-vs-std-cloud-cropped.39b9045a57.png) {scale="70%" border="false"} > For a comparison of features an capabilities of Cribl.Cloud vs an on-prem deployment, see [Cribl.Cloud vs. Self-Hosted](cloud-vs-self-hosted). > > For an overview of additional features available on Enterprise plans, see [Pricing](https://cribl.io/pricing/). > {.box .success} > If you're new to Cribl Edge, please see [Cribl Edge Basic Concepts](basic-concepts) and the [Getting Started Guide](getting-started-guide) for help onboarding. Cribl.Cloud always runs in Distributed mode - for details about this, see [Simplified Distributed Architecture](cloud-vs-self-hosted#distributed). > {.box .info} ## Cloud Pricing {#pricing} Beyond the [free tier](cloud-initial-setup#free), an optional paid Cribl.Cloud account - whether Standard or Enterprise - offers direct support, plus expanded daily data throughput according to your needs. From your Cribl.Cloud Organization, select **Go Enterprise** to submit an inquiry about upgrading your free account, and Cribl will respond. You'll pay only for what you use - the data you send to Cribl Edge, and the data sent to external destinations. However, data sent to your AWS S3 storage is always free. For details, see [Pricing](https://cribl.io/pricing/). ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-initial-setup.md ############################################################ # Register Cribl.Cloud Organization To get started with Cribl.Cloud, sign up on the [Cribl.Cloud portal](https://cribl.cloud/signup/?utm_campaign=criblclouddocsreferral&utm_medium=organic&utm_source=cribldocsdeploycloudregisteringcriblcloudportal&utm_content=ctacriblcloudsignuphyperlink), to create your Cribl.Cloud Organization. Your Organization will have a dedicated portal with its own network and access boundaries, isolating your Cribl resources from other users. For more information, see the [Full Suite Reference Architecture](https://knowledge.cribl.io/specialized-reference-architectures-95/full-suite-reference-architecture-2137). By default, your instance of Cribl.Cloud will be on the **free** Cribl.Cloud plan, which includes certain throughput and administration limits. When you need more capacity or features, you can upgrade to a [paid](deploy-cloud#pricing) or [Enterprise](cloud-enterprise) plan. To upgrade, select **Go Enterprise** in your Cribl.Cloud portal. > You can find the Cribl.Cloud Suite on the [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-gwiqiktubqhhk). When you're ready to upgrade, you can use your Enterprise Discount Program (EDP) credits to run Cribl products, billed directly through your AWS account. There is no need for a separate procurement process. > {.box .info} Note that each user can register only one active Organization on the free tier. For details, see notes on [Member Permissions](/iam/permissions#organization). To sign up for a free Cribl.Cloud instance and register your Organization: 1. Go to [https://cribl.cloud/signup/](https://cribl.cloud/signup/?utm_campaign=criblclouddocsreferral&utm_medium=organic&utm_source=cribldocsdeploycloudregisteringcriblcloudportal&utm_content=ctacriblcloudsignuphyperlink) and create an account using your work email address. 1. Follow the instructions to set up your Organization, select its [region](#region) for your Cribl.Cloud deployment, and to provide some information about your goals in using Cribl. When you complete the registration steps, you will see your new Cribl.Cloud deployment home page. The home page suggests possible actions you can take based on the answers you provided during registration. From there, consider completing the [Getting Started Guide](/getting-started-guide) tutorial for a walk-through of the main features and common use cases for Cribl Edge. ## Cribl.Cloud Organization Regions {#region} The Organization region defines where the Leader Node resides. Once you select a region when registering your Organization, you cannot change it. You can, however, create [Cribl-managed Stream Worker Groups](/stream/cloud-workers) in different AWS and Azure regions. In [Cribl Search](/search/), the Organization region is the physical location where searches are executed. In [Cribl Lake](/lake/), the region defines the location where data is stored. ## Troubleshooting Resources > If you get stuck during registration, [Cribl University](https://university.cribl.io) has a troubleshooting guide on [How to Log Into Cribl.Cloud](https://university.cribl.io/how-to-log-into-criblcloud) walks you through the registration and login workflow. > To follow the direct course link, first log into your Cribl University account. Once logged in, check out other useful short courses: > - [Troubleshooting Criblets](https://university.cribl.io/page/all-courses-catalog) > - [Advanced Troubleshooting](https://university.cribl.io/page/all-courses-catalog) {.box .course} ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-portal.md ############################################################ # Manage Cribl.Cloud Organization The Cribl.Cloud portal is the place where you get an overview of and manage your organization, configure network settings, and control user access and billing information. ## Switch Organizations When you own or are a Member of multiple Cribl.Cloud Organizations, you can switch between the Organizations: 1. In the top bar, hover over the name of your Organization. 1. In the drop-down, select the Organization you want to switch to. Alternatively, in the drop-down you can select **Manage Organizations**. You will move to an Organization landing page, displayed to an Organization's Owners and Admins, where you can view details of all your Organizations, switch to any of them, add a new one or delete one, if you have proper permissions. ## Configure Organization Details To customize your Organization information, in the sidebar, select **Organization**. You can modify the following information: |Field name|Description| |----------|-----------| |**Organization Name** |A "friendly" name for your Organization. Upon signing in, Members will see this alias above the Organization ID on the Select Organization page.| |**Description**|Add further details about your Organization.| |**Opt in to beta features**| If displayed, this check box enables access to new options that Cribl has not yet made generally available. As with all beta features, expect some instability in exchange for advancing to the cutting edge of your Cribl.Cloud.| Select **Save** to immediately apply your changes. You can check additional information about your Organization, including the AWS [Cloud region](/stream/cloud-workers#providers) in which it's located, the software version, and license, by selecting **Organization Details** at the bottom of the sidebar. ## Find Your Cribl.Cloud Organization Region To locate your Cribl.Cloud region, click **Organization Details** in the sidebar of your Cribl.Cloud portal page (for Admins and Owners) or on any Cribl product home page (any user). It's helpful to know the Organization region when there is a release or maintenance upgrade, because Cribl.Cloud Organizations can use specific upgrade windows based on the Leader region. The Organization region might not match your physical location. ## Ingress Ports {#ports} Your Cribl.Cloud Organization's preconfigured and user-configurable ports for inbound data are set at the Workspace level. For details, see [Cribl.Cloud Ports](/stream/ports#cloud-ports). ## Get Support In the top bar, select the ![Support icon](support-icon.svg) **Support** icon to access a set of links with additional resources about Cribl Edge, including: - Sandboxes (free, interactive tutorials on fully hosted integrations) - Cribl University - Concept/demo videos Refer to [Cribl Status](https://status.cribl.cloud/) for information about Cribl.Cloud availability, including current and historical uptime data, and incidents, split by component and AWS Region. You can also subscribe there to incident notifications via email, text, Slack, or RSS. ## Manage Personal Settings Use the **Account** menu in the top right of the Cribl.Cloud portal to configure your personal settings. Select **My profile** to update your personal information. Here, you can also reset the configured biometric authentication. Do this, if you want to re-configure the authentication, or if you don't want to be prompted to log in through fingerprint or face recognition. ############################################################ # SOURCE: https://docs.cribl.io/edge/cloud-enterprise.md ############################################################ # Cribl.Cloud Enterprise With a Cribl.Cloud Enterprise plan, you have these options and workflow flexibility: - Configuring and managing multiple [Worker Groups](/stream/worker-groups) and [Fleets](/edge/fleet-management). - [Notifications](notifications) within Cribl apps, to PagerDuty, and/or to other services via webhook. - Fine-grained, role-based control of [Member Permissions](/iam/permissions#organization) on your Cribl.Cloud Organization and on individual [product resources](/iam/permissions#product-perm). - Single sign-on/[SSO authentication](/iam/cloud-sso) from external identity providers. - The [hybrid deployment](#hybrid) option, described just below. With an Enterprise Plan, the Leader resides in Cribl.Cloud, and controls a flexible mix of Cribl-managed and/or customer-managed Fleets. Cribl manages the Leader's high availability on your behalf. > For other Enterprise features, see our [Pricing](https://cribl.io/pricing/) page. > {.box .info} ## Hybrid Deployment {#hybrid} The diagrams below show the comparative flexibility of a hybrid Cribl.Cloud deployment. The Leader (control plane) resides in Cribl.Cloud, while the Workers that process the data can be in any combination of the following environments: - In Cribl.Cloud, managed by Cribl. - In public or private cloud instances that you manage. - On-prem in your data centers. ![Enterprise hybrid deployment, with control plane and Cribl-managed Workers in Cribl.Cloud](se-cloud-hybrid-arch-edge.cf56e2621f.png) {scale="70%" border="false"} ![Enterprise hybrid deployment, with only control plane in Cribl.Cloud](hybrid-cloud-headless.00640a45ba.png) {border="false"} As the footprint of your operations grows or changes, this flexibility makes it easy to reconfigure Cribl Edge in tandem. You can rapidly expand Cribl Edge observability into new cloud regions - and replace monitored hardware data centers with cloud instances - all while maintaining one centralized point of control. You can also add Workers or Edge Nodes, and reassign them to different Fleets, by easily auto-generating [Stream](/stream/deploy-workers#ui) or [Edge](/edge/managing-edge-nodes#bootstrap) command-line scripts within Cribl Edge's UI. ### Hybrid Requirements {#hybrid-req} A hybrid deployment imposes these configuration requirements: - Hybrid Workers (meaning, Workers that you deploy on-prem, or in cloud instances that you yourself manage) must be assigned to a different Fleet than the Cribl-managed `default` Group - which can contain its own Edge Nodes. - All Edge Nodes' hosts must allow outbound communication to the Cribl.Cloud Leader's port 4200 at `https://main-.cribl.cloud:4200`, to enable configuration and workload management by the Leader. - On all Edge Nodes' hosts, firewalls must allow outbound communication on port 443 to the Leader and to `https://cdn.cribl.io`. This port is also used to bootstrap hybrid Workers from the Leader. - All Edge Nodes require connectivity to `https://cdn.cribl.io/telemetry/`. For details on testing this connectivity, on the metadata transmitted to Cribl, and on how we use that data, see [Telemetry Data](/billing-licensing/on-prem-licensing#telemetry-data). - If this traffic must go through a proxy, see [System Proxy Configuration](proxy-config) for configuration details. - To verify your Leader's region and public URL, open the [Access Details](workspaces#view-access-details) modal. Note that you are responsible for data encryption and other security measures on Edge Node instances that you manage. ### Adding (Bootstrapping) Workers To add Workers to your hybrid Cribl.Cloud deployment, Cribl recommends that you use the script outlined in [Bootstrap Workers from Leader](/stream/deploy-workers#add-bootstrap). Hosts for the new Workers must open the same ports (4200 and 443) listed in [Hybrid Requirements](#hybrid-req). You have three options for generating the script, outlined in these subsections of the Bootstrap topic linked above: - Auto-generate it from the [Leader's UI](/stream/deploy-workers#ui). - Make a `GET` [API request](/stream/deploy-workers#api-spec) to the Leader. - [curl](/stream/deploy-workers#curl) the same API request. > In Cribl Edge, you access all these bootstrap options via the [Manage Edge Nodes](/edge/managing-edge-nodes#workers-tab) page's **Add/Update Edge Node** control. > {.box .success} ### Hybrid Cribl HTTP/TCP Configuration {#hybrid-pairs} If you use the Cribl HTTP [Destination](destinations-cribl-http) and [Source](sources-cribl-http) pair, or the Cribl TCP [Destination](destinations-cribl-tcp) and [Source](sources-cribl-tcp) pair, to relay data between Edge Nodes connected to the same Leader, configuring hybrid Workers demands particular care. The Edge Nodes that host each pair's Destination and Source must specify exactly the same Leader Address. Otherwise, token verification will fail - breaking the connection, and preventing data flow. In hybrid Cribl.Cloud deployments, the Leader's Address format is `main-.cribl.cloud`. When configuring a hybrid Worker, use that format in the **Address** field. To configure hybrid Workers: 1. Log directly into their UI, then select **Settings** > **Global** > **Distributed Settings**. Make sure the **Mode** is set to **Stream: Managed Worker (managed by Leader)** or **Edge: Managed Edge (managed by Leader)** (which might require a restart). 1. Then select **Leader Settings**, and ensure a consistent entry in the **Address** field. ############################################################ # SOURCE: https://docs.cribl.io/edge/fleet-management.md ############################################################ # Manage Fleets of Edge Nodes Get started with managing Fleets of Edge Nodes in a Distributed deployment. --- In a distributed environment, a single Leader Node can centrally manage Edge Nodes. The Leader is responsible for keeping configurations in sync, tracking Edge Node status, and monitoring metrics. ## Concepts **Single Edge Node** - a single Cribl Edge instance, running as a standalone (not distributed) installation on one server/endpoint. **Leader Node** - an instance running in **Leader** mode, used to centrally author configurations and monitor Edge Nodes in a distributed deployment. **Managed Edge Node** - an instance running as a **Managed Edge**, whose configuration is fully managed by a Leader Node. (By default, will poll the Leader for configuration changes every 10 seconds.) **Fleet** - a collection of Edge Nodes that share the same configuration. You map Nodes to a Fleet using a Mapping Ruleset. **Subfleet** - a Subfleet groups and manages Edge Nodes that share the same configuration. Each Subfleet inherits configurations from its parent Fleet. Updating and deploying parent-level configurations applies the changes to the Subfleets. The Subfleets then deploy the configuration changes to their Edge Nodes. **Worker Process** - a Linux process within a Single Instance, or within Edge Nodes, that handles data inputs, processing, and output. The process count for Edge Nodes is constrained to 1. **Mapping Ruleset** - an ordered list of filters, used to map Nodes into Fleets. Multiple Fleets are very useful in making your configuration reflect organizational or geographic constraints. E.g., you might have a U.S. Fleet with certain TLS certificates and output settings, versus an APAC Fleet and an EMEA Fleet, each with their own distinct certs and settings. ## Architecture This is an overview of a distributed Edge deployment's basic components. (The type/s of Nodes within each Fleet will vary depending on your overall architecture:) ![Distributed deployment architecture](edge-fleet-management.c74a757fdf.jpg) {border="false"} ### Leader Node - API Process - Handles all the API interactions. - *N* Config Helpers - One process per Fleet. Helps with maintaining configs, previews, etc. ### Edge Node - Single Process - Handles everything; collection, processing and communication with the Leader Node. ## Leader Node Requirements * **OS**: Linux: RedHat, CentOS, Ubuntu, AWS Linux (64bit) * **System**: +4 physical cores, +8GB RAM, 5GB free disk space * **Network**: * Heartbeat Port: `4200`: managed Edge nodes communicate with the Leader Node on port `4200` by default. * UI/API Port: `9000`: users access the Leader on port `9000` by default. * **Git**: `git` must be available on the Leader Node. See details [below](#git). * **Browser Support**: The five most-recent versions of Chrome, Firefox, Safari, and Microsoft Edge. > We assume that 1 physical core is equivalent to 2 virtual/hyperthreaded CPUs (vCPUs). All quantities listed above are minimum requirements. We recommend deploying the Leader on stable, highly available infrastructure, because of its role in coordinating all Edge instances. > {.box .info} ## Edge Node Requirements See [Deployment Planning](deploy-planning) for requirements and other details. ## Version Control with `git` {#git} Leader Node requires `git` (version 1.8.3.1 or higher) to be available locally on the host. **Configuration changes must be committed to git before they're deployed.** If you don't have `git` installed, check [here](https://git-scm.com/download/linux) for details on how to get started. The Leader node uses `git` to: * Manage configuration versions across Fleets. * Provide users with an audit trail of all configuration changes. * Allow users to display diffs between current and previous config versions. ############################################################ # SOURCE: https://docs.cribl.io/edge/fleets.md ############################################################ # Fleets Learn how to access your Fleets in Cribl Edge. --- > The **Fleets** page is available on certain plan/license tiers. For details, see [Pricing](https://cribl.io/pricing/). {.box .success} ## Access the Fleets Page In Cribl Edge, select **Fleets** from the sidebar. This view shows all of the Fleets and Subfleets you have access to in the instance or Organization. ![Manage Fleets](fleets-sidebar.png) {border="true" scale="75%"} To explore more information for each of your configured Fleets, select a Fleet **Name** to open it. ## View Edge Nodes in a Fleet When you open a Fleet, you'll land on the **Nodes** page, in **List View**. ![Fleet Landing page](fleets-nodes-list-view-4.19.png) {border="true" scale="75%"} You can use the column selector to show and hide columns in this view. Select the column icon in the table header. ![Edge Nodes column selector](column-selector-4.19.png) {border="true" scale="25%"} A few highlights on some of the options: |Field|Description| |-----|-----------| |Health column|This column displays an icon indicating the overall health of the Edge Node.| |Sources| Shows the individual health statuses of the Edge Node's Sources. You can sort and filter these Sources by their health status, which helps you quickly identify Nodes that are experiencing issues with a Source.| |Destinations| Shows the individual health statuses of the Edge Node's Destinations. You can sort and filter these Destinations by their health status, which helps you quickly identify Nodes that are experiencing issues with a Destination.| |Edge Version| Displays a status icon next to the version number. This icon can provide information about the upgrade status for a Node. For more information on upgrade status, read [View the Status of Fleet Upgrades](upgrading-ui-status#view-the-status-of-fleet-upgrades).| |CPU| Shows the CPU utilization for the Edge Node. Use the column selector icon to reveal this option.| |RAM| Displays the memory usage of the Edge Node. Use the column selector icon to reveal this option.| The Edge Nodes list also serves as the "transporter room," allowing you to [teleport](#teleport) into each of the Node's interfaces. ### Understand the Health Status Icons The Source and Destination health icons represent the following statuses: - ![](healthy.png) Green checkmark: Everything is good! All Sources and Destinations are healthy. - ![](warning.png) Yellow warning icon: Attention needed. One or more Sources or Destinations are in a warning state. - ![](danger.png) Red exclamation point: Critical issue! One or more Sources or Destinations have encountered an error. - ![](indeterminate.png) Indeterminate: No data available yet for Sources or Destinations. ### Ways to View Nodes To switch between the three Edge Node views, select the List View ![](list-view-icon.png) icon, JSON View ![](json-view-icon.png) icon, or Map View ![](map-view-icon.png) icon. **List View**: A list of all the Nodes and their statuses in the Fleet. **JSON View**: Displays each Node and its status in the Fleet as an expandable JSON object. The JSON view provides inputs to create custom Node filters in **Advanced** mode. For details, see [Filter Modes](edge-nodes-filter#filter-modes). ![JSON View](fleets-nodes-json-view.png) {border="true" scale="75%"} **Map View**: Here, a query builder allows you to display metrics from the Edge Nodes in the Fleet. The metrics that appear in the **Measure** list depend on the option selected in **Fleet Settings** > **Limits** > **Metrics** under **Metrics to send from Edge Nodes**. The metrics `total.in_bytes`, `total.in_events`, `total.out_bytes`, and `total.out_events` always appear in the list; the display of any other metrics depends on what the Edge Nodes are sending to the Leader. To learn more about these metrics options, see [Control Metrics](internal-metrics#controlling-metrics). A hexagon-based map view displays the resulting metric combination for each of your Edge Nodes. Hovering over on one of the hexagons displays the **GUID** and **Hostname** of the Edge Node. ![Map View](ed-hex-nodes4-9.png) {border="true" scale="75%"} Select any of the hexagons to view the Node Info modal containing details on the Edge Node. For details on this panel, see our [Tracking Data Activity for an Edge Node](node-data-activity) topic. ### Teleport into an Edge Node {#teleport} To [teleport](managing-edge-nodes#teleport-into-an-edge-node) from the Leader into the Edge Node, you must turn on **Enable teleporting to Nodes** in [Fleet Settings](fleet-settings). Then, navigate to the Edge Node page and select **Teleport**. For more information on what you can do while teleported into an Edge Node, see [Manage Edge Nodes](managing-edge-nodes#teleport-into-an-edge-node). ## Monitor Fleets The **Monitor** tab displays information about your configured Edge Nodes. For more information about monitoring, see our topic on [Monitoring Health and Metrics](monitoring). ![Fleets Monitor View](edge-fleet-overview-4-9.png) {border="true" scale="75%"} Here, view the following information: |Name|Description| |----|-----------| |Number of Edge Nodes|The number of Edge Nodes configured in this Fleet.| |Target Version|If you have a target version selected for the Fleet, it will appear on this button. If not, the button will show **None** (the default). To learn more about this feature, see [Upgrade Edge Nodes in a Fleet](upgrade-nodes-fleet).| |Events In|Total number of Events in the last 5 minutes of data collected. You can change the display's granularity from the default ` last 5 min`, selecting a variety of time ranges from 1 min up to 1 day. (The latter covers the preceding 24 hours, and this maximum window is not configurable.)| |Bytes In|The uncompressed amount of data in the last 5 minutes of data collected. You can change the display's granularity from the default ` last 5 min`, selecting from a variety of time ranges from 1 min up to 1 day. (The latter covers the preceding 24 hours, and this maximum window is not configurable.)| |Sources|List of configured Sources.| |Destinations|List of configured Destinations.| ############################################################ # SOURCE: https://docs.cribl.io/edge/fleets-design.md ############################################################ # Design Fleet Hierarchy Design your Fleets into a practical hierarchy. --- Cribl Edge enables you to group Edge Nodes into logical Fleets and Subfleets. A well-designed Fleet hierarchy is extremely important for the health of the Leader Node and lets you take advantage of configuration inheritance. Pay particular attention to designing the hierarchy when migrating from other agents to Cribl Edge. Avoid the common pitfalls of configuring a single Fleet for all your Edge Nodes, or creating Fleets to replicate other agent configurations. These approaches can lead to inefficient data collection and management. By instead creating targeted Fleets, you can optimize your data collection, processing, and flow. ## Fleet Design Better Practices Always design your Fleet hierarchy before deploying your Edge Nodes. For details, see [Designing Your Fleet Hierarchy](#hierarchy). ### Consider Leader Health To ensure the health of your Leader Node, follow these guidelines: - Consider the number of Edge Nodes restarting at once, since they will all be pulling their configurations from the Leader at the same time. - For deployments with over 100,000 Edge Nodes, change the default [metrics controls](internal-metrics#edge-metrics-controls) to `minimal`. ### Deploy Nodes to Specific Fleets Use the bootstrap script in the [Add/Update Edge Node](edge-nodes-add-update) modal to deploy Edge Nodes to a specific Fleet. Depending on your Fleet design, Cribl recommends adding tags to the bootstrap script to uniquely identify the Fleet. You can use these tags for automatic mappings. ### Use `default_fleet` as Fallback for Stray Nodes Do not map Edge Nodes to `default_fleet`. It should serve as fallback for mapping errors. Create mappings for all the Fleets so that Edge Nodes are automatically placed in the Fleet when they bootstrap and connect to the Leader. This way, if any rogue Edge Node gets deployed, it will automatically show up in `default_fleet`. You can then monitor `default_fleet` to catch those Nodes and reassign them. If you disable all the Sources in the `default_fleet`, there will be no impact on data consumption. > This guidance doesn't apply to the [free license](/billing-licensing/on-prem-licensing#free-license), > where the only option is `default_fleet`. {.box .info} ## Design Your Fleet Hierarchy {#hierarchy} If your organization is deploying a significant number of Edge Nodes, it's essential to thoroughly plan and design your Fleet architecture. If you are moving from other agent-based systems, avoid exactly replicating the previous structure, as Cribl Edge operates differently. The first question you should ask is, do you need Subfleets? In some cases, a single-level, flat design is sufficient. In more complex environments, layering the configurations can help you to manage a large number of Edge Nodes that share common yet differentiated configurations. For example, as an administrator, you might need multiple layers of configurations to manage the following: `Org` > `Department` > `OS`. In this case, the Edge Nodes at the `OS` level can inherit and share configurations from the `Department` level. You can update a parent-level configuration (Fleet) and have it applied to all Subfleets and their respective Edge Nodes, reducing the time and effort needed to manage them. Maintaining a large number of Fleets can introduce operational complexities and increase the overhead of managing your Cribl Edge deployment. Before creating a large number of Fleets, explore whether your requirements can be effectively addressed by leveraging Cribl Stream as a central Destination and using Pipelines within a more streamlined Fleet structure to manage routing and processing logic. ### Fleet Hierarchy Options There are several ways you can build the hierarchy: - Geographical: If your organization collects different data categories in different regions, consider this option. - Data center: This is a good option if you maintain data centers in different regions. - Server function (web server, database, and so on): Another good way to organize your Fleets can be based on server functions. - OS-based: If you are running an environment with machines on different platforms, consider separating them into different Fleets per OS. ### Fleet Limitations and Recommendations When designing your Fleet hierarchy, consider the following recommendations: - **Recommended Depth:** To promote manageability and performance, limit your Fleet hierarchy to no more than **two levels** of Subfleets below the top-level Fleet. - **Cloud Environment Restriction:** Cribl.Cloud environments have a current limitation of **250 Fleets** per deployment. Carefully plan and optimize your Fleet design to stay within the limit. If you are working in a large organization and find these limitations insufficient, **engage with your Cribl account team and Cribl design partners** to develop an optimized Fleet design that meets your specific needs. ## Fleet Naming {#name} Consider naming your Fleets and Subfleets in a way that helps you recognize the configurations at a glance. For example, you can use the top-level Fleet name as part of your lower-level Fleets. Naming your Fleet with a logical `--` will easily provide you with context whether you are viewing at the Fleet, Subfleet, or Edge Node level. It can also help identify Edge Nodes that are out of place or mapped incorrectly. Here's an example of naming a Fleet with two levels of Subfleets: - BZT - BZT-NewYork - BZT-NY-Linux - BZT-NY-Windows - BZT-LA - BZT-LA-K8s - and so on Other guidelines to keep in mind when naming your Fleets: - Fleet names can't have spaces in them; use a dash or underscore instead. - You can't reuse a Fleet name. - Once you create a Fleet, you can't edit the name. - You can't delete a Fleet if there are Subfleets under it. ## Plan Fleet Inheritance {#inheritance} An efficient Fleet hierarchy design lets you take full advantage of Fleet inheritance. Each Subfleet will inherit the configurations of every parent Subfleet before it. To learn more about how inheritance works, see [Fleet Inheritance](fleet-inheritance). Here are some guidelines to keep in mind, as you think about layering your configurations. ### Top-Level Fleets (Grandparents) Assign the top-level Fleets for company-wide configurations. Use this level to: - Apply certificates and other company-wide settings. - Avoid OS-specific or site-specific configurations. ### Level 1 Subfleets (Parents) Per-site configurations. Use this level to: - Configure site-specific Sources/Destinations. - Specify any site-specific configurations, like common Destinations. ### Level 2 Subfleets (Children) Configurations used by groups of similar systems. Use this level to: - Apply OS-specific configurations at this level. For example, an "All Linux" and "All Windows" for a given site. - Group common OS-specific metrics and common log files into OS-specific Fleets. ### Level 3 Subfleets (Grandchildren) While Cribl typically doesn't recommend creating more than two levels of Subfleets, if your specific complex organization requires them, use the third level to apply function-specific Subfleets to add specific metrics, logs, and/or Windows Event sources. For example, you can group by: - Apache HTTPD - Database - SMTP servers - Active Directory - IIS - Exchange ############################################################ # SOURCE: https://docs.cribl.io/edge/fleet-inheritance.md ############################################################ # Fleet Inheritance Manage Fleet configuration with inheritance. --- Inheritance simplifies and speeds up Fleet setup by allowing configurations to automatically propagate to Subfleets. When creating a new Fleet, you can indicate a parent that the new Fleet will inherit configurations from. Your new Fleet will become a Subfleet of the parent. Whenever you modify configurations in the parent, its Subfleets will receive the same changes. To take advantage of inheritance, you can organize your Fleets and Subfleets into a hierarchy of configuration layers. Layering the configurations simplifies managing a large number of Edge Nodes that share common yet differentiated configurations. To learn more about planning Fleets and Subfleets, see [Design Fleet Hierarchy](fleets-design). ## How Inheritance Works When you save and commit a configuration change in a Fleet, its Subfleets (and their Subfleets, that is, all its descendants) will receive the same configuration change. You can view the configuration changes that can be inherited in the **Git Changes** modal before committing them. This view represents the files that contain configuration changes. See [Configuration files](configuration-files) for more details about those files. > When you make changes to a parent Fleet configuration, use the **Commit and Deploy with Subfleets** option. > This way, you are always keeping the inherited configurations in sync. {.box .success} ### Overriding Inheritance If you change a configuration setting in a Subfleet, the inheritance link with the parent Fleet breaks. Any further changes to the modified setting in the parent will no longer propagate to the Subfleet and its further descendants. To revert broken inheritance (that means, to allow a Subfleet to inherit again from its parent after inheritance has been broken), manually reset the values for a given configuration key to the same state as the parent. > Consult the **Git Changes** modal after resetting to make sure no unintended Subfleet-level configuration is left. {.box .success} Sources, Destinations, Packs, Knowledge Objects, and other objects, are inherited as a whole. If you modify the configuration for an object in a Subfleet, this object will no longer inherit further changes, even in other settings. To revert broken inheritance in an object configuration, select that object and select **Revert to Parent Configuration**. This will remove any local changes made to the configuration and return it to the state inherited from the parent. If you had committed the changes on the Subfleet before, you need to **Commit & Deploy** again for the revert to take effect. ### Removing Inherited Sources or Destinations If you delete an inherited Source or Destination from the Subfleet, the Subfleet will inherit it again from its parent Fleet. If you want to ensure a Source or Destination does not propagate again to the Subfleet, **disable** it instead of deleting. ## Inherited Configurations Subfleets inherit the following Fleet-level configurations: - Fleet Settings - Sources and Destinations - Routes and Pipelines - Packs (including local modifications to Packs installed from an external source) - Knowledge Objects - Data samples - Certificates and shared Secrets > Settings configured on the **Overview** tab of **Fleet Settings**, > such as **Description**, **Tags**, and **Time to keep disconnected Nodes**, > are not inherited by Subfleets. {.box .info} ### Certificate Inheritance Certificates, configured in **Fleet Settings** > **Security** > **Certificates**, are inherited by Subfleets alongside other Fleet settings. They are stored locally on each Edge Node in the `local/edge/auth/certs/` directory. For more information about certificates, see [Secure Sources and Destinations with TLS and mTLS](securing-sources-destinations-tls). ############################################################ # SOURCE: https://docs.cribl.io/edge/fleets-create-manage.md ############################################################ # Create and Manage Fleets and Subfleets Learn how to create Fleets and Subfleets in Cribl Edge. --- Fleets and their corresponding Subfleets allow you to author and manage configuration settings for a particular set of Edge Nodes, so you can flexibly group Edge Nodes into logical Fleets and Subfleets. These Fleets and Subfleets can share and reuse configurations. You can assign Fleet-level permissions to users. For details, see [Members and Permissions](/iam/members). ## Create a Fleet **Required Permission**: Cribl Edge Admin To create a new Fleet: 1. In the sidebar, click **Fleets**. 1. Click **New Fleet**. 1. Enter a descriptive **Fleet name**, and optionally, a relevant **Description** and [**Tags**](fleet-settings#fleet-configuration). ![Add a new Fleet](new-fleet-4101.png) {scale="75%" border="true"} To enable [teleporting to the Edge Nodes](explore-edge-linux#teleport) via the Leader's UI, toggle **Enable teleporting to Nodes** to **Yes**, then click **Save**. You can also create a new Fleet by selecting **Products** on the top bar, hovering over **Fleets** in the sidebar, and selecting the **+** button. ![Creating a New Fleet from **Products** Sidebar](product-create-fleet.png) {scale="60%" border="true"} ### Cribl.Cloud Fleet Limits In Cribl.Cloud, you can create up to a combined total of 250 Fleets and Subfleets - for example, 50 Fleets + 200 Subfleets. You can contact Cribl Support for an increase if you have a use case that requires more than 250 Fleets/Subfleets. ## Add a Subfleet Cribl recommends no more than two levels of Subfleets nested below a parent Fleet, but if your setup requires, you can create up to four levels of Subfleets. For each Subfleet, you can choose which parent Fleet it will inherit configurations from. For more information about inheriting configurations, see [Fleet Inheritance](fleet-inheritance). To add a Subfleet: 1. In the row of your desired Fleet, select the **Options** (![](actions-dropdown.light.svg)) menu, then select **Add Subfleet**. ![Menu showing the Add Subfleet option from Options](add-subfleet-options.png) {scale="75%" border="true"} 1. Enter a descriptive **Fleet name** and optional **Description** and [**Tags**](fleet-settings#fleet-configuration). 1. Select an existing Fleet from the **Inherited configuration** drop-down. The Subfleet will inherit its configuration from the selected Fleet. 1. Click **Save**. ![Add a Subfleet](add-subfleet.png) {scale="75%" border="true"} Similarly, you can create a Subfleet in a selected Subfleet. Each Subfleet will inherit the configurations of every parent Subfleet before it. ### View Subfleet Details and Options To display the number of Routes, Pipelines, Sources, and Destinations in a Fleet, click **View** in the **Details** column of a Fleet or Subfleet. ![View Subfleet details](ed_fleet_view.1b05036f21.png) {border="true"} > On Cribl.Cloud, you'll also see a **Group Type** column, showing whether the deployment is **Hybrid** or **Cloud**. > {.box .cloud} To display the **Edit Fleet**, **[Configure](fleets#configuring)**, **Members and Teams**, **Add Subfleet**, **Clone**, and **Delete** options, select the **Options** (![](actions-dropdown.light.svg)) menu. ![A menu flyout listing the Fleet options](fleet-options-menu.png) {border="true"} ### Clone and Delete a Subfleet Cloning a Fleet copies the Fleet's settings, while cloning a Subfleet inherits the parent's configurations. To clone a Subfleet, click its **Options** (![](actions-dropdown.light.svg)) menu and select **Clone**. ![Clone a Subfleet](clone-subfleet-4101.png) {scale="60%" border="true"} To delete a Fleet or Subfleet, click **Delete** in the **Options (•••)** menu. You will be prompted to confirm your decision to delete the Fleet/Subfleet, click **Yes** to confirm. You can also commit and deploy changes to Fleets and Subfleets on this page. For details, see [Committing and Deploying Fleet Configurations](#deploy). > Configuring multiple Fleets is available with an Enterprise plan. For details, go to the [Edge - Cloud Ingest](https://cribl.io/pricing/edge/?product=cloud-ingest) guide. > {.box .success} ## Edge Node GUID When you install and first run the software, a GUID is generated and stored in a `.dat` file located in `CRIBL_HOME/local/cribl/auth/`. For example: `# cat CRIBL_HOME/local/cribl/auth/676f6174733432.dat` `{"it":1570724418,"phf":0,"guid":"48f7b21a-0c03-45e0-a699-01e0b7a1e061"}` When deploying Cribl Edge as part of a host image or VM, be sure to remove this file, so that you don't end up with duplicate GUIDs. The file will be regenerated on the next run. ############################################################ # SOURCE: https://docs.cribl.io/edge/fleets-configuration.md ############################################################ # Configure Fleets and Deploy Changes Learn how to configure Fleets and Subfleets, then commit and deploy the changes. --- Cribl Edge provides you with the ability to configure Fleet and Subfleets. At the Fleet and Subfleet level, you can add, update, and remove: - Sources - Destinations - Routes - Pipelines - Packs To access these configuration options: - Click the **Options (•••)** menu on a Fleet/Subfleet, then click **Configure**. This takes you to **Collect**, where you can use [QuickConnect](quickconnect) to quickly set up data collection Sources and hook them up to Destinations. - Click a Fleet **Name**, then click **Collect** or use the **More** drop-down. When you make changes to a Fleet, you must commit and deploy the changes in order for the Edge Nodes to receive the updated configs. ## Example Configuration Deployment Workflow Here's a typical workflow for deploying Edge configurations: 1. Make configuration changes on a Fleet. 2. Save your changes. 3. Commit (and optionally push). 4. Locate your desired Fleet and click **Deploy**. Once you save and commit your configuration changes, you can deploy the updated configs to the Edge Nodes. You deploy new configurations at the Fleet level. ### Deploy Subfleets To make new configurations visible and available to Subfleets, you must first **Commit** the changes within parent Fleets' configurations. When you commit changes to a parent Fleet, you have the option to **Deploy Subfleets** at the same time. When you **Deploy Subfleets**, the Subfleets will receive the new inherited configuration. For guidelines on deploying to a large number of Edge Nodes, see [Leader Scalability](deploy-planning#scaling). ![Deploy Subfleets](ed-deploy-fleets-4.9.png) {border="true"} Edge Nodes that belong to the Fleet/Subfleet will start **pulling** updated configurations on their next check-in with the Leader. > ##### Can't log in to the Edge Node as Admin User? > When an Edge Node pulls its first configs, the admin password will be > randomized, unless specifically changed. This means that users won't be able > to log in on the Edge Node with default credentials. For details, see > [User Authentication](/iam/authentication#worker_pwd). {.box .warning} ## Configuration Files On the Leader, a Fleet's configuration resides in this directory: `$CRIBL_HOME/groups//local/edge/` Where each Fleet gets its own directory that contains a collection of `.yml` config files. The managed Edge Node pulls configs and extracts them under: `$CRIBL_HOME/local/edge/`. > Some configuration changes will require restarts, while many others will > require only reloads. For details, see > [Configurations and Restart](configuration-files#restart). Upon restart, > individual Edge Nodes might temporarily disappear from the Leader's **Nodes** > tab, before reappearing. {.box .info} ## Notable Environment Variables for a Fleet {#environment-variables} * `CRIBL_DIST_LEADER_URL` - URL of the Leader Node. Format: `://@host:port?group=default_fleet&tag=tag1&tag=tag2&tls.`. Example: `CRIBL_DIST_LEADER_URL=tls://@leader:4200` Parameters: * `group` - The preferred Fleet assignment. * `resiliency` - The preferred Leader failover mode. * `volume`- The location of the NFS directory to support Leader failover. * `tag` - A list of tags that you can use to [assign](#mapping) the Edge Node to a Fleet. * `tls.privKeyPath` - Private Key Path. * `tls.passphrase` - Key Passphrase. * `tls.caPath` - CA Certificate Path. * `tls.certPath` - Certificate Path. * `tls.rejectUnauthorized` - Validate Client Certs. Boolean, defaults to `false`. * `tls.requestCert` - Authenticate Client (mutual auth). Boolean, defaults to `false`. * `tls.commonNameRegex` - Regex matching peer certificate > subject > common names allowed to connect. Used only if `tls.requestCert` is set to `true`. * `CRIBL_DIST_MODE` - Set to one of: `managed-edge` (managed Node), `leader` (Leader instance), or `edge` (single instance). * `CRIBL_HOME` - Auto setup on startup. Defaults to parent of `bin` directory. * `CRIBL_CONF_DIR` - Auto setup on startup. Defaults to parent of `bin` directory. * `CRIBL_DIST_LEADER_BUNDLE_URL` - AWS S3 bucket (format: `s3://${bucket}`) for [remote bundle storage](managing-edge-nodes#remote-bundle). * `CRIBL_TMP_DIR` - Defines the root of a temporary directory. Sources use this directory to stage downloaded Parquet data. The format of derived temporary directories is: `$CRIBL_TMP_DIR || os.tmpdir())/cribl_temp[//]` ... where: `` = ``; `` = Worker Process ID; and `os.tmpdir()` defaults to `/tmp` on Linux. Override that default using this `CRIBL_TMP_DIR` environment variable. * `CRIBL_VOLUME_DIR` - Sets a directory that persists modified data between different containers or ephemeral instances. * `CRIBL_DIST_WORKER_PROXY` - Communicate to the Leader Node via a SOCKS proxy. See [`CRIBL_DIST_WORKER_PROXY`](environment-variables#cribl_dist_worker_proxy) for more details. ############################################################ # SOURCE: https://docs.cribl.io/edge/fleets-recover.md ############################################################ # Recover a Deleted Fleet Learn how to recover deleted Fleets in Cribl Edge. --- If you delete a Fleet, you can no longer access its **Version Control** menu. As a result, you also lose the option to directly recover the Fleet. However, you can still recover a deleted Fleet using the command line. This method works only in on-prem environments. To revert the deletion commit: 1. Stop the Cribl server. 1. Using a command line interface, look at the version control history for the Leader Node and identify the commit which deleted the Fleet. 1. Revert to the last commit before the Fleet was deleted. 1. Restart the Cribl server. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-nodes.md ############################################################ # Edge Nodes Learn how Edge Nodes and Leader Nodes work together --- The Leader Node has two primary roles: 1. Serves as a central location for Edge Nodes' operational metrics. The Leader ships with a monitoring console that has a number of dashboards, covering almost every operational aspect of the deployment. 1. Serves as a central location for authoring, validating, deploying, and synchronizing configurations across Fleets. ![Leader Node/Edge Nodes relationship](edge-master-node-with-work-groups.c850974436.jpg) {border="false"} ## Network Port Requirements (Defaults) - UI access to Leader Node: TCP 9000. - Edge Node to Leader Node: TCP 4200. Used for Heartbeat/Metrics/Leader requests/notifications to clients (such as live captures, teleporting, status updates, and config bundle notifications). - Edge Node to Leader Node: HTTPS 4200. Used for config bundle downloads. - Edge Node bootstrapping/update: HTTPS 443. ## Leader/Edge Node Communication Edge Nodes will send a heartbeat to the Leader every 60 seconds. This heartbeat includes information about the Nodes and a set of current system metrics. The heartbeat payload includes facts - such as hostname, IP address, GUID, tags, environment variables, and current software/configuration version - that the Leader tracks with the connection. When an Edge Node checks in with the Leader: - It sends a heartbeat to Leader with "facts" about itself. - The Leader uses Edge Node's facts and Mapping Rules to map it to a Fleet. - The Edge Node pulls its Fleet's updated configuration bundle, if necessary. Edge Nodes that don't maintain their connection to the Leader will eventually disappear from the Edge Nodes page. > The Leader is unaware of the platforms on which Edge Nodes within a Fleet run. So the ConfigHelper omits platform-specific limitations. Therefore, when you manage Edge Nodes on heterogeneous platforms, create OS-specific Fleets (for example, a Windows Fleet, a macOS Fleet) and mapping. See [Design Fleet Hierarchy](fleets-design). > {.box .warning} ### Leader Disconnection and Telemetry Cribl Edge is built to keep your data flowing smoothly, even if it temporarily loses connection with the Leader Node. This means you won't experience disruptions during network hiccups or if the Leader is briefly unavailable. Cribl Edge periodically sends telemetry to verify its license with Cribl's servers. This is different from its connection to the Leader. If the telemetry fails for an excessive time, processing might be interrupted. > This telemetry is disabled for Cribl.Cloud-managed Edge Nodes. > {.box .info} Cribl Edge Nodes that are disconnected from the Leader will resume operation after an Edge restart, using their last settings and license. In most cases, an Edge Node gets its license from the Leader and saves a copy. If the Node restarts while the saved copy is valid, it will use the saved license. If the saved copy is expired, missing, or unreadable, it will use the Free license until it connects to the Leader again. For details, see [Licensing on Managed Node Startup](/billing-licensing/on-prem-licensing#licensing-managed-node-startup). While the Edge Node is disconnected, you won't see real-time updates in the main monitoring dashboard, and the Node won't receive any new configuration changes. ############################################################ # SOURCE: https://docs.cribl.io/edge/managing-edge-nodes.md ############################################################ # Manage Edge Nodes How to manage Edge Nodes in a Fleet and perform tasks like teleporting and exporting a list of Nodes. --- ## View Edge Node Status Information The **Edge Nodes** page provides status information for each Edge Node in the selected Fleet, as well as a UI for adding and updating Nodes. In Cribl Edge, select **Edge Nodes** from the sidebar. ![Edge Nodes page showing a list of Nodes](fleets-nodes-list-view-4.19.png) {border="true" scale="75%"} ### Monitor Edge Node Connectivity You can track which Edge Nodes are connected to the Leader Node in the **Edge Nodes** page. Disconnected Edge Nodes show an icon in the **Connection** column and will have information about the time the Leader last received their heartbeat. By default, Cribl Edge will retain information about disconnected Nodes between restarts. To change this behavior on-prem, toggle **Disable Node persistence** on in **Global Settings > System > General Settings > Limits > Other**. This will also affect Cribl Stream Workers. > **Disable Node persistence** is a deprecated setting that will be removed in a future version. > Toggling **Disable Node persistence** will restart the Leader Node. {.box .warning} You can configure how long the Leader should keep track of disconnected Nodes by configuring the **Time to keep disconnected Nodes** Fleet setting (**General Settings > Fleet Configuration**). By default the Leader retains information about disconnected Nodes for one day. You can set it to any value between 0 (which means Nodes are removed within a few minutes) and 90 days. For Fleets with Edge Nodes that frequently restart with a new GUID, such as those in a Kubernetes environment, Cribl recommends setting the **Time to keep disconnected Nodes** to 0. > The **Time to keep disconnected Nodes** setting is not inherited by Subfleets. {.box .success} #### Monitor Connectivity of Older Edge Nodes A Leader Node that is running version 4.13 or newer can monitor Edge Nodes that are using an older version. However, Cribl always recommends upgrading your Edge Nodes to the newest available version. ### Monitor Source and Destination Health on Edge Nodes You can monitor and track the health of Sources and Destinations associated with an Edge Node on the **Edge Nodes** page. This is useful when you have a large number of Nodes, and want to quickly identify and troubleshoot issues with Sources and Destinations. To open the Node Info page and view specific monitoring information, select a health icon. For more information, see [Track Data Activity for an Edge Node](node-data-activity). ### Filter Nodes in the List You can filter the Edge Nodes that appear in the list using the **Filters** option. For details, see [Filter Edge Nodes](edge-nodes-filter). ### Find Edge Nodes Running in a Container Edge Nodes running in a container report additional metadata about the container to the Leader. This helps you quickly identify which of your Edge Nodes are running in a container from the Leader UI and map them to the appropriate Fleets. When Cribl Edge is running in a container, you will see the `hostOs` property in events collected by the [System State Source](sources-system-state). This object will contain properties about the container when they're available, such as: - `arch` - `cpu_count` - `cpu_speed_mhz` - `cpu_type` - `interfaces` - `memory` - `platform` - `release` - `hostname` - `timezone` From the **Mappings** menu, you will also see the `hostOs` property in the **Edge Node info** panel. This object will include the `id`, `addresses`, and `version` of the container when available. > `interfaces` is a set of key-value pairs that contain an array of CIDR values. {.box .info} ### Export a List of Edge Nodes To export the list of Edge Nodes, click the **Export list as** drop-down. Select `JSON` or `CSV` as the export file format. If you filter the list before exporting, the exported list will maintain that filter. You can export the entire list by removing all filters. ### Teleport into an Edge Node On the Edge Node page, select **Teleport** to teleport from the Leader into the Node. Here, you can explore the metrics and log data that the Node has discovered automatically, and can manually discover and explore other data of interest. You can use the discovered data to perform root-cause analysis, to troubleshoot, and to restart the host. If you want to monitor and troubleshoot the Node data without teleporting, check out the [Node Info Panel](node-data-activity). The page displays metadata for the Node, and below it, graphs of system activity. A magenta border indicates you are remotely viewing a host, and identifies the host's name. Click **Restart Edge** to restart the Node. To return to the **Edge Nodes** page, click the **X** close button on the upper right. ![Teleporting into an Edge Node](ed-teleport-node.4cf3e55509.png) {border="true"} > Changes that you make on an Edge Node will not propagate to the Leader. Also, > the Leader will override any changes that you make directly on a Node. {.box .warning} #### Add Tags to Edge Nodes in Teleport View You can add tags to an Edge Node you've teleported into. Tags help the Leader map an Edge Node to a Fleet. Note that changing the tags on a Node can cause the Leader to map the Node into a new Fleet. 1. Teleport into an Edge Node. 1. Navigate to **Node Settings** then **Distributed Settings**. 1. Enter tags for this Node and select **Save**. If your Edge Nodes are managed by Cribl.Cloud, you'll need to accept the confirmation modal. Keep in mind that changing the tags on an Edge Node might cause it to be assigned to a different Fleet by the Leader. > You can't change tags for Edge Nodes set up using the `CRIBL_DIST_MASTER_URL` environment variable (instead of the `instance.yml` > file). This is because these types of Edge Nodes are typically temporary, so any tag changes would not be saved when the Edge Node restarts. If you need tags that persist, configure your Edge Nodes using the `instance.yml` file. {.box .warning} ## Troubleshooting the Edge Node List If you see unexpected results in the **Edge Nodes** list, keep in mind that: - Edge Nodes that don't maintain their connection to the Leader will eventually disappear from the Edge Nodes page. - For a newly created Fleet, the **Config Version** column can show an indefinitely spinning progress spinner for that Fleet. This happens because the Edge Nodes are polling for a config bundle that hasn't been deployed. To resolve this, click the **Deploy** option to force a deploy. - For details on collocating multiple Cribl products, see [Cribl Edge and Cribl Stream on the Same Host](deploy-linux#collocated). - For details on overriding default ports, see [Overriding Default Ports](deploy-running-docker#ports-override). ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-nodes-add-update.md ############################################################ # Add and Update Edge Nodes Learn how to add and update Edge Nodes in Cribl Edge --- Cribl Edge provides you with the ability to add and update Edge Nodes from the UI. To access this function, select **Edge Nodes** in the sidebar. On the **Edge Nodes** page, select **Add/Update Edge Node**. ![Options to add or update an Edge Node](edge-node-add-update-4.14.png) {border="true" scale="75%"} Here, you can update an existing Node with new configurations or add a new Node using the bootstrap script. ## Add a New Edge Node with a Bootstrap Script {#bootstrap} Using the Cribl Edge UI, you can add Edge Nodes to your existing deployment. To do this, change the environment-specific fields, then copy and paste the resulting bootstrap script into a CLI. The script updates in real-time as you change the fields. The result is a new Edge Node configured with the options you chose. You can also copy the bootstrap script and modify it instead of manually editing the fields in the UI, as well as concatenate multiple scripts for different use cases. ### Host Communication Prerequisites To enable the Leader to manage the Edge Nodes, you must enable ongoing outbound communication to the Leader's port 4200 on all Edge Nodes hosts. While the bootstrap script runs, firewalls on each Nodes's host must also allow outbound communication on the following ports: - Port 443 to `https://cdn.cribl.io`, when **Install package location** is set to `Cribl CDN`. - Port 443 to a Cribl.Cloud Leader. - Port 9000 to an on-prem Leader. ### Add an Edge Node 1. From the Cribl Edge sidebar, select **Edge Nodes**. 1. On the **Edge Nodes** page, select **Add/Update Edge Node**. 1. Select your OS, then select **Add**. **Linux** 1. Fill and modify the deployment option fields: - In **Leader or Outpost hostname/IP**, verify or update the Leader URI. If you want the Edge Node to connect through an Outpost, provide the protocol, Outpost hostname, and port in this field, typically: `https://:4200` - The **Install package location** defaults to `Cribl CDN`. If desired, change this to `Download URL`. - Enter the value of a **Provisioning token**. See [Create a New Provisioning Token](securing-auth-token#create) for information on how to create one. Optionally, if your deployment still has an active legacy token, select **Use Legacy Token**. This option is only available for Admin users. - As needed, correct the target **Fleet** - As needed, correct the **User** and **User Group** to run Cribl as. - As needed, correct the **Installation directory**. 1. Optionally, add **Tags** that you can use for filtering and grouping in Cribl Edge. Use a tab or hard return between (arbitrary) tag names. 1. Copy the resulting script to your clipboard. **Windows** 1. Fill and modify the deployment option fields: - In **Leader or Outpost hostname/IP**, verify or update the Leader URI. If you want the Edge Node to connect through an Outpost, provide the Outpost hostname in this field. - In **Leader port**, provide the port for the Leader or Outpost Node you want to connect through. - Enter the value of a **Provisioning token**. See [Create a New Provisioning Token](securing-auth-token#create) for information information on how to create one. Optionally, if your deployment still has an active legacy token, select **Use Legacy Token**. This option is only available for Admin users. - As needed, correct the target **Fleet**. - As needed, correct the **Username** and **Password** to run Cribl as. - As needed, correct the **Installation directory**. ![Add or update a Windows Edge Node](add-windows-node-4101.png) {border="true" scale="75%"} 1. Optionally, add **Tags** that you can use for filtering and grouping in Cribl Edge. Use a tab or hard return between (arbitrary) tag names. 1. Copy the resulting script, either for the command prompt, or Powershell, to your clipboard. **macOS** 1. Fill and modify the deployment option fields: - In **Leader or Outpost hostname/IP**, verify or update the Leader URI. If you want the Edge Node to connect through an Outpost, provide the protocol, Outpost hostname, and port in this field, typically: `https://:4200` - The **Install package location** defaults to `Cribl CDN`. If desired, change this to `Download URL`. - Enter the value of a **Provisioning token**. See [Create a New Provisioning Token](securing-auth-token#create) for information information on how to create one. Optionally, if your deployment still has an active legacy token, select **Use Legacy Token**. This option is only available for Admin users. - As needed, correct the target **Fleet**. - As needed, correct the **User** and **User Group** to run Cribl as. 1. Optionally, add **Tags** that you can use for filtering and grouping in Cribl Edge. Use a tab or hard return between (arbitrary) tag names. 1. Copy the resulting script to your clipboard. Run the script with `sudo`. Finally, to add the Edge Node, paste the script onto the command line of your Edge Node and execute it. If your script successfully added the Edge Node, you will see it in the **Edge Nodes** list. ## Update an Edge Node with a Bootstrap Script You can use bootstrap scripts to update the configuration of your Edge Node. Updating adjusts the Leader connection details for the Node, retaining its version. To upgrade the Edge Node - that is, install a newer version of the software - see [Upgrading](upgrading). ### Select Update Script Type When you update a Linux or macOS Node, you must select a **Script type** from the drop-down. Choose between environment variable or CLI to add/update an Edge Node. With **Environment variable** selected: 1. Hover over the **Script** field and select the copy icon. 1. To allow Edge to update or add Edge Nodes, configure the environment variable with a restart command. - You can add the restart command to the environment variable in the Linux systemd service unit file, so you don't have to insert the environment variable each time you restart the server: 1. In the CLI, enter `sudo systemctl edit cribl-edge` on the Edge Node. 1. Add `ENVIRONMENT="CRIBL_DIST_LEADER_URL=tcp://@:4200"` to the opened file and save it. 1. Reload the service with `sudo systemctl restart cribl-edge`. - Or, you can use `./cribl restart`, but you will have to insert the environment variable each time you restart the server: ``` CRIBL_DIST_LEADER_URL=tcp://@:4200 ./cribl restart ``` With **CLI** selected: 1. Hover over the **Script** field and select the copy icon. 1. Paste the copied script into a CLI and run it. ### Edge Node Updates Using Fleet Version Settings {#fleets-target} The script you generate using the **Add/Update Edge Node** window ensures accurate updates by using the specified [**Target Software Version**](upgrade-nodes-fleet) for your Fleet, enhancing the reliability and consistency of updates across all supported environments: Docker, Kubernetes, Linux, macOS, and Windows. For Docker and Kubernetes: - If you don't specify a target version, the command uses the Leader version's image and version flag respectively, by default. - If you specify a target version, the command parses the Fleet version and maps it to the appropriate CDN URL or version flag. For Linux and macOS environments: - The existing script behavior from the Leader manages the updates unless you specify a target version, in which case the script uses that version. For Windows: - The default behavior uses the Leader Version from the CDN, while specifying a target version directs the command to parse the Fleet version and map it for MSI download via the CDN. This mechanism ensures a more consistent and reliable deployment process, maintaining version control and improving update accuracy across all environments. ############################################################ # SOURCE: https://docs.cribl.io/edge/edge-nodes-filter.md ############################################################ # Filter Edge Nodes Learn how to filter large lists of Edge Nodes --- When your Cribl Edge deployment has a large number of Nodes, you may want to filter your Node list down to a manageable subset of Nodes. This can help you monitor your Edge Nodes and troubleshoot any issues. For example, you may want to view all of the Edge Nodes that are experiencing upgrade issues. Or, you may need to update the configuration of Nodes that are running a certain operating system version, but you don't know which Fleets they belong to. The **Filters** option allows you to apply filter criteria to your Node list, so you can quickly find Nodes by OS Platform, IP address, install type, version and more. ## Access Node Filters In Cribl Edge, you can filter Edge Nodes in two places: - In a specific Fleet in the Edge Nodes list. Navigate to **Fleets**, then select a Fleet. - On the list of all Edge Nodes. Navigate to **Edge Nodes** from the sidebar. ![The Filters option](filters-ui-4.19.png) {border="true" scale="90%"} ### Filter Modes You can choose between the default form-based mode and **Advanced** mode when you create a Node filter. Form-based mode contains the preconfigured fields and checkboxes you see when you select **Filters**. For a table of the options and their definitions, see [Form-based Filter Options](#node-filter-options). **Advanced** mode is a JavaScript input field where you can create your own filter, referencing the JSON objects that are associated with an Edge Node. You can edit the JavaScript by typing in the **Expression** field, but doing so disables the form-based filters unless you undo the changes. To revert back to the form-based filter, select **Undo changes**. > Some filter combinations will never return any results - for example, **OS > platform** set to Linux and **Install type** set to MSI, since MSI is only used for > Windows installations. {.box .info} ## Create an Edge Node Filter The **Filters** option lets you group a list of Nodes by criteria such as OS platform, IP address, install type, version, and more. To create an Edge Node filter: 1. Navigate to a list of Edge Nodes, either from the **Nodes** tab in a Fleet or from the **Edge Nodes** sidebar. 1. Select **Filters** to open the Filters panel. 1. Create a filter by selecting from the [Node Filter Options](#node-filter-options), or toggle **Advanced** on to write your own filter using JavaScript. 1. Once you have selected filter criteria, you can use the **Filter Edge Nodes** field to further narrow down the list of visible Nodes. 1. Select **Clear filters** to undo your selections in the Filters panel. This does not clear the **Filter Edge Nodes** field. ### Share a Filter To share a filter with another Cribl user: 1. Select the **Filters** button and create a filter. 1. Select the link icon ![](link-icon.png) to copy the filters to your clipboard, or copy the browser URL. 1. Now you can share the link with another user. Filters are Workspace-specific, so they will only work within the Workspace where you created them. ### Form-based Filter Options You can choose from a set of preconfigured, form-based filter options, and each has an associated JavaScript property. You'll see the JavaScript property in the **Expressions** field when you toggle **Advanced** on. |Field|Description|JavaScript property| |-----|-----------|-------------------| |
Fleet
|Find Nodes based on their Fleet assignment. Visible when filtering from the **Edge Nodes** page.|`group==''`| |Outpost|Which Outpost the Edge Node is connected to.|`info.outpost.host.toLowerCase().includes()`| |Connection status|Whether the Edge Node is currently connected to the Leader.|`(disconnected === )`| |Upgrade status|The upgrade status of the Edge Node.