Splunk Enterprise

How can I forward the container metrics to Splunk?

jainbhavuk630
New Member

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!

Tags (2)
0 Karma

dkoshe_splunk
Splunk Employee
Splunk Employee

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

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...