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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...