<?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: Why is cmd script not running? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593715#M103867</link>
    <description>&lt;P&gt;after finding out that i have to change execprocessor logging mode to DEBUG, it shows, that the problem was with the path. after struggling around with that, i ended up with this:&lt;/P&gt;&lt;P&gt;inputs.conf&lt;BR /&gt;[script://$SPLUNK_HOME/etc/apps/PBNL_log4jscanWIN/bin/log4jscan.cmd]&lt;BR /&gt;disabled = False&lt;BR /&gt;interval = 15 0 1 * *&lt;BR /&gt;[monitor://C:\Program Files\SplunkUniversalForwarder\var\log\log4jscan.log]&lt;BR /&gt;disabled = false&lt;BR /&gt;sourcetype = log4jscan&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;log4jscan.cmd&lt;BR /&gt;&lt;/SPAN&gt;"%SPLUNK_HOME%\etc\apps\PBNL_log4jscanWIN\static\log4j2-scan.exe" --all-drives --scan-log4j1 --scan-logback --csv-log-path "%SPLUNK_HOME%\var\log\log4jscan.log"&lt;/P&gt;&lt;P&gt;as you can see, it's a windows/linux mix of notation styles, where the monitor clause does'nt resolve variables.&lt;BR /&gt;from other posts i assuemed, the "base path" for an app is in my case %SPLUNK_HOME%\etc\apps\PBNL_log4jscanWIN\. but that seems to be not the case.&lt;/P&gt;&lt;P&gt;anyway, learned some new stuff...&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 06:22:47 GMT</pubDate>
    <dc:creator>pbnl</dc:creator>
    <dc:date>2022-04-14T06:22:47Z</dc:date>
    <item>
      <title>Why is cmd script not running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593570#M103857</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;i try to run a cmd script on a UF.&amp;nbsp; it's located in %SPLUNK_HOME%\etc\apps\log4jscan\bin\log4jscan.cmd and the content is&lt;BR /&gt;&lt;STRONG&gt;..\static\log4j2-scan.exe --all-drives --scan-log4j1 --scan-logback --csv-log-path "%SPLUNK_HOME%\var\log\log4jscan"&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;the inputs.conf is in %SPLUNK_HOME%\etc\apps\log4jscan\default and looks like this: (interval will be changed to run once per month)&lt;BR /&gt;&lt;STRONG&gt;[script://..\bin\log4jscan.cmd]&lt;BR /&gt;disabled = False&lt;BR /&gt;interval = 600&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;i added&lt;STRONG&gt;&amp;gt; debug.txt 2&amp;gt;&amp;amp;1 &lt;/STRONG&gt;to the script, but no file is created.&lt;BR /&gt;any ideas?&lt;/P&gt;
&lt;P&gt;thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 15:13:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593570#M103857</guid>
      <dc:creator>pbnl</dc:creator>
      <dc:date>2022-04-13T15:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is cmd script not running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593620#M103861</link>
      <description>&lt;P&gt;Does the log4j2-scan command work if run manually?&amp;nbsp; Does Splunk have permission to run the command?&amp;nbsp; Have you checked the UF's logs for messages that might explain why the script doesn't run?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 15:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593620#M103861</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-04-13T15:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why is cmd script not running?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593715#M103867</link>
      <description>&lt;P&gt;after finding out that i have to change execprocessor logging mode to DEBUG, it shows, that the problem was with the path. after struggling around with that, i ended up with this:&lt;/P&gt;&lt;P&gt;inputs.conf&lt;BR /&gt;[script://$SPLUNK_HOME/etc/apps/PBNL_log4jscanWIN/bin/log4jscan.cmd]&lt;BR /&gt;disabled = False&lt;BR /&gt;interval = 15 0 1 * *&lt;BR /&gt;[monitor://C:\Program Files\SplunkUniversalForwarder\var\log\log4jscan.log]&lt;BR /&gt;disabled = false&lt;BR /&gt;sourcetype = log4jscan&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;log4jscan.cmd&lt;BR /&gt;&lt;/SPAN&gt;"%SPLUNK_HOME%\etc\apps\PBNL_log4jscanWIN\static\log4j2-scan.exe" --all-drives --scan-log4j1 --scan-logback --csv-log-path "%SPLUNK_HOME%\var\log\log4jscan.log"&lt;/P&gt;&lt;P&gt;as you can see, it's a windows/linux mix of notation styles, where the monitor clause does'nt resolve variables.&lt;BR /&gt;from other posts i assuemed, the "base path" for an app is in my case %SPLUNK_HOME%\etc\apps\PBNL_log4jscanWIN\. but that seems to be not the case.&lt;/P&gt;&lt;P&gt;anyway, learned some new stuff...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 06:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-cmd-script-not-running/m-p/593715#M103867</guid>
      <dc:creator>pbnl</dc:creator>
      <dc:date>2022-04-14T06:22:47Z</dc:date>
    </item>
  </channel>
</rss>

