Splunk Search

run script on remote machine

arun_kant_sharm
Path Finder

I am looking at running script which is stored on my local machine and I want to run that script on a remote machine. In that remote machine user not allow me to make a cron job , so I want to run a script from my machine to the remote machine.

Tags (1)
0 Karma

gouravdashtcs
Loves-to-Learn

Hello Arun,

I assume the local machine which you are referring to is having Splunk Enterprise installed in it and the remote machine which you are referring to is having Splunk Universal forwarder installed in it. And the connection of Splunk UF is properly made to local machine in which Splunk ES is installed.
In this case you can keep the script in $SPLUNK_HOME/ets/apps/,app_name/bin/

Then go to Settings --> Data Inputs --> Scripts (Add New), then follow the steps which will be prompted/asked to you.
In this way you will be able to fetch the data using scripted input from any machine in which UF is installed.

Hope this helps. Please let me know for any further clarifications.

0 Karma

Javoraqa
Engager

 

@gouravdashtcs 

Hi I am doing the same i have put my .sh file in local as well as in remote server and created a specific index for it, still can't see any events.
Can you please fill the gap where am i missing ?
Your help is appreciated !!!!
0 Karma
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...