Getting Data In

Remove path from scripted input

beaunewcomb
Communicator

I setup a scripted input pointing to a .bat file which runs a curl request. But instead of only ingesting the output of the command that's run, splunk gets everything from the shell, including the current directory. How do I only get the output of the command, ignoring the actual command?

C:\WINDOWS\system32>C:\curl\curl.exe http://search.twitter.com/search.json?q=blah
----output of command is here----
Tags (1)
1 Solution

dwaddle
SplunkTrust
SplunkTrust

Splunk is ingesting exactly what your batch file writes to its standard output. So, your question really is one of the form "how do I make my batch file not echo every command?" There's a really old solution for that. Put a line with

@echo off

at the top of your batch file .. should make all the difference.

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

Splunk is ingesting exactly what your batch file writes to its standard output. So, your question really is one of the form "how do I make my batch file not echo every command?" There's a really old solution for that. Put a line with

@echo off

at the top of your batch file .. should make all the difference.

beaunewcomb
Communicator

Duh. 🙂

Thanks!!!

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...