Class SplunkLogDriverProps
Specifies the splunk log driver configuration options.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class SplunkLogDriverProps : Object, ISplunkLogDriverProps, IBaseLogDriverProps
Syntax (vb)
Public Class SplunkLogDriverProps
Inherits Object
Implements ISplunkLogDriverProps, IBaseLogDriverProps
Remarks
ExampleMetadata: infused
Examples
// Create a Task Definition for the container to start
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
MemoryLimitMiB = 256,
Logging = LogDrivers.Splunk(new SplunkLogDriverProps {
Token = SecretValue.SecretsManager("my-splunk-token"),
Url = "my-splunk-url"
})
});
Synopsis
Constructors
SplunkLogDriverProps() |
Properties
CaName | Name to use for validating server certificate. |
CaPath | Path to root certificate. |
Env | The env option takes an array of keys. |
EnvRegex | The env-regex option is similar to and compatible with env. |
Format | Message format. |
Gzip | Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance. |
GzipLevel | Set compression level for gzip. |
Index | Event index. |
InsecureSkipVerify | Ignore server certificate validation. |
Labels | The labels option takes an array of keys. |
SecretToken | Splunk HTTP Event Collector token (Secret). |
Source | Event source. |
SourceType | Event source type. |
Tag | By default, Docker uses the first 12 characters of the container ID to tag log messages. |
Token | (deprecated) Splunk HTTP Event Collector token. |
Url | 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. |
VerifyConnection | Verify on start, that docker can connect to Splunk server. |
Constructors
SplunkLogDriverProps()
public SplunkLogDriverProps()
Properties
CaName
Name to use for validating server certificate.
public string CaName { get; set; }
Property Value
System.String
Remarks
Default: - The hostname of the splunk-url
CaPath
Path to root certificate.
public string CaPath { get; set; }
Property Value
System.String
Remarks
Default: - caPath not set.
Env
The env option takes an array of keys.
public string[] Env { get; set; }
Property Value
System.String[]
Remarks
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
EnvRegex
The env-regex option is similar to and compatible with env.
public string EnvRegex { get; set; }
Property Value
System.String
Remarks
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
Default: - No envRegex
Format
Message format.
public Nullable<SplunkLogFormat> Format { get; set; }
Property Value
System.Nullable<SplunkLogFormat>
Remarks
Can be inline, json or raw.
Default: - inline
Gzip
Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance.
public Nullable<bool> Gzip { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
GzipLevel
Set compression level for gzip.
public Nullable<double> GzipLevel { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Valid values are -1 (default), 0 (no compression), 1 (best speed) ... 9 (best compression).
Default: - -1 (Default Compression)
Index
Event index.
public string Index { get; set; }
Property Value
System.String
Remarks
Default: - index not set.
InsecureSkipVerify
Ignore server certificate validation.
public string InsecureSkipVerify { get; set; }
Property Value
System.String
Remarks
Default: - insecureSkipVerify not set.
Labels
The labels option takes an array of keys.
public string[] Labels { get; set; }
Property Value
System.String[]
Remarks
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
SecretToken
Splunk HTTP Event Collector token (Secret).
public Secret SecretToken { get; set; }
Property Value
Remarks
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
.
Default: - If secret token is not provided, then the value provided in token
will be used.
Source
Event source.
public string Source { get; set; }
Property Value
System.String
Remarks
Default: - source not set.
SourceType
Event source type.
public string SourceType { get; set; }
Property Value
System.String
Remarks
Default: - sourceType not set.
Tag
By default, Docker uses the first 12 characters of the container ID to tag log messages.
public string Tag { get; set; }
Property Value
System.String
Remarks
Refer to the log tag option documentation for customizing the log tag format.
Default: - The first 12 characters of the container ID
Token
(deprecated) Splunk HTTP Event Collector token.
public SecretValue Token { get; set; }
Property Value
Remarks
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
.
Default: - token not provided.
Stability: Deprecated
Url
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.
public string Url { get; set; }
Property Value
System.String
VerifyConnection
Verify on start, that docker can connect to Splunk server.
public Nullable<bool> VerifyConnection { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true