Newbie here. How can I output the result of a bash script back into Splunk? The script periodically sends netstat commands.
The easiest ways I can think that would solve this for you (If I understand the question correctly), would be to either monitor stdout of the netstat script, or write the results to a file and monitor that file.
Here are some suggested steps:
-Create a new app. Follow the instructions for Scripted Inputs. In general:
Simple :
Wire up your script using the Command Modular Input
https://splunkbase.splunk.com/app/1553/
Of course you can also refactor your script into a Splunk Scripted Input or Modular Input and deploy it in it's own App , but if you simply want to execute your script as is and capture the STDOUT in Splunk , then the Command Modular Input will work. And has some advanced stuff like plugging in your own preprocessing if you want.
The easiest ways I can think that would solve this for you (If I understand the question correctly), would be to either monitor stdout of the netstat script, or write the results to a file and monitor that file.
Here are some suggested steps:
-Create a new app. Follow the instructions for Scripted Inputs. In general: