@@ -139,15 +139,18 @@ $ docker run --rm -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 \
139
139
140
140
### Custom Configuration
141
141
142
- When changes to the default configuration file is needed, a custom
143
- configuration file can be specified and used instead. Use the ` SPLUNK_CONFIG `
144
- environment variable or the ` --config ` command line argument to provide the
145
- path to a file containing custom configuration YAML. Also, environment
146
- variable ` SPLUNK_CONFIG_YAML ` is available for specifying custom
147
- configuration YAML directly. This is useful in environments where access
148
- to the underlying filesystem is not readily available. For example, in
149
- AWS Fargate it is more convenient to pull configuration YAML from a
150
- parameter in the AWS Systems Manager Parameter Store.
142
+ When changes to the default configuration YAML file are needed, create a
143
+ custom configuration file. Use environment variable ` SPLUNK_CONFIG ` or
144
+ command line argument ` --config ` to provide the path to this file.
145
+
146
+ Also, you can use environment variable ` SPLUNK_CONFIG_YAML ` to specify
147
+ your costum configuration YAML at the command line. This is useful in
148
+ environments where access to the underlying file system is not readily
149
+ available. For example, in AWS Fargate, access to the filesystem is
150
+ not readily available. There, you can store your custom configuration
151
+ YAML in a parameter in AWS Systems Manager Parameter Store, then in
152
+ your container definition specify ` SPLUNK_CONFIG_YAML ` to get the
153
+ configuration from the parameter.
151
154
152
155
> Command line arguments take precedence over environment variables. This
153
156
> applies to ` --config ` and ` --mem-ballast-size-mib ` . ` SPLUNK_CONFIG `
@@ -167,15 +170,15 @@ $ docker run --rm -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 \
167
170
> Use of a SemVer tag over ` latest ` is highly recommended.
168
171
169
172
In the case of Docker, a volume mount may be required to load the custom
170
- configuration file as shown above.
173
+ configuration file, as shown above.
171
174
172
- If the custom configuration includes a ` memory_limiter ` processor then the
175
+ If the custom configuration includes a ` memory_limiter ` processor, then the
173
176
` ballast_size_mib ` parameter should be the same as the
174
177
` SPLUNK_BALLAST_SIZE_MIB ` environment variable. See
175
178
[ gateway_config.yaml] ( ../../cmd/otelcol/config/collector/gateway_config.yaml )
176
179
as an example.
177
180
178
- ` SPLUNK_CONFIG_YAML ` example :
181
+ The following example shows the ` SPLUNK_CONFIG_YAML ` environment variable :
179
182
``` bash
180
183
$ CONFIG_YAML=$( cat << -END
181
184
receivers:
@@ -198,3 +201,7 @@ $ docker run --rm \
198
201
-e SPLUNK_CONFIG_YAML=${CONFIG_YAML} \
199
202
--name otelcol quay.io/signalfx/splunk-otel-collector:latest
200
203
```
204
+ The YAML in the first command configures the Collector to collect and
205
+ log cpu metrics. The YAML is assigned to parameter ` CONFIG_YAML ` for
206
+ convenience. ` CONFIG_YAML ` is expanded and assigned to
207
+ ` SPLUNK_CONFIG_YAML ` in the subsequent ` docker run ` command.
0 commit comments