interface SplunkLogDriverProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.SplunkLogDriverProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#SplunkLogDriverProps |
![]() | software.amazon.awscdk.services.ecs.SplunkLogDriverProps |
![]() | aws_cdk.aws_ecs.SplunkLogDriverProps |
![]() | aws-cdk-lib » aws_ecs » SplunkLogDriverProps |
Specifies the splunk log driver configuration options.
Example
declare const secret: ecs.Secret;
// 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({
secretToken: secret,
url: 'my-splunk-url',
}),
});
Properties
Name | Type | Description |
---|---|---|
secret | Secret | Splunk HTTP Event Collector token (Secret). |
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. |
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. |
verify | boolean | Verify on start, that docker can connect to Splunk server. |
secretToken
Type:
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.
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.
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.
verifyConnection?
Type:
boolean
(optional, default: true)
Verify on start, that docker can connect to Splunk server.