MinIO
Synopsis
Creates a target that writes log messages to MinIO object storage with support for various file formats and authentication methods. The target handles large file uploads efficiently with configurable rotation based on size or event count. MinIO provides high-performance, Kubernetes-native object storage that can be deployed on-premises or in the cloud.
Schema
- name: <string>
  description: <string>
  type: minio
  pipelines: <pipeline[]>
  status: <boolean>
  properties:
    key: <string>
    secret: <string>
    region: <string>
    endpoint: <string>
    part_size: <numeric>
    bucket: <string>
    buckets:
      - bucket: <string>
        name: <string>
        format: <string>
        compression: <string>
        extension: <string>
        schema: <string>
    name: <string>
    format: <string>
    compression: <string>
    extension: <string>
    schema: <string>
    max_size: <numeric>
    batch_size: <numeric>
    timeout: <numeric>
    field_format: <string>
    interval: <string|numeric>
    cron: <string>
    debug:
      status: <boolean>
      dont_send_logs: <boolean>
Configuration
The following fields are used to define the target:
| Field | Required | Default | Description | 
|---|---|---|---|
name | Y | Target name | |
description | N | - | Optional description | 
type | Y | Must be minio | |
pipelines | N | - | Optional post-processor pipelines | 
status | N | true | Enable/disable the target | 
MinIO Credentials
| Field | Required | Default | Description | 
|---|---|---|---|
key | Y | - | MinIO access key | 
secret | Y | - | MinIO secret key | 
region | N | us-east-1 | MinIO region (default if not using multiple regions) | 
endpoint | Y | - | MinIO server endpoint URL (e.g., http://minio-server:9000 or https://minio.example.com) | 
Connection
| Field | Required | Default | Description | 
|---|---|---|---|
part_size | N | 5 | Multipart upload part size in megabytes (minimum 5MB) | 
timeout | N | 30 | Connection timeout in seconds | 
field_format | N | - | Data normalization format. See applicable Normalization section | 
Files
| Field | Required | Default | Description | 
|---|---|---|---|
bucket | N* | - | Default MinIO bucket name (used if buckets not specified) | 
buckets | N* | - | Array of bucket configurations for file distribution | 
buckets.bucket | Y | - | MinIO bucket name | 
buckets.name | Y | - | File name template | 
buckets.format | N | "json" | Output format: json, multijson, avro, parquet | 
buckets.compression | N | - | Compression algorithm. See Compression below | 
buckets.extension | N | Matches format | File extension override | 
buckets.schema | N* | - | Schema definition file path (required for Avro and Parquet formats) | 
name | N | "vmetric.{{.Timestamp}}.{{.Extension}}" | Default file name template when buckets not used | 
format | N | "json" | Default output format when buckets not used | 
compression | N | - | Default compression when buckets not used | 
extension | N | Matches format | Default file extension when buckets not used | 
schema | N | - | Default schema path when buckets not used | 
max_size | N | 0 | Maximum file size in bytes before rotation | 
batch_size | N | 100000 | Maximum number of messages per file | 
* = Either bucket or buckets must be specified. When using buckets, schema is conditionally required for Avro and Parquet formats.
When max_size is reached, the current file is uploaded to MinIO and a new file is created. For unlimited file size, set the field to 0.
Scheduler
| Field | Required | Default | Description | 
|---|---|---|---|
interval | N | realtime | Execution frequency. See Interval for details | 
cron | N | - | Cron expression for scheduled execution. See Cron for details | 
Debug Options
| Field | Required | Default | Description | 
|---|---|---|---|
debug.status | N | false | Enable debug logging | 
debug.dont_send_logs | N | false | Process logs but don't send to target (testing) | 
Details
The MinIO target provides high-performance object storage integration with comprehensive file format support. MinIO is designed for private cloud infrastructure and offers enterprise features like versioning, lifecycle management, and replication.
Authentication
Requires MinIO access credentials. Access keys can be created through the MinIO Console or mc (MinIO Client) command-line tool. Keys can be scoped with specific permissions and bucket access policies.
Endpoint Configuration
The endpoint URL points to your MinIO server deployment. This can be a local deployment (e.g., http://localhost:9000), an internal network address (e.g., http://minio-service:9000), or a public domain with TLS (e.g., https://minio.example.com).
Deployment Flexibility
MinIO can be deployed in various environments including on-premises data centers, private clouds, public clouds, edge locations, and Kubernetes clusters. The target works seamlessly with any MinIO deployment.
File Formats
| Format | Description | 
|---|---|
json | Each log entry is written as a separate JSON line (JSONL format) | 
multijson | All log entries are written as a single JSON array | 
avro | Apache Avro format with schema | 
parquet | Apache Parquet columnar format with schema | 
Compression
Some formats support built-in compression to reduce storage costs and transfer times. When supported, compression is applied at the file/block level before upload.
| Format | Default | Compression Codecs | 
|---|---|---|
| JSON | - | Not supported | 
| MultiJSON | - | Not supported | 
| Avro | zstd | deflate, snappy, zstd | 
| Parquet | zstd | gzip, snappy, zstd, brotli, lz4 | 
File Management
Files are rotated based on size (max_size parameter) or event count (batch_size parameter), whichever limit is reached first. Template variables in file names enable dynamic file naming for time-based partitioning.
Templates
The following template variables can be used in file names:
| Variable | Description | Example | 
|---|---|---|
{{.Year}} | Current year | 2024 | 
{{.Month}} | Current month | 01 | 
{{.Day}} | Current day | 15 | 
{{.Timestamp}} | Current timestamp in nanoseconds | 1703688533123456789 | 
{{.Format}} | File format | json | 
{{.Extension}} | File extension | json | 
{{.Compression}} | Compression type | zstd | 
{{.TargetName}} | Target name | my_logs | 
{{.TargetType}} | Target type | minio | 
{{.Table}} | Bucket name | logs | 
Multipart Upload
Large files automatically use multipart upload protocol with configurable part size (part_size parameter). Default 5MB part size balances upload efficiency and memory usage.
Multiple Buckets
Single target can write to multiple MinIO buckets with different configurations, enabling data distribution strategies (e.g., raw data to one bucket, processed data to another).
Schema Requirements
Avro and Parquet formats require schema definition files. Schema files must be accessible at the path specified in the schema parameter during target initialization.
Performance Optimization
MinIO is optimized for high-throughput workloads and can handle concurrent uploads efficiently. Consider using erasure coding and distributed mode for enhanced performance and reliability.
Examples
Basic Configuration
The minimum configuration for a JSON MinIO target:
targets:
  - name: basic_minio
    type: minio
    properties:
      key: "minioadmin"
      secret: "minioadmin"
      endpoint: "http://minio-server:9000"
      bucket: "datastream-logs"
Multiple Buckets
Configuration for distributing data across multiple MinIO buckets with different formats:
targets:
  - name: multi_bucket_export
    type: minio
    properties:
      key: "analytics-user"
      secret: "analytics-password-secure"
      endpoint: "https://minio.example.com"
      buckets:
        - bucket: "raw-data-archive"
          name: "raw-{{.Year}}-{{.Month}}-{{.Day}}.json"
          format: "multijson"
          compression: "gzip"
        - bucket: "analytics-data"
          name: "analytics-{{.Year}}/{{.Month}}/{{.Day}}/data_{{.Timestamp}}.parquet"
          format: "parquet"
          schema: "<schema definition>"
          compression: "snappy"
Parquet Format
Configuration for daily partitioned Parquet files:
targets:
  - name: parquet_analytics
    type: minio
    properties:
      key: "analytics-user"
      secret: "analytics-password-secure"
      endpoint: "http://10.0.1.100:9000"
      bucket: "analytics-lake"
      name: "events/year={{.Year}}/month={{.Month}}/day={{.Day}}/part-{{.Timestamp}}.parquet"
      format: "parquet"
      schema: "<schema definition>"
      compression: "snappy"
      max_size: 536870912
High Reliability
Configuration with enhanced settings:
targets:
  - name: reliable_minio
    type: minio
    pipelines:
      - checkpoint
    properties:
      key: "backup-user"
      secret: "backup-password-secure"
      endpoint: "https://minio-backup.example.com"
      bucket: "critical-logs"
      name: "logs-{{.Timestamp}}.json"
      format: "json"
      timeout: 60
      part_size: 10
With Field Normalization
Using field normalization for standard format:
targets:
  - name: normalized_minio
    type: minio
    properties:
      key: "normalized-user"
      secret: "normalized-password-secure"
      endpoint: "http://minio.internal:9000"
      bucket: "normalized-logs"
      name: "logs-{{.Timestamp}}.json"
      format: "json"
      field_format: "cim"
Debug Configuration
Configuration with debugging enabled:
targets:
  - name: debug_minio
    type: minio
    properties:
      key: "test-user"
      secret: "test-password"
      endpoint: "http://localhost:9000"
      bucket: "test-logs"
      name: "test-{{.Timestamp}}.json"
      format: "json"
      debug:
        status: true
        dont_send_logs: true
Kubernetes Deployment
Configuration for MinIO deployed in Kubernetes:
targets:
  - name: k8s_minio
    type: minio
    properties:
      key: "k8s-minio-user"
      secret: "k8s-minio-password-secure"
      endpoint: "http://minio.default.svc.cluster.local:9000"
      bucket: "application-logs"
      name: "logs/{{.Year}}/{{.Month}}/{{.Day}}/{{.Timestamp}}.json"
      format: "json"
      compression: "zstd"