SplunkLogDriver(*, url, ca_name=None, ca_path=None, format=None, gzip=None, gzip_level=None, index=None, insecure_skip_verify=None, secret_token=None, source=None, source_type=None, token=None, verify_connection=None, env=None, env_regex=None, labels=None, tag=None)¶
A log driver that sends log information to splunk Logs.
Constructs a new instance of the SplunkLogDriver class.
str) – Path to your Splunk Enterprise, self-service Splunk Cloud instance, or Splunk Cloud managed cluster (including port and scheme used by HTTP Event Collector) in one of the following formats: https://your_splunk_instance:8088 or https://input-prd-p-XXXXXXX.cloud.splunk.com:8088 or https://http-inputs-XXXXXXXX.splunkcloud.com.
str]) – Name to use for validating server certificate. Default: - The hostname of the splunk-url
str]) – Path to root certificate. Default: - caPath not set.
SplunkLogFormat]) – Message format. Can be inline, json or raw. Default: - inline
bool]) – Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance. Default: - false
None]) – Set compression level for gzip. Valid values are -1 (default), 0 (no compression), 1 (best speed) … 9 (best compression). Default: - -1 (Default Compression)
str]) – Event index. Default: - index not set.
str]) – Ignore server certificate validation. Default: - insecureSkipVerify not set.
Secret]) – Splunk HTTP Event Collector token (Secret). The splunk-token is added to the SecretOptions property of the Log Driver Configuration. So the secret value will not be resolved or viewable as plain text. Please provide at least one of
secretToken. Default: - If secret token is not provided, then the value provided in
tokenwill be used.
str]) – Event source. Default: - source not set.
str]) – Event source type. Default: - sourceType not set.
SecretValue]) – (deprecated) Splunk HTTP Event Collector token. The splunk-token is added to the Options property of the Log Driver Configuration. So the secret value will be resolved and viewable in plain text in the console. Please provide at least one of
secretToken. Default: - token not provided.
bool]) – Verify on start, that docker can connect to Splunk server. Default: - true
str]]) – The env option takes an array of keys. If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message. Default: - No env
str]) – The env-regex option is similar to and compatible with env. Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options. Default: - No envRegex
str]]) – The labels option takes an array of keys. If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message. Default: - No labels
str]) – By default, Docker uses the first 12 characters of the container ID to tag log messages. Refer to the log tag option documentation for customizing the log tag format. Default: - The first 12 characters of the container ID
Called when the log driver is configured on a container.
aws_logs(*, stream_prefix, datetime_format=None, log_group=None, log_retention=None, mode=None, multiline_pattern=None)¶
Creates a log driver configuration that sends log information to CloudWatch Logs.
str) – Prefix for the log streams. The awslogs-stream-prefix option allows you to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task to which the container belongs. If you specify a prefix with this option, then the log stream takes the following format:: prefix-name/container-name/ecs-task-id
str]) – This option defines a multiline start pattern in Python strftime format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages. Default: - No multiline matching.
ILogGroup]) – The log group to log to. Default: - A log group is automatically created.
RetentionDays]) – The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct. Default: - Logs never expire.
AwsLogDriverMode]) – The delivery mode of log messages from the container to awslogs. Default: - AwsLogDriverMode.BLOCKING
str]) – This option defines a multiline start pattern using a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages. This option is ignored if datetimeFormat is also configured. Default: - No multiline matching.
- Return type