<?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: Field extraction using Splunk dashboard - appending constant text to an extracted field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237424#M70567</link>
    <description>&lt;P&gt;Go to &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Field extractions&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;&lt;BR /&gt;
Select the app that should own this field extraction from the &lt;CODE&gt;Destination app&lt;/CODE&gt; list.&lt;BR /&gt;
Select &lt;CODE&gt;sourcetype&lt;/CODE&gt; from the &lt;CODE&gt;Apply to&lt;/CODE&gt; list and enter &lt;CODE&gt;crowd_count&lt;/CODE&gt; in the &lt;CODE&gt;named&lt;/CODE&gt; box.&lt;BR /&gt;
Select &lt;CODE&gt;inline&lt;/CODE&gt; from the &lt;CODE&gt;type&lt;/CODE&gt; list and enter &lt;CODE&gt;(?&amp;lt;zone_extract&amp;gt;External|OutsideCorner|Inside|FarSide)&lt;/CODE&gt; in the &lt;CODE&gt;Extraction/Transform&lt;/CODE&gt; field.&lt;BR /&gt;
Click &lt;CODE&gt;Save&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Go to &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Calculated fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;&lt;BR /&gt;
Select the app that should own this field extraction from the &lt;CODE&gt;Destination app&lt;/CODE&gt; list.&lt;BR /&gt;
Select &lt;CODE&gt;sourcetype&lt;/CODE&gt; from the &lt;CODE&gt;Apply to&lt;/CODE&gt; list and enter &lt;CODE&gt;crowd_count&lt;/CODE&gt; in the &lt;CODE&gt;named&lt;/CODE&gt; box.&lt;BR /&gt;
Enter &lt;CODE&gt;zone&lt;/CODE&gt; in the &lt;CODE&gt;Name&lt;/CODE&gt; box.&lt;BR /&gt;
Enter &lt;CODE&gt;"Zone-" + zone_extract&lt;/CODE&gt; in the &lt;CODE&gt;Eval expression&lt;/CODE&gt; box.&lt;BR /&gt;
Click &lt;CODE&gt;Save&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Sat, 11 Mar 2017 17:23:50 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-03-11T17:23:50Z</dc:date>
    <item>
      <title>Field extraction using Splunk dashboard - appending constant text to an extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237420#M70563</link>
      <description>&lt;P&gt;I am wanting to extract a new field from the original &lt;STRONG&gt;source&lt;/STRONG&gt; field, based on regex matches. I would then like to prepend/append some constant text to the extracted value. I would like to do this using the field transformation and field extraction dialogs in the Splunk web admin (alternatively I can also modify the light forwarder configs).&lt;/P&gt;

&lt;P&gt;As an example, if the log file source contains the text "External", I would like to create a new field called "zone" with the value "Zone-External". I can achieve this via splunk search using the &lt;STRONG&gt;rex&lt;/STRONG&gt; and &lt;STRONG&gt;eval&lt;/STRONG&gt; commands, like the following:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Example source:&lt;/STRONG&gt; &lt;BR /&gt;
&lt;CODE&gt;/opt/app/logs/CrowdCounting/cc_ip52_External-20161123.log&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Dashboard query:&lt;/STRONG&gt;&lt;BR /&gt;
&lt;CODE&gt;sourcetype=crowd_count | rex field=source "(?&amp;lt;zone_extract&amp;gt;External|OutsideCorner|Inside|FarSide)" | eval zone="Zone-".zone_extract&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Using the field transformation/extraction admin dialogs, I can extract a field containing the matched text (i.e. zone=External), but I am unable to prepend/append any text to the value. Does anyone know how I can achieve this? &lt;/P&gt;

&lt;P&gt;Alternatively, it would be also ok if I can do this via the splunkforwarder configs, however it appears this is not possible on a light forwarder. But I may be wrong?&lt;/P&gt;

&lt;P&gt;Note: the data is ingested using a light universal splunkforwarder, and I am not able to modify the configs on the indexer at all.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Allan&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 02:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237420#M70563</guid>
      <dc:creator>jamesar</dc:creator>
      <dc:date>2016-11-24T02:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using Splunk dashboard - appending constant text to an extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237421#M70564</link>
      <description>&lt;P&gt;Hi jamesar.&lt;BR /&gt;
try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=crowd_count | rex field=source "(?&amp;lt;zone_extract&amp;gt;External|OutsideCorner|Inside|FarSide)" | eval zone="Zone-"+zone_extract
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 09:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237421#M70564</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-25T09:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using Splunk dashboard - appending constant text to an extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237422#M70565</link>
      <description>&lt;P&gt;Hmm.. thanks for your effort Joseph. But as I said in the question, my search query listed in my question works correctly. However, I need to achieve this via the admin web interface (Field Transformations/Extractions pages) or alternatively via the Splunk light forwarder configs (although I don't think that is possible without modifying the configs on the Splunk indexer, which I do not have access to).&lt;/P&gt;

&lt;P&gt;Thanks anyway,&lt;BR /&gt;
Allan&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 00:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237422#M70565</guid>
      <dc:creator>jamesar</dc:creator>
      <dc:date>2016-11-28T00:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using Splunk dashboard - appending constant text to an extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237423#M70566</link>
      <description>&lt;P&gt;Hi jamesar,&lt;BR /&gt;
sorry, I didn't understand your need!&lt;BR /&gt;
every way, you can use the admin web interface: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;to extract the &lt;CODE&gt;zone_extract&lt;/CODE&gt; field modifying regex with
&lt;CODE&gt;(?&amp;lt;zone_extract&amp;gt;External|OutsideCorner|Inside|FarSide) on source&lt;/CODE&gt;, or creating a new one with this regex;&lt;/LI&gt;
&lt;LI&gt;create the "zone" field using calculated fields &lt;CODE&gt;"Zone-"+zone_extract&lt;/CODE&gt;. &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 09:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237423#M70566</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-28T09:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using Splunk dashboard - appending constant text to an extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237424#M70567</link>
      <description>&lt;P&gt;Go to &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Field extractions&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;&lt;BR /&gt;
Select the app that should own this field extraction from the &lt;CODE&gt;Destination app&lt;/CODE&gt; list.&lt;BR /&gt;
Select &lt;CODE&gt;sourcetype&lt;/CODE&gt; from the &lt;CODE&gt;Apply to&lt;/CODE&gt; list and enter &lt;CODE&gt;crowd_count&lt;/CODE&gt; in the &lt;CODE&gt;named&lt;/CODE&gt; box.&lt;BR /&gt;
Select &lt;CODE&gt;inline&lt;/CODE&gt; from the &lt;CODE&gt;type&lt;/CODE&gt; list and enter &lt;CODE&gt;(?&amp;lt;zone_extract&amp;gt;External|OutsideCorner|Inside|FarSide)&lt;/CODE&gt; in the &lt;CODE&gt;Extraction/Transform&lt;/CODE&gt; field.&lt;BR /&gt;
Click &lt;CODE&gt;Save&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Go to &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Calculated fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;&lt;BR /&gt;
Select the app that should own this field extraction from the &lt;CODE&gt;Destination app&lt;/CODE&gt; list.&lt;BR /&gt;
Select &lt;CODE&gt;sourcetype&lt;/CODE&gt; from the &lt;CODE&gt;Apply to&lt;/CODE&gt; list and enter &lt;CODE&gt;crowd_count&lt;/CODE&gt; in the &lt;CODE&gt;named&lt;/CODE&gt; box.&lt;BR /&gt;
Enter &lt;CODE&gt;zone&lt;/CODE&gt; in the &lt;CODE&gt;Name&lt;/CODE&gt; box.&lt;BR /&gt;
Enter &lt;CODE&gt;"Zone-" + zone_extract&lt;/CODE&gt; in the &lt;CODE&gt;Eval expression&lt;/CODE&gt; box.&lt;BR /&gt;
Click &lt;CODE&gt;Save&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 17:23:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-Splunk-dashboard-appending-constant-text/m-p/237424#M70567</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-11T17:23:50Z</dc:date>
    </item>
  </channel>
</rss>

