The platform, data_region, and custom_bucket attributes can only be set during creation and cannot be updated later.
Explore documentation
Create a collector
Creates a new Better Stack collector.
Headers
Bearer $TOKEN
Body parameters
A unique name for the collector.
The platform where the collector will be installed. Valid options are docker, swarm, kubernetes, and proxy.
An optional note for the collector.
Required if using a global API token to specify the team that will own the collector.
The data region where the collector's data will be stored. If omitted, the organization's default region is used.
Custom retention period for logs, in days. This is only available on select plans.
Custom retention period for metrics, in days. This is only available on select plans.
Set to true to create the collector in a paused state, preventing it from ingesting data.
A VRL program to be applied to logs server-side during ingestion.
Configuration for storing data in your own S3-compatible bucket. This is only available on select plans.
A custom Vector configuration in YAML format to be merged with the collector's generated configuration.
An object containing detailed configuration options for the collector.
An object containing settings specific to the proxy platform, such as buffering, SSL/TLS, and HTTP Basic Auth.
An array of database connection objects to be monitored by the collector.
Configuration Object
The configuration object allows for fine-grained control over the collector's behavior.
| Key | Type | Description |
|---|---|---|
components |
object | A flat object of boolean flags to enable or disable specific data collection components (e.g., ebpf_metrics: true, logs_docker: false). |
logs_sample_rate |
integer | The percentage (0-100) of logs to sample. |
traces_sample_rate |
integer | The percentage (0-100) of traces to sample. |
vrl_transformation |
string | A VRL program to transform telemetry data on the host before sending. |
disk_batch_size_mb |
integer | The maximum size (in MB) of on-disk batches. Minimum is 256. |
memory_batch_size_mb |
integer | The maximum size (in MB) of in-memory batches. |
when_full |
string | The buffer overflow strategy. Valid options are drop_newest (default) and block. |
services_options |
object | Per-service overrides for log sampling and trace ingestion. |
namespaces_options |
object | Per-namespace overrides for log sampling and trace ingestion (Kubernetes only). |
Proxy Configuration Object
The proxy_config object is only applicable when platform is proxy.
| Key | Type | Description |
|---|---|---|
enable_buffering_proxy |
boolean | Enables the collector to act as a buffering proxy. |
buffering_proxy_listen_on |
string | The address and port to listen on (e.g., 0.0.0.0:8080). |
enable_ssl_certificate |
boolean | Enables SSL/TLS termination using a Let's Encrypt certificate. |
ssl_certificate_host |
string | The hostname for the SSL certificate. |
enable_http_basic_auth |
boolean | Enables HTTP Basic Authentication for incoming requests. |
http_basic_auth_username |
string | The username for HTTP Basic Auth. |
http_basic_auth_password |
string | The password for HTTP Basic Auth. This value is write-only and will not be returned in any API response. |
The collector was created successfully.
Response body
Validation failed due to invalid parameters.
Response body
Example: Basic Collector
Example: Collector with Configuration
Example: Proxy Collector with HTTP Basic Auth