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!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...