Stream events from files from a S3 bucket.

Each line from each file generates an event. Files ending in .gz are handled as gzip’ed files.

 

Synopsis

edit

This plugin supports the following configuration options:

Required configuration options:

s3 {
    bucket => ...
}

Available configuration options:

Setting Input type Required Default value

access_key_id

string

No

add_field

hash

No

{}

aws_credentials_file

string

No

backup_add_prefix

string

No

nil

backup_to_bucket

string

No

nil

backup_to_dir

string

No

nil

bucket

string

Yes

codec

codec

No

"plain"

delete

boolean

No

false

exclude_pattern

string

No

nil

interval

number

No

60

prefix

string

No

nil

proxy_uri

string

No

region

string, one of ["us-east-1", "us-west-1", "us-west-2", "eu-central-1", "eu-west-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "sa-east-1", "us-gov-west-1", "cn-north-1"]

No

"us-east-1"

secret_access_key

string

No

session_token

string

No

sincedb_path

string

No

nil

tags

array

No

temporary_directory

string

No

"/var/folders/_9/x4bq65rs6vd0rrjthct3zxjw0000gn/T/logstash"

type

string

No

use_ssl

boolean

No

true

Details

edit

 

access_key_id

edit
  • Value type is string
  • There is no default value for this setting.

add_field

edit
  • Value type is hash
  • Default value is {}

Add a field to an event

aws_credentials_file

edit
  • Value type is string
  • There is no default value for this setting.

backup_add_prefix

edit
  • Value type is string
  • Default value is nil

Append a prefix to the key (full path including file name in s3) after processing. If backing up to another (or the same) bucket, this effectively lets you choose a new folder to place the files in

backup_to_bucket

edit
  • Value type is string
  • Default value is nil

Name of a S3 bucket to backup processed files to.

backup_to_dir

edit
  • Value type is string
  • Default value is nil

Path of a local directory to backup processed files to.

bucket

edit
  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

The name of the S3 bucket.

codec

edit
  • Value type is codec
  • Default value is "plain"

The codec used for input data. Input codecs are a convenient method for decoding your data before it enters the input, without needing a separate filter in your Logstash pipeline.

credentials (DEPRECATED)

edit
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is array
  • Default value is []

DEPRECATED: The credentials of the AWS account used to access the bucket. Credentials can be specified: - As an ["id","secret"] array - As a path to a file containing AWS_ACCESS_KEY_ID=…​ and AWS_SECRET_ACCESS_KEY=…​ - In the environment, if not set (using variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)

delete

edit
  • Value type is boolean
  • Default value is false

Whether to delete processed files from the original bucket.

exclude_pattern

edit
  • Value type is string
  • Default value is nil

Ruby style regexp of keys to exclude from the bucket

interval

edit
  • Value type is number
  • Default value is 60

Interval to wait between to check the file list again after a run is finished. Value is in seconds.

prefix

edit
  • Value type is string
  • Default value is nil

If specified, the prefix of filenames in the bucket must match (not a regexp)

proxy_uri

edit
  • Value type is string
  • There is no default value for this setting.

region

edit
  • Value can be any of: us-east-1, us-west-1, us-west-2, eu-central-1, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, us-gov-west-1, cn-north-1
  • Default value is "us-east-1"

region_endpoint (DEPRECATED)

edit
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value can be any of: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, us-gov-west-1
  • There is no default value for this setting.

The AWS region for your bucket.

secret_access_key

edit
  • Value type is string
  • There is no default value for this setting.

session_token

edit
  • Value type is string
  • There is no default value for this setting.

sincedb_path

edit
  • Value type is string
  • Default value is nil

Where to write the since database (keeps track of the date the last handled file was added to S3). The default will write sincedb files to some path matching "$HOME/.sincedb*" Should be a path with filename not just a directory.

tags

edit
  • Value type is array
  • There is no default value for this setting.

Add any number of arbitrary tags to your event.

This can help with processing later.

temporary_directory

edit
  • Value type is string
  • Default value is "/var/folders/_9/x4bq65rs6vd0rrjthct3zxjw0000gn/T/logstash"

Set the directory where logstash will store the tmp files before processing them. default to the current OS temporary directory in linux /tmp/logstash

type

edit
  • Value type is string
  • There is no default value for this setting.

Add a type field to all events handled by this input.

Types are used mainly for filter activation.

The type is stored as part of the event itself, so you can also use the type to search for it in Kibana.

If you try to set a type on an event that already has one (for example when you send an event from a shipper to an indexer) then a new input will not override the existing type. A type set at the shipper stays with that event for its life even when sent to another Logstash server.

use_ssl

edit
  • Value type is boolean
  • Default value is true