I have followed some documentation on adding inputs to from scripts, and have the following:
.path file located in myapp\bin
$SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe "D:\Program Files\etc\apps\myapp\bin\mypsscript.ps1"
app.conf file located in myapp\default with stanza
[script://D:\Program Files\etc\apps\myapp\bin\mypathfile.path]
interval = 50
source = mypsscript.ps1
However, I am not sure how to know whether or not this script is actually running. I don't think it is, because if I search for that source, it doesn't have any results. Is this configured properly? How do I ensure the script kicks off? Do I need to do anything else?
I fixed the problem. To summarize:
$SPLUNK_HOME\bin\scripts
.Once I realized that the .path file is essentially a one line batch script, I was able to make the call to powershell (must use an explicit path) and then issue the command. Once I knew everything was in the right place, I figured out that I had to include "-file" before making the call to the .ps1 file.
I fixed the problem. To summarize:
$SPLUNK_HOME\bin\scripts
.Once I realized that the .path file is essentially a one line batch script, I was able to make the call to powershell (must use an explicit path) and then issue the command. Once I knew everything was in the right place, I figured out that I had to include "-file" before making the call to the .ps1 file.
I think your script is disabled. Try explicitly setting disabled = 0
[script://.binmypathfile.path]
interval = 50
source = mypsscript.ps
disabled = 0
disabled = false also should work.
You need to restart after making this change
Actually, after looking, I had this stanza in input.conf:
[script://.\bin\mypathfile.path]
interval = 50
source = mypsscript.ps
how do I then get the script to run?
your script stanza should be inside inputs.conf
not app.conf