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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...