All Apps and Add-ons

SplunkUF is not forwarding logs from the Kubernates container

vrathore2016
New Member

I deployed Splunk Forwarder in my kubernetes cluster using this blog.

http://jasonpoon.ca/2017/04/03/kubernetes-logging-with-splunk/

I have 4 files at

/opt/splunk/etc/system/local

inputs.conf

server.conf

limits.conf

outputs.conf

my inputs.conf looks like this.

[default]
host = testtest

[monitor:///usr/local/tomcat/logs]
whitelist=test.log|.log_WHITELIST_|test
index= abc
sourcetype=log4j
[splunktcp://9997]
compressed = false

I am not able to get the log in Splunk UI. when I am deploying it as side car. but If I use same docker image locally but putting dummy logs file. i can see the logs. Then why it is not working with kubernates?

I have checked the splunkd.log as well.

/opt/splunk/var/log/splunk # tail splunkd.log

12-07-2018 10:43:38.793 +0000 INFO  TailingProcessor - Adding watch on path: /opt/splunk/var/spool/splunk.
12-07-2018 10:43:38.793 +0000 INFO  TailingProcessor - Adding watch on path: /usr/local/tomcat/logs.
12-07-2018 10:43:38.795 +0000 INFO  loader - Limiting REST HTTP server to 21845 sockets
12-07-2018 10:43:38.795 +0000 INFO  loader - Limiting REST HTTP server to 657 threads
12-07-2018 10:43:38.798 +0000 INFO  TailReader - Registering metrics callback for: batchreader0
12-07-2018 10:43:38.798 +0000 INFO  TailReader - Starting batchreader0 thread
12-07-2018 10:43:38.798 +0000 INFO  TailReader - Registering metrics callback for: tailreader0
12-07-2018 10:43:38.798 +0000 INFO  TailReader - Starting tailreader0 thread
12-07-2018 10:43:38.850 +0000 INFO  TcpOutputProc - Connected to idx=52.204.198.184:9997 using ACK.
12-07-2018 10:44:08.358 +0000 WARN  AuthenticationManagerSplunk - Seed file is not present. Defaulting to generic username/pass pair.

Any suggestion how to fix this. Stuck here for days. Do I have to open any port under kubernates? although I can ping splunk server from the splunk container.

0 Karma

outcoldman
Communicator

I would highly suggest looking for the alternatives for forwarding Kubernetes logs to Splunk:

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...