Getting Data In

How to import text file results of a powershell script when app is opened?

slashnburn
Path Finder

I have a powershell script that outputs a text file. What I want to do is have that powershell script run once a day and splunk to ingest the text file that has been generated by that powershell script whenever my app is opened. What is the most efficient way to do this?

I have toyed with a couple different ideas:

  • Put the powershell script on the forwarder, configuring it to run once a day, and configure splunk to monitor the directory where that file is output
  • Configure splunk to monitor a batch file that runs the powershell script (I don't think this will actually grab the text file that is generated)
0 Karma
1 Solution

slashnburn
Path Finder

As on my other post relating to this issue, there is a process for using scripts. The best way I found was to place them in the splunk bin, rather than the app bin. I decided to just take the stdout from the script, rather than use the text file. With that said, if you still wanted to use the text file, follow the procedure for running the script that outputs the file, then have splunk monitor the output file.

View solution in original post

0 Karma

slashnburn
Path Finder

As on my other post relating to this issue, there is a process for using scripts. The best way I found was to place them in the splunk bin, rather than the app bin. I decided to just take the stdout from the script, rather than use the text file. With that said, if you still wanted to use the text file, follow the procedure for running the script that outputs the file, then have splunk monitor the output file.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...