Getting Data In

Scripted Inputs not functioning

KyleH
Loves-to-Learn

I've configured three bash scripts, all of which do essentially the same exact thing.

1. Run a command and send the output to a file

2. Parse this file via a Python script (Which then prints the parsed file to the console, sending it to Splunk)

3. Delete the file

Two of the three scripts work exactly as intended, with no issues whatsoever. The third, however, sends no information to Splunk at all. I can run the python portion independently, the bash script w/ the python script, and both can, additionally, be done through'/opt/splunkforwarder/bin/splunk cmd', and, in all instances, it provides the desired output to the cmd line without it being ingested.

If I alter the script and purposefully put in errors they will appear in the _internal index. Aside from that, nothing related to issues with the script appears there.

All of the scripts are set up in the exact same manner in the inputs.conf file, with them all using the same source-type and index. 

Any guidance on how to proceed with the troubleshooting would be greatly appreciated!

 

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @KyleH ,

at first you don't need to write the script results in a file, but you can directly send script output to Splunk (as you can see at https://docs.splunk.com/Documentation/Splunk/8.0.4/AdvancedDev/ScriptedInputsIntro ).

Then the only hint I can give you is to test the script by itself:

  • does it give results or not?
  • has the user you're using for Splunk the grants to execute that script and access the files?

Ciao.

Giuseppe

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!

Accelerate Splunk App Development with AI

  Learn how to automate the repetitive parts of your build cycle.   Watch On-Demand   Replay the Accelerate ...

Splunk Agent Observability: Measuring AI Value with Splunk Tokenomics on AWS

The AI landscape is moving faster than ever, and our latest 2026 State of Observability report provides the ...

Enterprise Security Watch Party: What’s New in 8.8 - Recap

Splunk Community HQ hosted a Splunk Enterprise Security Watch Party: What’s New In ES 8.8 last Thursday. I had ...