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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...