Splunk Enterprise

Universal forwarder for Linux is not forwarding some types of sourcetypes

Splunk_Ryan
Explorer

On my Linux server the universal forwarder and Splunk_TA_nix are installed, at least df and cpu are enabled in inputs.conf.

vi /opt/splunkforwarder/etc/apps/Splunk_TA_nix/local/inputs.conf

[script://./bin/df.sh]
interval = 300
sourcetype = df
source = df
index = os
disabled = 0

[script://./bin/cpu.sh]
sourcetype = cpu
source = cpu
#interval = 30
interval = 300
index = os
disabled = 0

When I search for this Linux server on Splunk, I get df logs. But cpu logs are missing

Top 10 Values Count %
df 44 1.224%

Could anyone advise? much appreciated. 

Labels (1)
Tags (1)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust
Have you try to run this cpu.sh as user splunk on this server? There could be an issue with permission or other stuff.

View solution in original post

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Have you try to run this cpu.sh as user splunk on this server? There could be an issue with permission or other stuff.
0 Karma

Splunk_Ryan
Explorer

Thanks 

  The cpu.sh was not running on the Linux server either as splunk or as root. It turned out that the cpu.sh has a dependency on sysstat package which I had not installed.

  It is running now after sysstat was installed.

Tags (1)
0 Karma

gordo32
Communicator

I ran into this problem and while the dependency for cpu.sh is to have sysstat installed, I also found that df.sh wouldn't parse correctly on Ubuntu until the gawk package was installed (mawk package was already present).

Gord T.

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...