@@ -52,9 +52,9 @@ $ docker logs -f <container_name/container_id>
5252If your container is still running but in a bad state, you can try to debug by putting yourself within the context of that process.
5353
5454
55- To gain interactive shell access to the container's runtime, you can run:
55+ To gain interactive shell access to the container's runtime as the splunk user , you can run:
5656```
57- $ docker exec -it <container_name/container_id> /bin/bash
57+ $ docker exec -it -u splunk <container_name/container_id> /bin/bash
5858```
5959
6060#### Debug variables
@@ -142,17 +142,17 @@ Generating a diag is only an option if:
142142
143143To create this diag, run the following command:
144144```
145- $ docker exec -it <container_name/container_id> ${SPLUNK_HOME}/bin/splunk diag
145+ $ docker exec -it -u splunk <container_name/container_id> " ${SPLUNK_HOME}/bin/splunk diag"
146146```
147147
148148Additionally, if your Docker container/hosts have access to https://www.splunk.com you can now send the file directly to Splunk Support by using the following command:
149149```
150- $ docker exec -it <container_name/container_id> ${SPLUNK_HOME}/bin/splunk diag --upload --case-number=<case_num> --upload-user=<your_splunk_id> --upload-password=<passwd> --upload-description=" Monday diag, as requested"
150+ $ docker exec -it -u splunk <container_name/container_id> " ${SPLUNK_HOME}/bin/splunk diag --upload --case-number=<case_num> --upload-user=<your_splunk_id> --upload-password=<passwd> --upload-description=' Monday diag, as requested' "
151151```
152152
153153However, if you don't have direct access, you can manually copy the diag back to your host via ` docker cp ` :
154154```
155- $ docker cp <container_name/container_id>:/opt/splunk/var/run/diags/ <filename> <location on your local machine>
155+ $ docker cp <container_name/container_id>:/opt/splunk/<filename> <location on your local machine>
156156```
157157
158158## Contact
0 commit comments