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!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...