interface SplunkLogDriverProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.SplunkLogDriverProps |
![]() | software.amazon.awscdk.services.ecs.SplunkLogDriverProps |
![]() | aws_cdk.aws_ecs.SplunkLogDriverProps |
![]() | @aws-cdk/aws-ecs » SplunkLogDriverProps |
Specifies the splunk log driver configuration options.
Example
// Create a Task Definition for the container to start
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
taskDefinition.addContainer('TheContainer', {
image: ecs.ContainerImage.fromRegistry('example-image'),
memoryLimitMiB: 256,
logging: ecs.LogDrivers.splunk({
token: SecretValue.secretsManager('my-splunk-token'),
url: 'my-splunk-url',
}),
});
Properties
Name | Type | Description |
---|---|---|
url | string | 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. |
ca | string | Name to use for validating server certificate. |
ca | string | Path to root certificate. |
env? | string[] | The env option takes an array of keys. |
env | string | The env-regex option is similar to and compatible with env. |
format? | Splunk | Message format. |
gzip? | boolean | Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance. |
gzip | number | Set compression level for gzip. |
index? | string | Event index. |
insecure | string | Ignore server certificate validation. |
labels? | string[] | The labels option takes an array of keys. |
secret | Secret | Splunk HTTP Event Collector token (Secret). |
source? | string | Event source. |
source | string | Event source type. |
tag? | string | By default, Docker uses the first 12 characters of the container ID to tag log messages. |
token? | Secret | Splunk HTTP Event Collector token. |
verify | boolean | Verify on start, that docker can connect to Splunk server. |
url
Type:
string
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.
caName?
Type:
string
(optional, default: The hostname of the splunk-url)
Name to use for validating server certificate.
caPath?
Type:
string
(optional, default: caPath not set.)
Path to root certificate.
env?
Type:
string[]
(optional, default: No env)
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.
envRegex?
Type:
string
(optional, default: No envRegex)
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.
format?
Type:
Splunk
(optional, default: inline)
Message format.
Can be inline, json or raw.
gzip?
Type:
boolean
(optional, default: false)
Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance.
gzipLevel?
Type:
number
(optional, default: -1 (Default Compression))
Set compression level for gzip.
Valid values are -1 (default), 0 (no compression), 1 (best speed) ... 9 (best compression).
index?
Type:
string
(optional, default: index not set.)
Event index.
insecureSkipVerify?
Type:
string
(optional, default: insecureSkipVerify not set.)
Ignore server certificate validation.
labels?
Type:
string[]
(optional, default: No labels)
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.
secretToken?
Type:
Secret
(optional, default: If secret token is not provided, then the value provided in token
will be used.)
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 token
or secretToken
.
source?
Type:
string
(optional, default: source not set.)
Event source.
sourceType?
Type:
string
(optional, default: sourceType not set.)
Event source type.
tag?
Type:
string
(optional, default: The first 12 characters of the container ID)
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.
token?
⚠️ Deprecated: Use {@link SplunkLogDriverProps.secretToken} instead.
Type:
Secret
(optional, default: token not provided.)
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 token
or secretToken
.
verifyConnection?
Type:
boolean
(optional, default: true)
Verify on start, that docker can connect to Splunk server.