<?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 Adding source path to table output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473490#M133216</link>
    <description>&lt;P&gt;I have the following search set up:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;search string&lt;/EM&gt;&lt;BR /&gt;
| fields host &lt;EM&gt;raw &lt;BR /&gt;
| fields - _time _indextime _sourcetype _subsecond _serial _bkt _cd _si _kv _timediff |  head 1 &lt;BR /&gt;
| join append [ stats count | fields - count ]&lt;BR /&gt;
| eval SourcePath=&lt;STRONG&gt;&lt;EM&gt;WHAT TO PUT HERE?&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| eval ConfigItem="Config Item" &lt;BR /&gt;
| eval PAGER="Pager" &lt;BR /&gt;
| eval TEAM="Team"&lt;BR /&gt;&lt;BR /&gt;
| eval GROUP="Group" &lt;BR /&gt;
| eval SHORTDESCRIPTION="Short Description"&lt;BR /&gt;
| table host _raw SourcePath Config.Item PAGER TEAM GROUP SHORTDESCRIPTION&lt;BR /&gt;
| rex mode=sed "s/\,//g"&lt;BR /&gt;
| rex mode=sed "s/[^a-zA-Z0-9&lt;/EM&gt;-.]+/ /g"&lt;BR /&gt;
| outputcsv file.csv&lt;/P&gt;

&lt;P&gt;Everything is working as required, I am just not too sure what should I match &lt;STRONG&gt;&lt;EM&gt;eval SourcePath=&lt;/EM&gt;&lt;/STRONG&gt; with in order to obtain the string of the source log file's path?&lt;BR /&gt;
Anyone able to assist?&lt;/P&gt;

&lt;P&gt;Thanks a bunch!&lt;BR /&gt;
Tom&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 15:18:23 GMT</pubDate>
    <dc:creator>tom1981</dc:creator>
    <dc:date>2020-04-16T15:18:23Z</dc:date>
    <item>
      <title>Adding source path to table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473490#M133216</link>
      <description>&lt;P&gt;I have the following search set up:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;search string&lt;/EM&gt;&lt;BR /&gt;
| fields host &lt;EM&gt;raw &lt;BR /&gt;
| fields - _time _indextime _sourcetype _subsecond _serial _bkt _cd _si _kv _timediff |  head 1 &lt;BR /&gt;
| join append [ stats count | fields - count ]&lt;BR /&gt;
| eval SourcePath=&lt;STRONG&gt;&lt;EM&gt;WHAT TO PUT HERE?&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| eval ConfigItem="Config Item" &lt;BR /&gt;
| eval PAGER="Pager" &lt;BR /&gt;
| eval TEAM="Team"&lt;BR /&gt;&lt;BR /&gt;
| eval GROUP="Group" &lt;BR /&gt;
| eval SHORTDESCRIPTION="Short Description"&lt;BR /&gt;
| table host _raw SourcePath Config.Item PAGER TEAM GROUP SHORTDESCRIPTION&lt;BR /&gt;
| rex mode=sed "s/\,//g"&lt;BR /&gt;
| rex mode=sed "s/[^a-zA-Z0-9&lt;/EM&gt;-.]+/ /g"&lt;BR /&gt;
| outputcsv file.csv&lt;/P&gt;

&lt;P&gt;Everything is working as required, I am just not too sure what should I match &lt;STRONG&gt;&lt;EM&gt;eval SourcePath=&lt;/EM&gt;&lt;/STRONG&gt; with in order to obtain the string of the source log file's path?&lt;BR /&gt;
Anyone able to assist?&lt;/P&gt;

&lt;P&gt;Thanks a bunch!&lt;BR /&gt;
Tom&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 15:18:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473490#M133216</guid>
      <dc:creator>tom1981</dc:creator>
      <dc:date>2020-04-16T15:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding source path to table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473491#M133217</link>
      <description>&lt;P&gt;It's difficult to answer without knowing your data.  Please share some sample (sanitized) events.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 16:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473491#M133217</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-16T16:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding source path to table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473492#M133218</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Sorry for the delay.&lt;BR /&gt;
Please see in the answer section for the event examples (cannot add pictures here)&lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 16:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473492#M133218</guid>
      <dc:creator>tom1981</dc:creator>
      <dc:date>2020-04-18T16:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding source path to table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473493#M133219</link>
      <description>&lt;P&gt;Events:&lt;/P&gt;

&lt;P&gt;Before formatting;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8677iAFC48A030B43F150/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After formating:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8678i288A7BD8B93704F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 16:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473493#M133219</guid>
      <dc:creator>tom1981</dc:creator>
      <dc:date>2020-04-18T16:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding source path to table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473494#M133220</link>
      <description>&lt;P&gt;Bump to top.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-source-path-to-table-output/m-p/473494#M133220</guid>
      <dc:creator>tom1981</dc:creator>
      <dc:date>2020-04-27T17:40:05Z</dc:date>
    </item>
  </channel>
</rss>

