On This Page

Home / Cribl as Code/ Cribl SDKs (Preview)/ SDK Code Examples/Configure Resources with the Cribl SDK

Configure Resources with the Cribl SDK

Preview Feature

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, but assistance might be limited while the features remain in Preview.

This code example demonstrates how to use the Python SDK for the control plane to create the following resources in Cribl Stream:

  • A Worker Group to manage the configuration.
  • A Syslog Source to receive data on port 9021.
  • An S3 Destination to store processed data.
  • A Pipeline that filters events and keeps only data in the eventSource and eventID fields.
  • A Route 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 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 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 Transport Layer Security (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.

Python SDK (Cribl.Cloud)Python SDK (On-Prem Deployment)