<?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: What happens if I call splunk from a scripted input in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599056#M10630</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;not sure if i get you correctly - you want to talk to splunkd using a scripted input without having credentials?generally "splunk btool whatever" would be a bad example, as this does not need splunkd to be running.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input&amp;gt;
  &amp;lt;server_host&amp;gt;art-macbook.local&amp;lt;/server_host&amp;gt;
  &amp;lt;server_uri&amp;gt;https://127.0.0.1:8089&amp;lt;/server_uri&amp;gt;
  &amp;lt;session_key&amp;gt;YmGDj6BtVw^dAb1UzmBjg8MwOegMXHeNtF17THnAoR0Ot2HXQ7BXZ9mPI^hNkdFN^yyTYvrPxjf0WThDmW9sahRomNrj^t^KYG8V30hE9gaPh2gVV7H0LnY&amp;lt;/session_key&amp;gt;
  &amp;lt;checkpoint_dir&amp;gt;/Users/andreas/splunk/var/lib/splunk/modinputs/buba&amp;lt;/checkpoint_dir&amp;gt;
  &amp;lt;configuration&amp;gt;
    &amp;lt;stanza name="buba://single" app="buba-backend"&amp;gt;
      &amp;lt;param name="configfile"&amp;gt;buba.conf&amp;lt;/param&amp;gt;
      &amp;lt;param name="disabled"&amp;gt;0&amp;lt;/param&amp;gt;
      &amp;lt;param name="env"&amp;gt;singlerestore&amp;lt;/param&amp;gt;
      &amp;lt;param name="host"&amp;gt;$decideOnStartup&amp;lt;/param&amp;gt;
      &amp;lt;param name="index"&amp;gt;default&amp;lt;/param&amp;gt;
      &amp;lt;param name="interval"&amp;gt;80000&amp;lt;/param&amp;gt;
    &amp;lt;/stanza&amp;gt;
  &amp;lt;/configuration&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you should avoid scripted input, as they are deprecated. when you install a modular input instead your script is started and hand over a xml payload and you will find a session_key there. You can use this sessionkey to talk to splunkd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 12:28:02 GMT</pubDate>
    <dc:creator>schose</dc:creator>
    <dc:date>2022-05-24T12:28:02Z</dc:date>
    <item>
      <title>What happens if I call splunk from a scripted input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599049#M10629</link>
      <description>&lt;P&gt;I'm wondering what would happen if I ran "splunk btool whatever" from a script that's running as scrpited input. Theoretically - it should be run with whatever user the splunkd.exe is running with so the question is if it will have all the necessary rights and will run unattended properly or will it stop and ask for credentials?&lt;/P&gt;&lt;P&gt;The case in question is mostly about windows and spawning a subprocess from a powershell script but a general answer including unix is also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 11:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599049#M10629</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-24T11:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: What happens if I call splunk from a scripted input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599056#M10630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;not sure if i get you correctly - you want to talk to splunkd using a scripted input without having credentials?generally "splunk btool whatever" would be a bad example, as this does not need splunkd to be running.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input&amp;gt;
  &amp;lt;server_host&amp;gt;art-macbook.local&amp;lt;/server_host&amp;gt;
  &amp;lt;server_uri&amp;gt;https://127.0.0.1:8089&amp;lt;/server_uri&amp;gt;
  &amp;lt;session_key&amp;gt;YmGDj6BtVw^dAb1UzmBjg8MwOegMXHeNtF17THnAoR0Ot2HXQ7BXZ9mPI^hNkdFN^yyTYvrPxjf0WThDmW9sahRomNrj^t^KYG8V30hE9gaPh2gVV7H0LnY&amp;lt;/session_key&amp;gt;
  &amp;lt;checkpoint_dir&amp;gt;/Users/andreas/splunk/var/lib/splunk/modinputs/buba&amp;lt;/checkpoint_dir&amp;gt;
  &amp;lt;configuration&amp;gt;
    &amp;lt;stanza name="buba://single" app="buba-backend"&amp;gt;
      &amp;lt;param name="configfile"&amp;gt;buba.conf&amp;lt;/param&amp;gt;
      &amp;lt;param name="disabled"&amp;gt;0&amp;lt;/param&amp;gt;
      &amp;lt;param name="env"&amp;gt;singlerestore&amp;lt;/param&amp;gt;
      &amp;lt;param name="host"&amp;gt;$decideOnStartup&amp;lt;/param&amp;gt;
      &amp;lt;param name="index"&amp;gt;default&amp;lt;/param&amp;gt;
      &amp;lt;param name="interval"&amp;gt;80000&amp;lt;/param&amp;gt;
    &amp;lt;/stanza&amp;gt;
  &amp;lt;/configuration&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you should avoid scripted input, as they are deprecated. when you install a modular input instead your script is started and hand over a xml payload and you will find a session_key there. You can use this sessionkey to talk to splunkd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 12:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599056#M10630</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2022-05-24T12:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: What happens if I call splunk from a scripted input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599064#M10631</link>
      <description>&lt;P&gt;Yes, I know all of that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1) I don't want to call splunkd. I explicitly want to do "splunk btool" to check the configuration.&lt;/P&gt;&lt;P&gt;2) Modular inputs need whole splunk installation (indexer or HF) due to python dependency. I want something that can be run on UF.&lt;/P&gt;&lt;P&gt;BTW, scripted inputs are supposed to be deprecated but the TA_windows inputs are scripted inputs. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 12:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599064#M10631</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-24T12:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: What happens if I call splunk from a scripted input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599077#M10632</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;so if it's really only splunk btool you can run splunk btool using a scripted input. This will run the command as the splunk user. you can capture the output.. no problem. done this before.&lt;/P&gt;&lt;P&gt;regards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 13:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/What-happens-if-I-call-splunk-from-a-scripted-input/m-p/599077#M10632</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2022-05-24T13:15:03Z</dc:date>
    </item>
  </channel>
</rss>

