Skip to content

Commit

Permalink
Update linux installer doc for custom env vars (open-telemetry#2613)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk authored Feb 24, 2023
1 parent b73200b commit a809186
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions docs/getting-started/linux-installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,24 @@ sudo sh /tmp/splunk-otel-collector.sh --realm SPLUNK_REALM --collector-config /e
-- SPLUNK_ACCESS_TOKEN
```

If the configuration file is modified after installation, the Collector
service needs to be restarted for the changes to take effect:
If the Collector configuration file includes references to custom environment
variables, these variables and values will need to be manually added to the
`/etc/otel/collector/splunk-otel-collector.conf` systemd environment file
after installation in order for the `splunk-otel-collector` systemd service to
expand these variables. For example, if the Collector configuration file
references `${MY_CUSTOM_VAR1}` and `${MY_CUSTOM_VAR2}`, add the following to
`/etc/otel/collector/splunk-otel-collector.conf`:
```
MY_CUSTOM_VAR1=my_custom_value1
MY_CUSTOM_VAR2=my_custom_value2
```
See [EnvironmentFile](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=)
for more details about the systemd environment file.

If the Collector configuration file or
`/etc/otel/collector/splunk-otel-collector.conf` is modified after
installation, the Collector service needs to be restarted for the changes to
take effect:

```sh
sudo systemctl restart splunk-otel-collector
Expand Down

0 comments on commit a809186

Please sign in to comment.