Class: AWSCDK::ECS::SplunkLogDriverProps
- Inherits:
-
BaseLogDriverProps
- Object
- BaseLogDriverProps
- AWSCDK::ECS::SplunkLogDriverProps
- Defined in:
- ecs/splunk_log_driver_props.rb
Overview
Specifies the splunk log driver configuration options.
Instance Attribute Summary collapse
-
#ca_name ⇒ String?
readonly
Name to use for validating server certificate.
-
#ca_path ⇒ String?
readonly
Path to root certificate.
-
#env ⇒ Array<String>?
readonly
The env option takes an array of keys.
-
#env_regex ⇒ String?
readonly
The env-regex option is similar to and compatible with env.
-
#format ⇒ AWSCDK::ECS::SplunkLogFormat?
readonly
Message format.
-
#gzip ⇒ Boolean?
readonly
Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance.
-
#gzip_level ⇒ Numeric?
readonly
Set compression level for gzip.
-
#index ⇒ String?
readonly
Event index.
-
#insecure_skip_verify ⇒ String?
readonly
Ignore server certificate validation.
-
#labels ⇒ Array<String>?
readonly
The labels option takes an array of keys.
-
#secret_token ⇒ AWSCDK::ECS::Secret
readonly
Splunk HTTP Event Collector token (Secret).
-
#source ⇒ String?
readonly
Event source.
-
#source_type ⇒ String?
readonly
Event source type.
-
#tag ⇒ String?
readonly
By default, Docker uses the first 12 characters of the container ID to tag log messages.
-
#url ⇒ String
readonly
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.
-
#verify_connection ⇒ Boolean?
readonly
Verify on start, that docker can connect to Splunk server.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, secret_token:, url:, ca_name: nil, ca_path: nil, format: nil, gzip: nil, gzip_level: nil, index: nil, insecure_skip_verify: nil, source: nil, source_type: nil, verify_connection: nil) ⇒ SplunkLogDriverProps
constructor
A new instance of SplunkLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, secret_token:, url:, ca_name: nil, ca_path: nil, format: nil, gzip: nil, gzip_level: nil, index: nil, insecure_skip_verify: nil, source: nil, source_type: nil, verify_connection: nil) ⇒ SplunkLogDriverProps
Returns a new instance of SplunkLogDriverProps.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'ecs/splunk_log_driver_props.rb', line 25 def initialize(env: nil, env_regex: nil, labels: nil, tag: nil, secret_token:, url:, ca_name: nil, ca_path: nil, format: nil, gzip: nil, gzip_level: nil, index: nil, insecure_skip_verify: nil, source: nil, source_type: nil, verify_connection: nil) @env = env Jsii::Type.check_type(@env, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "env") unless @env.nil? @env_regex = env_regex Jsii::Type.check_type(@env_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "envRegex") unless @env_regex.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "labels") unless @labels.nil? @tag = tag Jsii::Type.check_type(@tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless @tag.nil? @secret_token = secret_token Jsii::Type.check_type(@secret_token, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlY3JldCJ9")), "secretToken") @url = url Jsii::Type.check_type(@url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "url") @ca_name = ca_name Jsii::Type.check_type(@ca_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "caName") unless @ca_name.nil? @ca_path = ca_path Jsii::Type.check_type(@ca_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "caPath") unless @ca_path.nil? @format = format Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNwbHVua0xvZ0Zvcm1hdCJ9")), "format") unless @format.nil? @gzip = gzip Jsii::Type.check_type(@gzip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "gzip") unless @gzip.nil? @gzip_level = gzip_level Jsii::Type.check_type(@gzip_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gzipLevel") unless @gzip_level.nil? @index = index Jsii::Type.check_type(@index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "index") unless @index.nil? @insecure_skip_verify = insecure_skip_verify Jsii::Type.check_type(@insecure_skip_verify, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "insecureSkipVerify") unless @insecure_skip_verify.nil? @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") unless @source.nil? @source_type = source_type Jsii::Type.check_type(@source_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceType") unless @source_type.nil? @verify_connection = verify_connection Jsii::Type.check_type(@verify_connection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "verifyConnection") unless @verify_connection.nil? end |
Instance Attribute Details
#ca_name ⇒ String? (readonly)
Default: - The hostname of the splunk-url
Name to use for validating server certificate.
110 111 112 |
# File 'ecs/splunk_log_driver_props.rb', line 110 def ca_name @ca_name end |
#ca_path ⇒ String? (readonly)
Default: - caPath not set.
Path to root certificate.
115 116 117 |
# File 'ecs/splunk_log_driver_props.rb', line 115 def ca_path @ca_path end |
#env ⇒ Array<String>? (readonly)
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.
68 69 70 |
# File 'ecs/splunk_log_driver_props.rb', line 68 def env @env end |
#env_regex ⇒ String? (readonly)
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.
77 78 79 |
# File 'ecs/splunk_log_driver_props.rb', line 77 def env_regex @env_regex end |
#format ⇒ AWSCDK::ECS::SplunkLogFormat? (readonly)
Default: - inline
Message format.
Can be inline, json or raw.
122 123 124 |
# File 'ecs/splunk_log_driver_props.rb', line 122 def format @format end |
#gzip ⇒ Boolean? (readonly)
Default: - false
Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance.
127 128 129 |
# File 'ecs/splunk_log_driver_props.rb', line 127 def gzip @gzip end |
#gzip_level ⇒ Numeric? (readonly)
Default: - -1 (Default Compression)
Set compression level for gzip.
Valid values are -1 (default), 0 (no compression), 1 (best speed) ... 9 (best compression).
135 136 137 |
# File 'ecs/splunk_log_driver_props.rb', line 135 def gzip_level @gzip_level end |
#index ⇒ String? (readonly)
Default: - index not set.
Event index.
140 141 142 |
# File 'ecs/splunk_log_driver_props.rb', line 140 def index @index end |
#insecure_skip_verify ⇒ String? (readonly)
Default: - insecureSkipVerify not set.
Ignore server certificate validation.
145 146 147 |
# File 'ecs/splunk_log_driver_props.rb', line 145 def insecure_skip_verify @insecure_skip_verify end |
#labels ⇒ Array<String>? (readonly)
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.
86 87 88 |
# File 'ecs/splunk_log_driver_props.rb', line 86 def labels @labels end |
#secret_token ⇒ AWSCDK::ECS::Secret (readonly)
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.
101 102 103 |
# File 'ecs/splunk_log_driver_props.rb', line 101 def secret_token @secret_token end |
#source ⇒ String? (readonly)
Default: - source not set.
Event source.
150 151 152 |
# File 'ecs/splunk_log_driver_props.rb', line 150 def source @source end |
#source_type ⇒ String? (readonly)
Default: - sourceType not set.
Event source type.
155 156 157 |
# File 'ecs/splunk_log_driver_props.rb', line 155 def source_type @source_type end |
#tag ⇒ String? (readonly)
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.
94 95 96 |
# File 'ecs/splunk_log_driver_props.rb', line 94 def tag @tag end |
#url ⇒ String (readonly)
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.
105 106 107 |
# File 'ecs/splunk_log_driver_props.rb', line 105 def url @url end |
#verify_connection ⇒ Boolean? (readonly)
Default: - true
Verify on start, that docker can connect to Splunk server.
160 161 162 |
# File 'ecs/splunk_log_driver_props.rb', line 160 def verify_connection @verify_connection end |
Class Method Details
.jsii_properties ⇒ Object
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'ecs/splunk_log_driver_props.rb', line 162 def self.jsii_properties { :env => "env", :env_regex => "envRegex", :labels => "labels", :tag => "tag", :secret_token => "secretToken", :url => "url", :ca_name => "caName", :ca_path => "caPath", :format => "format", :gzip => "gzip", :gzip_level => "gzipLevel", :index => "index", :insecure_skip_verify => "insecureSkipVerify", :source => "source", :source_type => "sourceType", :verify_connection => "verifyConnection", } end |
Instance Method Details
#to_jsii ⇒ Object
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'ecs/splunk_log_driver_props.rb', line 183 def to_jsii result = {} result.merge!(super) result.merge!({ "env" => @env, "envRegex" => @env_regex, "labels" => @labels, "tag" => @tag, "secretToken" => @secret_token, "url" => @url, "caName" => @ca_name, "caPath" => @ca_path, "format" => @format, "gzip" => @gzip, "gzipLevel" => @gzip_level, "index" => @index, "insecureSkipVerify" => @insecure_skip_verify, "source" => @source, "sourceType" => @source_type, "verifyConnection" => @verify_connection, }) result.compact end |