Getting Data In

Scripted input not showing up in search results

oreoshake
Communicator

env[home] = linux, centos, splunk 4.0.11, everything on one test box

cat /opt/splunk/etc/apps/unix/bin/uname.sh

#!/bin/sh 
uname -a

cat etc/apps/unix/local/inputs.conf

[script:///opt/splunk/etc/apps/unix/bin/uname.sh]
disabled = false
index = os
interval = 30
sourcetype = uname

I've set the interval pretty low just to get the script to execute but it isn't working. File permissions are 755 on that file and other scripted inputs work fine. Any ideas? Any logs to check?

Also, if I search _internal for per_sourcetype_thruput, entries for this sourcetype are returning non-zero values so Splunk is doing something with it...

There are no errors related the file not existing or not being under $SPLUNK_HOME...

0 Karma
1 Solution

Lowell
Super Champion

Hmmm, what timerange are you running your search for?

When I run uname -a I get the following output:

Linux linuxbox2 2.6.24-27-server #1 SMP Mon Feb 22 19:42:25 UTC 2010 i686 GNU/Linux

Make sure you are preventing that kernel build time from being picked up as your event's timestamp. I believe you can do that with the following props.conf entry:

[uname]
DATETIME_CONFIG = CURRENT

View solution in original post

Lowell
Super Champion

Hmmm, what timerange are you running your search for?

When I run uname -a I get the following output:

Linux linuxbox2 2.6.24-27-server #1 SMP Mon Feb 22 19:42:25 UTC 2010 i686 GNU/Linux

Make sure you are preventing that kernel build time from being picked up as your event's timestamp. I believe you can do that with the following props.conf entry:

[uname]
DATETIME_CONFIG = CURRENT

oreoshake
Communicator

Thanks, facepalm

0 Karma

oreoshake
Communicator

I was including index=os, the command runs fine, and no errors were returned in that search. Hmm.

0 Karma

Lowell
Super Champion

Any errors reported with this search? index="_internal" ExecProcessor sourcetype="splunkd" ERROR

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

If you just log in as the Splunk user and run the script using $SPLUNK_HOME/bin/splunk cmd /opt/splunk/etc/apps/unix/bin/uname.sh, does it produce the output you expect? Is the os index specifically being searched?

0 Karma

Genti
Splunk Employee
Splunk Employee

how do you know it is not working? - ie. what is your search query that gives you this impression?
basically, make sure that index=os is part of your search, otherwise you might not see it (if youre just doing a search on sourcetype=uname)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...