Skip to main content

Collector

Resource Collector in pulumi-logtail.
16 min read

Resource Collector in pulumi-logtail.

Pulumi type: logtail:index/collector:Collector.

name is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

Example#

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

Arguments#

PropertyTypeRequiredDescription
configurationCollectorConfiguration (input)noCollector-level configuration including active components, sampling rates, batching, and VRL transformations. These settings run on the collector host inside your infrastructure.
customBucketCollectorCustomBucket (input)noOptional custom S3-compatible bucket configuration for the collector. Can only be set when creating the collector and cannot be added, changed, or removed afterwards - recreate the collector to use a different bucket. Better Stack validates the credentials by writing and reading a test object in the bucket during creation.
dataRegionstringnoData region or private cluster name to create the collector in. Permitted values for most plans are: 'usWest', 'germany', 'singapore'. This value can only be set at creation time and cannot be changed afterwards. The API returns the specific cluster name, which may differ from the value you provide (for example, 'germany' may read back as 'eu-nbg-2').\ When importing an existing collector, leave 'dataRegion' unset in your configuration - Terraform reads it from the API. Pinning it to an identifier that differs from the stored cluster name produces a spurious 'dataRegion' cannot be changed after collector is created' error.
databasesCollectorDatabase (input)[]noDatabase connections for the collector. Deprecated - use the logtail.CollectorTarget resource instead.
ingestingPausedbooleannoWhether ingestion is paused for this collector.
liveTailPatternstringnoFreeform text template for formatting Live tail output with columns wrapped in {column} brackets. Example: "PID: {message_json.pid} {level} {message}"
logsRetentionnumbernoData retention for logs in days. Allowed values: 7, 30, 60, 90, 180, 365, 730, 1095, 1460, 1825. There might be additional charges for longer retention.
metricsRetentionnumbernoData retention for metrics in days. Allowed values: 7, 30, 60, 90, 180, 365, 730, 1095, 1460, 1825. There might be additional charges for longer retention.
namestringnoThe name of this collector.
notestringnoA description or note about this collector.
platformstringyesThe platform of this collector. This value can be set only when creating a new collector and cannot be changed later. Valid values are: docker, swarm, kubernetes.
sourceGroupIdnumbernoThe ID of the source group (folder) this collector belongs to. Set to 0 to remove from a group.
sourceVrlTransformationstringnoServer-side VRL transformation that runs during ingestion on Better Stack. Use this for enrichment, routing, or light normalization that doesn't involve sensitive data. For PII redaction and sensitive data filtering, prefer configuration.vrl_transformation which runs on the collector host and ensures raw data never leaves your network. Read more about VRL transformations.
teamNamestringnoUsed to specify the team the resource should be created in when using global tokens. You can't update this value later.
userVectorConfigstringnoCustom Vector YAML configuration for additional sources and transforms beyond the built-in component toggles. Must not contain command: directives.

Outputs#

Computed outputs are produced by the provider. They are not constructor arguments.

PropertyTypeComputedDescription
configurationCollectorConfiguration (output)noCollector-level configuration including active components, sampling rates, batching, and VRL transformations. These settings run on the collector host inside your infrastructure.
createdAtstringyesThe time when this collector was created.
customBucketCollectorCustomBucket (output)noOptional custom S3-compatible bucket configuration for the collector. Can only be set when creating the collector and cannot be added, changed, or removed afterwards - recreate the collector to use a different bucket. Better Stack validates the credentials by writing and reading a test object in the bucket during creation.
dataRegionstringnoData region or private cluster name to create the collector in. Permitted values for most plans are: 'usWest', 'germany', 'singapore'. This value can only be set at creation time and cannot be changed afterwards. The API returns the specific cluster name, which may differ from the value you provide (for example, 'germany' may read back as 'eu-nbg-2').\ When importing an existing collector, leave 'dataRegion' unset in your configuration - Terraform reads it from the API. Pinning it to an identifier that differs from the stored cluster name produces a spurious 'dataRegion' cannot be changed after collector is created' error.
databasesCollectorDatabase (output)[]noDatabase connections for the collector. Deprecated - use the logtail.CollectorTarget resource instead.
databasesCountnumberyesThe number of database connections configured for this collector.
hostsCountnumberyesThe number of hosts connected to this collector.
hostsUpCountnumberyesThe number of hosts currently online.
ingestingPausedbooleannoWhether ingestion is paused for this collector.
liveTailPatternstringnoFreeform text template for formatting Live tail output with columns wrapped in {column} brackets. Example: "PID: {message_json.pid} {level} {message}"
logsRetentionnumbernoData retention for logs in days. Allowed values: 7, 30, 60, 90, 180, 365, 730, 1095, 1460, 1825. There might be additional charges for longer retention.
metricsRetentionnumbernoData retention for metrics in days. Allowed values: 7, 30, 60, 90, 180, 365, 730, 1095, 1460, 1825. There might be additional charges for longer retention.
namestringnoThe name of this collector.
notestringnoA description or note about this collector.
pingedAtstringyesThe time when this collector last received data.
platformstringnoThe platform of this collector. This value can be set only when creating a new collector and cannot be changed later. Valid values are: docker, swarm, kubernetes.
secretstringyesThe secret token used to authenticate collector hosts.
sourceGroupIdnumbernoThe ID of the source group (folder) this collector belongs to. Set to 0 to remove from a group.
sourceIdnumberyesThe ID of the underlying source. Use this with logtail.Metric to define metrics on this collector's data.
sourceVrlTransformationstringnoServer-side VRL transformation that runs during ingestion on Better Stack. Use this for enrichment, routing, or light normalization that doesn't involve sensitive data. For PII redaction and sensitive data filtering, prefer configuration.vrl_transformation which runs on the collector host and ensures raw data never leaves your network. Read more about VRL transformations.
statusstringyesThe current status of this collector.
teamIdstringyesThe team ID for this resource.
teamNamestringnoUsed to specify the team the resource should be created in when using global tokens. You can't update this value later.
updatedAtstringyesThe time when this collector was last updated.
userVectorConfigstringnoCustom Vector YAML configuration for additional sources and transforms beyond the built-in component toggles. Must not contain command: directives.

CollectorConfiguration (input)#

Input object CollectorConfiguration. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
bufferMaxEventsnumbernoMaximum number of events held in the collector's in-memory buffer before overflowing to the disk buffer. Defaults to 10000.
componentsCollectorConfigurationComponents (input)noEnable or disable specific collector components. Maps to the Logs, Metrics, and eBPF tabs in the collector settings UI.
diskBatchSizeMbnumbernoDisk buffer size in MB for outgoing requests. Minimum 256 MB.
logLineLengthLimitKbnumbernoMaximum log line length in kB. Lines longer than this are dropped by the collector to protect Vector from memory exhaustion. Higher values may use more memory. Must be between 4 and 128. Defaults to 8.
logsSampleRatenumbernoSample rate for logs (0-100).
memoryBatchSizeMbnumbernoMemory batch size in MB for outgoing requests. Maximum 40 MB.
mergeLogsbooleannoWhether to merge multi-line logs (e.g. stack traces) into single log entries on the collector host before transmission. Matches the Merge logs tab in the collector's Transform data UI.
mergeLogsConfigstringnoVRL condition detecting the first line of a new log entry - consecutive lines not matching it are merged into the preceding entry. Leave unset to use the built-in heuristic (lines starting with a timestamp or log level). Only used when mergeLogs is true.
namespaceOptionsCollectorConfigurationNamespaceOption (input)[]noPer-namespace overrides for log sampling rate and trace ingestion (Kubernetes only). Order-independent; entries are identified by name.
serviceOptionsCollectorConfigurationServiceOption (input)[]noPer-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (better-stack-beyla, better-stack-collector) are excluded. Use the logtail.Collector data source to see all discovered services.
tracesSampleRatenumbernoSample rate for traces (0-100).
vrlTransformationstringnoVRL transformation that runs on the collector host, inside your infrastructure, before data is transmitted to Better Stack. Use this for PII redaction and sensitive data filtering - raw data never leaves your network. For server-side transformations that run during ingestion on Better Stack, use the top-level sourceVrlTransformation attribute instead. Read more about VRL transformations.
whenFullstringnoWhat the collector does when the disk buffer is full. dropNewest (default) drops incoming data, preferring availability; block applies backpressure to producers, preferring completeness.

CollectorConfigurationComponents (input)#

Input object CollectorConfigurationComponents. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
ebpfMetricsbooleannoEnable eBPF-based metrics collection.
ebpfRedMetricsbooleannoEnable service map and RED (Requests, Error rate, Duration) metrics via eBPF.
ebpfTracingBasicbooleannoEnable basic eBPF tracing.
ebpfTracingFullbooleannoEnable full eBPF tracing.
logsCollectorInternalsbooleannoCollect internal collector logs.
logsDockerbooleannoCollect Docker container logs.
logsHostbooleannoCollect host-level logs.
logsKubernetesbooleannoCollect Kubernetes logs.
metricsApachebooleannoCollect Apache metrics.
metricsClusterbooleannoRun the cluster agent for database metrics. Takes precedence over metricsDatabases when both are set.
metricsDatabasesbooleannoRun the cluster agent for database metrics.
metricsElasticsearchbooleannoEnable the Elasticsearch metrics exporter. Defaults to true.
metricsMysqlbooleannoEnable the MySQL metrics exporter. Defaults to true.
metricsNginxbooleannoCollect Nginx metrics.
metricsPgbouncerbooleannoEnable the PgBouncer metrics exporter. Defaults to true.
metricsPostgresbooleannoEnable the PostgreSQL metrics exporter. Defaults to true.
metricsTraefikbooleannoCollect Traefik metrics.
tracesOpentelemetrybooleannoAccept OpenTelemetry SDK traces on ports 4317 (gRPC) and 4318 (HTTP).

CollectorConfigurationNamespaceOption (input)#

Input object CollectorConfigurationNamespaceOption. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
ingestTracesbooleannoWhether to ingest traces for this namespace.
logSamplingnumbernoLog sampling rate (0-100).
namestringyesNamespace name.

CollectorConfigurationServiceOption (input)#

Input object CollectorConfigurationServiceOption. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
ingestTracesbooleannoWhether to ingest traces for this service.
logSamplingnumbernoLog sampling rate (0-100).
namestringyesService name.

CollectorCustomBucket (input)#

Input object CollectorCustomBucket. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
accessKeyIdstringyesAccess key ID for the bucket.
endpointstringyesBucket endpoint including the bucket name, e.g. https://s3.us-east-1.amazonaws.com/my-bucket or https://my-bucket.s3.us-east-1.amazonaws.com.
keepDataAfterRetentionbooleannoWhether to keep data in the bucket after the retention period.
namestringnoBucket name derived from endpoint. Deprecated - do not set this attribute.
secretAccessKeystringyesSecret access key for the bucket.

CollectorDatabase (input)#

Input object CollectorDatabase. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
hoststringyesThe database host.
idnumbernoThe ID of this database connection (assigned by the API).
passwordstringnoThe database password.
portnumberyesThe database port.
serviceTypestringyesThe type of database service.
sslModestringnoSSL mode for PostgreSQL connections. Valid values: disable, require, verify-ca.
tlsstringnoTLS mode for MySQL connections. Valid values: false, true, skip-verify, preferred.
usernamestringnoThe database username.

CollectorConfiguration (output)#

Output object CollectorConfiguration. Fields below belong to this object.

PropertyTypeAlways presentDescription
bufferMaxEventsnumberyesMaximum number of events held in the collector's in-memory buffer before overflowing to the disk buffer. Defaults to 10000.
componentsCollectorConfigurationComponents (output)noEnable or disable specific collector components. Maps to the Logs, Metrics, and eBPF tabs in the collector settings UI.
diskBatchSizeMbnumberyesDisk buffer size in MB for outgoing requests. Minimum 256 MB.
logLineLengthLimitKbnumberyesMaximum log line length in kB. Lines longer than this are dropped by the collector to protect Vector from memory exhaustion. Higher values may use more memory. Must be between 4 and 128. Defaults to 8.
logsSampleRatenumberyesSample rate for logs (0-100).
memoryBatchSizeMbnumberyesMemory batch size in MB for outgoing requests. Maximum 40 MB.
mergeLogsbooleanyesWhether to merge multi-line logs (e.g. stack traces) into single log entries on the collector host before transmission. Matches the Merge logs tab in the collector's Transform data UI.
mergeLogsConfigstringyesVRL condition detecting the first line of a new log entry - consecutive lines not matching it are merged into the preceding entry. Leave unset to use the built-in heuristic (lines starting with a timestamp or log level). Only used when mergeLogs is true.
namespaceOptionsCollectorConfigurationNamespaceOption (output)[]noPer-namespace overrides for log sampling rate and trace ingestion (Kubernetes only). Order-independent; entries are identified by name.
serviceOptionsCollectorConfigurationServiceOption (output)[]noPer-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (better-stack-beyla, better-stack-collector) are excluded. Use the logtail.Collector data source to see all discovered services.
tracesSampleRatenumberyesSample rate for traces (0-100).
vrlTransformationstringyesVRL transformation that runs on the collector host, inside your infrastructure, before data is transmitted to Better Stack. Use this for PII redaction and sensitive data filtering - raw data never leaves your network. For server-side transformations that run during ingestion on Better Stack, use the top-level sourceVrlTransformation attribute instead. Read more about VRL transformations.
whenFullstringyesWhat the collector does when the disk buffer is full. dropNewest (default) drops incoming data, preferring availability; block applies backpressure to producers, preferring completeness.

CollectorConfigurationComponents (output)#

Output object CollectorConfigurationComponents. Fields below belong to this object.

PropertyTypeAlways presentDescription
ebpfMetricsbooleanyesEnable eBPF-based metrics collection.
ebpfRedMetricsbooleanyesEnable service map and RED (Requests, Error rate, Duration) metrics via eBPF.
ebpfTracingBasicbooleanyesEnable basic eBPF tracing.
ebpfTracingFullbooleanyesEnable full eBPF tracing.
logsCollectorInternalsbooleanyesCollect internal collector logs.
logsDockerbooleanyesCollect Docker container logs.
logsHostbooleanyesCollect host-level logs.
logsKubernetesbooleanyesCollect Kubernetes logs.
metricsApachebooleanyesCollect Apache metrics.
metricsClusterbooleanyesRun the cluster agent for database metrics. Takes precedence over metricsDatabases when both are set.
metricsDatabasesbooleanyesRun the cluster agent for database metrics.
metricsElasticsearchbooleanyesEnable the Elasticsearch metrics exporter. Defaults to true.
metricsMysqlbooleanyesEnable the MySQL metrics exporter. Defaults to true.
metricsNginxbooleanyesCollect Nginx metrics.
metricsPgbouncerbooleanyesEnable the PgBouncer metrics exporter. Defaults to true.
metricsPostgresbooleanyesEnable the PostgreSQL metrics exporter. Defaults to true.
metricsTraefikbooleanyesCollect Traefik metrics.
tracesOpentelemetrybooleanyesAccept OpenTelemetry SDK traces on ports 4317 (gRPC) and 4318 (HTTP).

CollectorConfigurationNamespaceOption (output)#

Output object CollectorConfigurationNamespaceOption. Fields below belong to this object.

PropertyTypeAlways presentDescription
ingestTracesbooleannoWhether to ingest traces for this namespace.
logSamplingnumbernoLog sampling rate (0-100).
namestringyesNamespace name.

CollectorConfigurationServiceOption (output)#

Output object CollectorConfigurationServiceOption. Fields below belong to this object.

PropertyTypeAlways presentDescription
ingestTracesbooleannoWhether to ingest traces for this service.
logSamplingnumbernoLog sampling rate (0-100).
namestringyesService name.

CollectorCustomBucket (output)#

Output object CollectorCustomBucket. Fields below belong to this object.

PropertyTypeAlways presentDescription
accessKeyIdstringyesAccess key ID for the bucket.
endpointstringyesBucket endpoint including the bucket name, e.g. https://s3.us-east-1.amazonaws.com/my-bucket or https://my-bucket.s3.us-east-1.amazonaws.com.
keepDataAfterRetentionbooleannoWhether to keep data in the bucket after the retention period.
namestringyesBucket name derived from endpoint. Deprecated - do not set this attribute.
secretAccessKeystringyesSecret access key for the bucket.

CollectorDatabase (output)#

Output object CollectorDatabase. Fields below belong to this object.

PropertyTypeAlways presentDescription
hoststringyesThe database host.
idnumberyesThe ID of this database connection (assigned by the API).
passwordstringnoThe database password.
portnumberyesThe database port.
serviceTypestringyesThe type of database service.
sslModestringnoSSL mode for PostgreSQL connections. Valid values: disable, require, verify-ca.
tlsstringnoTLS mode for MySQL connections. Valid values: false, true, skip-verify, preferred.
usernamestringnoThe database username.