Getting Data In

Receiving error after restarting docker-splunk, proceeds to add forward-server

chibhat
New Member

Hi,

I am setting up a Splunk universal forwarder by pulling the universalforwarder docker image from docker-hub and as part of docker run command I also add forward-server like below:

docker run -e SPLUNK_START_ARGS="--accept-license --answer-yes --no-prompt" -e SPLUNK_ADD="monitor  , forward-server $INDEXER:$PORT " splunk/universalforwarder:latest

This works fine first time, however, if I restart the docker container, it tries to add the forward-server again and throws the below exception
"TCPOut - forwarded-server already present" in the splunkd.log

I tried -e "SPLUNK_FORWARD_SERVER" but it didn't add the forward-server at all.
This seems to me like an idempotency issue where the splunk-ansible should not have tried to add again when the forward-server already exist.

Any help or thoughts appreciated.

Thanks,
Chinmaya

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...