<?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 my indexation doesn't work ? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516253#M34546</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;here are the rights applied to the script :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mah_0-1598443550601.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10523iC63944CEF3F8E4A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mah_0-1598443550601.png" alt="mah_0-1598443550601.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the fact that it works when I run the script in the folder&amp;nbsp; with command : python my_script.py&lt;/P&gt;&lt;P&gt;The json files are returned in splunk successfully parsed.&lt;/P&gt;&lt;P&gt;So I really don't understand.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2020 12:08:22 GMT</pubDate>
    <dc:creator>mah</dc:creator>
    <dc:date>2020-08-26T12:08:22Z</dc:date>
    <item>
      <title>Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516198#M34540</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't see where I am wrong in my configuration file :&lt;/P&gt;&lt;P&gt;inputs.conf :&amp;nbsp;/opt/splunk/etc/apps/my_app_poller/local&lt;/P&gt;&lt;P&gt;[script://./bin/my_python_script.py]&lt;BR /&gt;interval = 27 7 * * *&lt;BR /&gt;index = my_index&lt;BR /&gt;sourcetype = script:python&lt;BR /&gt;source = script://./bin/my_python_script.py&lt;BR /&gt;disabled = 0&lt;/P&gt;&lt;P&gt;[batch:///opt/splunk/etc/apps/my_app_poller/bin/*my_python_script.json]&lt;BR /&gt;move_policy = sinkhole&lt;BR /&gt;index = my_index&lt;BR /&gt;sourcetype = script:python&lt;BR /&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;BR /&gt;disabled = 0&lt;/P&gt;&lt;P&gt;props.conf : /opt/splunk/etc/apps/my_app_2/default&lt;BR /&gt;[script:python]&lt;BR /&gt;INDEXED_EXTRACTIONS = json&lt;BR /&gt;DATETIME_CONFIG = CURRENT&lt;BR /&gt;TRUNCATE = 999999&lt;BR /&gt;JSON_TRIM_BRACES_IN_ARRAY_NAMES = true&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 07:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516198#M34540</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-08-26T07:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516202#M34541</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the first dubt I usually have using scripts is the grants on the&amp;nbsp;&lt;SPAN&gt;my_python_script.py file, did you already checked them?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you could try to run the script outside Splunk.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then (but it's a different thing), why did you used batch?&lt;/P&gt;&lt;P&gt;batch is used for large archives of historic data. If you want to continuously monitor a directory or index small archives, use "monitor".&lt;/P&gt;&lt;P&gt;If these files are the output of the script of the previous stanza, you don't need this stanza, if instead they are different files, use monitor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, from your script stanza I see that you want to run this script once a day (at 07:27:00), is it correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;An additional test: run the script outside splunk as Linux command, verify if it's runned and redirect the output on a text file, then ingest it via web GUI, so you can test the props.conf.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 08:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516202#M34541</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-26T08:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516211#M34542</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I tried to run the script in the file my_app_poller_/bin :&amp;nbsp;the json files went back to splunk with correct parsing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mah_0-1598432128300.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10516i1F70D52D96FD75FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mah_0-1598432128300.png" alt="mah_0-1598432128300.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I use this batch parameter because uselly I apply this input configuration with .sh script ans it works well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference I changed is to put a .py script instead of .sh, and it does not work anymore.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last, I search in _internal and I find out this error :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ExecProcessor&lt;/SPAN&gt; &lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Ignoring:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class="t"&gt;/opt/splunk/etc/my_app_poller/bin/my_script.py"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;FrameworkUtils&lt;/SPAN&gt; &lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Incorrect&lt;/SPAN&gt; &lt;SPAN class="t"&gt;path&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;script:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;/opt/splunk/etc/my_app_poller/bin/my_script.py.&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Script&lt;/SPAN&gt; &lt;SPAN class="t"&gt;must&lt;/SPAN&gt; &lt;SPAN class="t"&gt;be&lt;/SPAN&gt; &lt;SPAN class="t"&gt;located&lt;/SPAN&gt; &lt;SPAN class="t"&gt;inside&lt;/SPAN&gt; &lt;SPAN class="t"&gt;$SPLUNK_HOME/bin/scripts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you tell me if I have to put my script in a path like : /opt/splunk/etc/my_app_poller/bin/scripts ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 09:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516211#M34542</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-08-26T09:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516212#M34543</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;scripts must be located in the main bin folder (as indicated in the error message) or in the bin folder of an app, in your path you forgot the apps folder:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/opt/splunk/etc/&lt;STRONG&gt;apps&lt;/STRONG&gt;/my_app_poller/bin/my_script.py&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 09:18:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516212#M34543</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-26T09:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516214#M34544</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;sorry I did a bad copy paste, the script is &lt;STRONG&gt;already&lt;/STRONG&gt; located in&amp;nbsp;&lt;SPAN&gt;/opt/splunk/etc/&lt;/SPAN&gt;&lt;STRONG&gt;apps&lt;/STRONG&gt;&lt;SPAN&gt;/my_app_poller/bin/my_script.py&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After a new test I get the error below :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="t"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ExecProcessor&lt;/SPAN&gt; &lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;message&lt;/SPAN&gt; &lt;SPAN class="t"&gt;from&lt;/SPAN&gt; "&lt;SPAN class="t"&gt;python&lt;/SPAN&gt; &lt;SPAN class="t"&gt;/opt/splunk/etc/apps/my_app_poller/bin/my_script.py&lt;/SPAN&gt;" &lt;SPAN class="t"&gt;IOError:&lt;/SPAN&gt; [&lt;SPAN class="t"&gt;Errno&lt;/SPAN&gt; &lt;SPAN class="t"&gt;13&lt;/SPAN&gt;] &lt;SPAN class="t"&gt;Permission&lt;/SPAN&gt; &lt;SPAN class="t"&gt;denied:&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ExecProcessor&lt;/SPAN&gt; &lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;message&lt;/SPAN&gt; &lt;SPAN class="t"&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class="t"&gt;python&lt;/SPAN&gt; &lt;SPAN class="t"&gt;/opt/splunk/etc/apps/my_app_poller/bin/my_script.py&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Traceback&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN class="t"&gt;most&lt;/SPAN&gt; &lt;SPAN class="t"&gt;recent&lt;/SPAN&gt; &lt;SPAN class="t"&gt;call&lt;/SPAN&gt; &lt;SPAN class="t"&gt;last&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="t"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ExecProcessor&lt;/SPAN&gt; &lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;message&lt;/SPAN&gt; &lt;SPAN class="t"&gt;from&lt;/SPAN&gt; "&lt;SPAN class="t"&gt;python&lt;/SPAN&gt; &lt;SPAN class="t"&gt;/opt/splunk/etc/apps/my_app_poller/bin/my_script.py&lt;/SPAN&gt;" &lt;SPAN class="t"&gt;File&lt;/SPAN&gt; "&lt;SPAN class="t"&gt;/opt/splunk/etc/apps/my_app_poller/bin/my_script.py&lt;/SPAN&gt;", &lt;SPAN class="t"&gt;line&lt;/SPAN&gt; &lt;SPAN class="t"&gt;13&lt;/SPAN&gt;, &lt;SPAN class="t"&gt;in&lt;/SPAN&gt; &amp;lt;&lt;SPAN class="t"&gt;module&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 09:35:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516214#M34544</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-08-26T09:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516226#M34545</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;"Permission&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;denied", it seems to be a grant problem, what are the grants of the python script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;check the grants with the user that you use to run Splunk.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 10:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516226#M34545</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-26T10:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516253#M34546</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;here are the rights applied to the script :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mah_0-1598443550601.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10523iC63944CEF3F8E4A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mah_0-1598443550601.png" alt="mah_0-1598443550601.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the fact that it works when I run the script in the folder&amp;nbsp; with command : python my_script.py&lt;/P&gt;&lt;P&gt;The json files are returned in splunk successfully parsed.&lt;/P&gt;&lt;P&gt;So I really don't understand.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516253#M34546</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-08-26T12:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why my indexation doesn't work ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516279#M34547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;and about the grants of the objects read by script?&lt;/P&gt;&lt;P&gt;Anyway, have you seen this documentation:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-my-indexation-doesn-t-work/m-p/516279#M34547</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-26T13:53:24Z</dc:date>
    </item>
  </channel>
</rss>

