Initial Setup
Set Up Splunk Enterprise Indexes and HEC Endpoints¶
-
Create the two required indexes: an index for traces
apm_traces(see Create events indexes), and an index for metricsapm_metrics(see Create metrics indexes). -
Setup 2 Splunk HEC tokens, one for
apm_tracesand one forapm_metrics. See Configure HTTP Event Collector on Splunk Enterprise or on Splunk Cloud. Steps summarized below. -
Login to Splunk and go to
Settings>Data inputs(under "Data") >HTTP Event Collector. - At the top-right, click
Global Settingsand set "All Tokens" toEnabled, and uncheck "Enable SSL" (if not using HTTPS). Ensure the "HTTP Port Number" is set to8088. ClickSave. - At the top-right, create
New Token, and enter a Name. ClickNext. Next to "Select Allowed Indexes", selectapm_traces. ClickReview, and thenSubmit. You should now see a "Token Value", which we'll need in the next section. - To ingest metrics, create another HEC token and assign it to the
apm_metricsindex. Make sure to copy the "Token Value" here as well.
Install the OTel Collector Gateway¶
- On your Linux VM, install the OTel Collector. If the VM does not have internet access, download these files separately and manually copy them to the VM. Note: If you wish to run the OTel Collector in agent mode, simply replace
gatewaywithagentin the commands below.sudo apt install wget wget https://github.com/signalfx/splunk-otel-collector/releases/download/v0.57.0/otelcol_linux_amd64 chmod a+x otelcol_linux_amd64 wget https://raw.githubusercontent.com/signalfx/splunk-otel-collector/main/cmd/otelcol/config/collector/gateway_config.yaml sudo mkdir /etc/otel sudo mkdir /etc/otel/collector sudo mv gateway_config.yaml /etc/otel/collector/
Last update:
August 12, 2022