<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to configure scripted inputs and check if they are running? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189989#M37841</link>
    <description>&lt;P&gt;your script stanza should be inside &lt;CODE&gt;inputs.conf&lt;/CODE&gt; not &lt;CODE&gt;app.conf&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Aug 2014 14:12:20 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-08-21T14:12:20Z</dc:date>
    <item>
      <title>How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189988#M37840</link>
      <description>&lt;P&gt;I have followed some documentation on adding inputs to from scripts, and have the following:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;A batch script, which calls my powershell script (running the batch scripts executes the powershell script properly)&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;.path file located in &lt;CODE&gt;myapp\bin&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe "D:\Program Files\etc\apps\myapp\bin\mypsscript.ps1"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;app.conf file located in myapp\default with stanza&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://D:\Program Files\etc\apps\myapp\bin\mypathfile.path]
interval = 50
source = mypsscript.ps1
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 13:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189988#M37840</guid>
      <dc:creator>slashnburn</dc:creator>
      <dc:date>2014-08-21T13:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189989#M37841</link>
      <description>&lt;P&gt;your script stanza should be inside &lt;CODE&gt;inputs.conf&lt;/CODE&gt; not &lt;CODE&gt;app.conf&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 14:12:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189989#M37841</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-08-21T14:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189990#M37842</link>
      <description>&lt;P&gt;how do I then get the script to run?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 14:20:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189990#M37842</guid>
      <dc:creator>slashnburn</dc:creator>
      <dc:date>2014-08-21T14:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189991#M37843</link>
      <description>&lt;P&gt;Actually, after looking, I had this stanza in input.conf:&lt;/P&gt;

&lt;P&gt;[script://.\bin\mypathfile.path]&lt;BR /&gt;
interval = 50&lt;BR /&gt;
source = mypsscript.ps&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 14:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189991#M37843</guid>
      <dc:creator>slashnburn</dc:creator>
      <dc:date>2014-08-21T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189992#M37844</link>
      <description>&lt;P&gt;I think your script is disabled. Try explicitly setting disabled = 0&lt;/P&gt;

&lt;P&gt;[script://.binmypathfile.path]&lt;BR /&gt;
interval = 50&lt;BR /&gt;
source = mypsscript.ps&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;disabled = false also should work.&lt;/P&gt;

&lt;P&gt;You need to restart after making this change&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 18:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189992#M37844</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-21T18:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure scripted inputs and check if they are running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189993#M37845</link>
      <description>&lt;P&gt;I fixed the problem.  To summarize:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I removed the batch script, because
the .path file essentially does the
same thing. &lt;/LI&gt;
&lt;LI&gt;I placed the call to the
.path file in the input.config file
with the parameters I had listed. &lt;/LI&gt;
&lt;LI&gt;I    placed the .ps1 file and the
.path    file in the
&lt;CODE&gt;$SPLUNK_HOME\bin\scripts&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 18:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-scripted-inputs-and-check-if-they-are-running/m-p/189993#M37845</guid>
      <dc:creator>slashnburn</dc:creator>
      <dc:date>2014-08-21T18:27:07Z</dc:date>
    </item>
  </channel>
</rss>

