<?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 Is it possible to add an option to the UI in Simple XML to allow users to select a file or folder and run a oneshot python script to index it? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125364#M25847</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am working on an App that will allow users to select a file or folder and then call a python script in the background to run "splunk  add oneshot &amp;lt;file(s)&amp;gt;" to index them.&lt;/P&gt;

&lt;P&gt;I am looking for a UI option which will allow users to browse and select file/folder similar to what is available in Splunk -&amp;gt; Settings -&amp;gt; Add Data option &lt;/P&gt;

&lt;P&gt;Is this possible in basic XML ? or do I have to write a javascript/plugins to achieve this.&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;BR /&gt;
sundar.&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2015 07:19:55 GMT</pubDate>
    <dc:creator>sanurd</dc:creator>
    <dc:date>2015-05-29T07:19:55Z</dc:date>
    <item>
      <title>Is it possible to add an option to the UI in Simple XML to allow users to select a file or folder and run a oneshot python script to index it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125364#M25847</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am working on an App that will allow users to select a file or folder and then call a python script in the background to run "splunk  add oneshot &amp;lt;file(s)&amp;gt;" to index them.&lt;/P&gt;

&lt;P&gt;I am looking for a UI option which will allow users to browse and select file/folder similar to what is available in Splunk -&amp;gt; Settings -&amp;gt; Add Data option &lt;/P&gt;

&lt;P&gt;Is this possible in basic XML ? or do I have to write a javascript/plugins to achieve this.&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;BR /&gt;
sundar.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 07:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125364#M25847</guid>
      <dc:creator>sanurd</dc:creator>
      <dc:date>2015-05-29T07:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add an option to the UI in Simple XML to allow users to select a file or folder and run a oneshot python script to index it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125365#M25848</link>
      <description>&lt;P&gt;I don't see any specific reference to "input type=file" in the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML"&gt;Simple XML documentation&lt;/A&gt;, which also doesn't seem to be what you're looking for anyway. (Using that would result in the contents of that file being uploaded when the form was submitted)&lt;/P&gt;

&lt;P&gt;So it seems to me like some form of JavaScript would be necessary.&lt;/P&gt;

&lt;P&gt;But there are a couple of issues that seem like they would cause problems with this approach.&lt;/P&gt;

&lt;P&gt;Remember that Splunk is running on a server somewhere, while the browser is being run (generally speaking) from a client. The path information for locating a file will most likely be different between the two. For example, if I select a file on my local PC named &lt;CODE&gt;c:\log\app.log&lt;/CODE&gt; and pass &lt;EM&gt;that&lt;/EM&gt; name to the server, the server isn't going to have any way of accessing that file.&lt;/P&gt;

&lt;P&gt;So while I understand what you're trying to achieve, I have a lot of doubt about it being possible. (I've learned often enough not to go so far to say it's impossible - I've been proven wrong too many times before. But I'd be real interested to see if you get a viable solution to this.)&lt;/P&gt;

&lt;P&gt;I think your best bet would be some type of client-side program that would send the data to Splunk through the API.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 13:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125365#M25848</guid>
      <dc:creator>KenWhitesell</dc:creator>
      <dc:date>2015-05-29T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add an option to the UI in Simple XML to allow users to select a file or folder and run a oneshot python script to index it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125366#M25849</link>
      <description>&lt;P&gt;Thanks Ken for the response. My requirements are as such that the required files would be present in the splunk server itself through an NFS mount or a share. I have a python script ready to be called through a dummy search that would go through the list if files in a folder and then subsequently run 'splunk add oneshot' command. &lt;BR /&gt;
All I need is an interface that would allow user to pick a folder that would be on the spunk server itself.  I have looked at the UI examples and I am unable to find a way through simple XML. Looking at the Splunk -&amp;gt; Add data -&amp;gt; files and directors option itself, it seems like it is an App by itself  ( data preview ) , not sure if we can somehow leverage this.&lt;/P&gt;

&lt;P&gt;sundar&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2015 08:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-add-an-option-to-the-UI-in-Simple-XML-to-allow/m-p/125366#M25849</guid>
      <dc:creator>sanurd</dc:creator>
      <dc:date>2015-05-30T08:12:56Z</dc:date>
    </item>
  </channel>
</rss>

