Hi
I am trying to use Splunk for both collecting the docker logs as well as the metrics for the docker containers. Now, I have been able to forward the logs from docker stdout to Splunk using the logging driver, but I am having trouble understand how can I forward the docker metrics (that is, container CPU usage, container memory usage, etc...).
Thanks!
Hello jainbhavuk360,
Couple of possibilities,
1. run splunk universal forwarder in the docker container, and setup a scripted input (will need to be a shell script that essentially runs docker stats
command or whatever other) with some frequency. Make sure splunk universal forwarder is setup to forward the logs to splunk instance.
2. run your own script in the container that periodically runs docker stats
or whatever other comments and posts the output of it to an HTTP Event collector on Splunk via HTTP(S).
Happy splunking.
-Dhananjay