-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
unable to map inputs.conf to latest forwarder container #107
Comments
What are you placing in inputs.conf that you need to volume map it? To your question, the ansible user has sudo rights, you can volume mount this in just as you're doing, and then run a ansible-pre-task to chown the directory. You could also use the {configs} vars option that's been added to have this file get generated every time with your settings applied instead of volume mounting. |
My inputs.conf only has a bunch of log paths to monitor.
I forgot to add the log volume to the docker command earlier. The correct command is
I'm new to splunk so what other methods can be used to add those log paths to forwarder? Or what's the right way to tell forwarder container to monitor some log paths on the host ? |
Just an update/FYI, I'm pretty sure this issue + #115 are caused by the same thing. There seems to be a missing line in the provisioning of the universalforwarder to update permissions for $SPLUNK_HOME. |
Thank you for confirming there's a bug. Will there be a new release out soon with a fix? |
@arungn-tii we typically release with Splunk maintenance release cadences, but as of now, we are planning to push a new image (7.2.4) with the fix sometime next week. |
Going to close this - the code is currently in develop right now if you want to build your own images for now. But it will be released as part of 7.2.4 (expected to come out next week). I also added a test case that bind-mounts full app directories to the running container and validates that apps get registered in Splunk with this PR: #120 |
@nwang92 Hey. I see that a new version is out. But I am still not able to get it working. Could you tell me what I'm doing wrong? Should I use ansible or splunk cli to add inputs instead?
|
@arungn-tii can you run a Additionally, can you confirm you're using overlay2 as the storage-driver? I would see the notes + comments about overlay2 here: #105 |
I was running the container on a debian box which was using "auf" storage driver. On redhat systems, it seems to work fine with "devicemapper". I think we can close now. Thanks for the help. |
I used to be able to do this with splunkforwarder-7.2.1-be11b2c46e23-Linux (splunk/universalforwarder@sha256:cf9b53ee182de36671de774ffecd63f3cbf3ed7cb353a50804f14151e25d12be)
docker run -it -p 9777:9777 -v /etc/admin/inputs.conf:/opt/splunkforwarder/etc/system/local/inputs.conf -e 'SPLUNK_START_ARGS=--accept-license' -e 'SPLUNK_INDEXER_URL=indexers.xxxx.com' -e 'SPLUNK_PASSWORD=xyz' splunk/universalforwarder:latest
Now with the latest, splunkforwarder-7.2.3-06d57c595b80-Linux (splunk/universalforwarder@sha256:9c99896c7fbfbb6e94689e33ca2cb621e3a49512b2322d7273be7c90774f8a42) it's throwing a permission error ansible is not able to unpack splunk files under /opt/splunkforwarder/etc. I noticed that the default user has changed from "splunk" to "ansible". What is the right way to map overrides in the container now ?
The text was updated successfully, but these errors were encountered: