<?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 Splunk search result to csv format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294792#M56007</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have requirement to have Splunk search/dashboard result data in csv format to be fed into another tool. There should not be any manual process- search should run at scheduled time provide result to be picked by another tool.&lt;/P&gt;

&lt;P&gt;Options:&lt;/P&gt;

&lt;P&gt;1) The tool can pick the csv file generated from search using outputcsv command but in doc it was written that it is not supported in distributed env. So if any other node run the search it will written local to that search node. Tool need to check all the nodes for the file. This can be done based on script checking the timestamp of the file generated and pulling it.&lt;/P&gt;

&lt;P&gt;2) Can query write the data into separate index in csv format and tool can use Splunk API details to pull up the data?&lt;/P&gt;

&lt;P&gt;Are there any other ways to implement this and which might be the best option?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Hemendra&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 01:13:09 GMT</pubDate>
    <dc:creator>hemendralodhi</dc:creator>
    <dc:date>2017-10-12T01:13:09Z</dc:date>
    <item>
      <title>Splunk search result to csv format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294792#M56007</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have requirement to have Splunk search/dashboard result data in csv format to be fed into another tool. There should not be any manual process- search should run at scheduled time provide result to be picked by another tool.&lt;/P&gt;

&lt;P&gt;Options:&lt;/P&gt;

&lt;P&gt;1) The tool can pick the csv file generated from search using outputcsv command but in doc it was written that it is not supported in distributed env. So if any other node run the search it will written local to that search node. Tool need to check all the nodes for the file. This can be done based on script checking the timestamp of the file generated and pulling it.&lt;/P&gt;

&lt;P&gt;2) Can query write the data into separate index in csv format and tool can use Splunk API details to pull up the data?&lt;/P&gt;

&lt;P&gt;Are there any other ways to implement this and which might be the best option?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Hemendra&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 01:13:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294792#M56007</guid>
      <dc:creator>hemendralodhi</dc:creator>
      <dc:date>2017-10-12T01:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search result to csv format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294793#M56008</link>
      <description>&lt;P&gt;You can use &lt;CODE&gt;outputlookup&lt;/CODE&gt; instead of &lt;CODE&gt;outputcsv&lt;/CODE&gt;. The file should then replicate all to all the nodes provided you are running search head cluster&lt;/P&gt;

&lt;P&gt;The best way is to run the search via Splunk Rest API and get the results&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 02:42:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294793#M56008</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-10-12T02:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search result to csv format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294794#M56009</link>
      <description>&lt;P&gt;You can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;some serch query&amp;gt;....|outputlookup test.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It will save your search query results into test.csv file and it will get replicated to all search heads (supported in distributed environment).&lt;BR /&gt;
Then when you want use that csv file to pick up by another tool then you can try below query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup test.csv|table... &amp;lt;some search query&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Oct 2017 03:01:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-result-to-csv-format/m-p/294794#M56009</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2017-10-12T03:01:42Z</dc:date>
    </item>
  </channel>
</rss>

