<?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: Concatenate fields into a single string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105220#M183206</link>
    <description>&lt;P&gt;OK, thanks. That was helpful. However, when I have multiple values in the Signature_Name field, I get no values when I try to concatenate into the Event_Detail field.&lt;/P&gt;

&lt;P&gt;Here is my search string:&lt;/P&gt;

&lt;P&gt;sourcetype="incident"| sort +Severity | lookup geoip clientip as SourceIP_Address| lookup subnetlookup ip as SourceIP_Address OUTPUT subnet_name AS location | eval &lt;BR /&gt;
client_country=replace(client_country," ","") | strcat client_city ", " client_region " " client_country mylocation | eval final_location=if(mylocation==",  ",location,mylocation) | rex field=final_location "(?&lt;SIP_REGION&gt;.&lt;EM&gt;) (?&lt;SIP_COUNTRY&gt;.&lt;/SIP_COUNTRY&gt;&lt;/EM&gt;)" | eval Event_Detail=Signature_Name+ ";" +Vendor_Signature+ ";" +Incident_Detail_URL+ ";" +Analyst_Assessment | table CreateTimeStamp_GMT Data_Source Reference_Number SourceIP_Address SIP_Region SIP_Country Severity Incident_Category Incident_Classification Event_Detail | outputcsv SymantecReport.csv&lt;/SIP_REGION&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 10:04:00 GMT</pubDate>
    <dc:creator>efelder0</dc:creator>
    <dc:date>2020-09-28T10:04:00Z</dc:date>
    <item>
      <title>Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105217#M183203</link>
      <description>&lt;P&gt;I have four fields: Signature_Name, Vendor_Signature, Incident_Detail_URL, Analyst_Assessment that I need to concatenate into one field (single string) called 'Event Detail'. Additionally, I need to append a semi-colon at the end of each field. How can this be done?  &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105217#M183203</guid>
      <dc:creator>efelder0</dc:creator>
      <dc:date>2020-09-28T10:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105218#M183204</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval Event_Detail=Signature_Name+";"+Vendor_Signature+";"+Incident_Detail_URL+";"+Analyst_Assessment+";"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Nov 2011 16:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105218#M183204</guid>
      <dc:creator>bbingham</dc:creator>
      <dc:date>2011-11-07T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105219#M183205</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;eval&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval Event_Detail= Signature_Name.";".Vendor_Signature.";".Incident_Detail_URL.";".Analyst_Assessment
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Nov 2011 16:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105219#M183205</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-11-07T16:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105220#M183206</link>
      <description>&lt;P&gt;OK, thanks. That was helpful. However, when I have multiple values in the Signature_Name field, I get no values when I try to concatenate into the Event_Detail field.&lt;/P&gt;

&lt;P&gt;Here is my search string:&lt;/P&gt;

&lt;P&gt;sourcetype="incident"| sort +Severity | lookup geoip clientip as SourceIP_Address| lookup subnetlookup ip as SourceIP_Address OUTPUT subnet_name AS location | eval &lt;BR /&gt;
client_country=replace(client_country," ","") | strcat client_city ", " client_region " " client_country mylocation | eval final_location=if(mylocation==",  ",location,mylocation) | rex field=final_location "(?&lt;SIP_REGION&gt;.&lt;EM&gt;) (?&lt;SIP_COUNTRY&gt;.&lt;/SIP_COUNTRY&gt;&lt;/EM&gt;)" | eval Event_Detail=Signature_Name+ ";" +Vendor_Signature+ ";" +Incident_Detail_URL+ ";" +Analyst_Assessment | table CreateTimeStamp_GMT Data_Source Reference_Number SourceIP_Address SIP_Region SIP_Country Severity Incident_Category Incident_Classification Event_Detail | outputcsv SymantecReport.csv&lt;/SIP_REGION&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105220#M183206</guid>
      <dc:creator>efelder0</dc:creator>
      <dc:date>2020-09-28T10:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105221#M183207</link>
      <description>&lt;P&gt;Did you ever figure this out?  "No values" when there are multiple values in the field.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 16:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105221#M183207</guid>
      <dc:creator>leonphelps_s</dc:creator>
      <dc:date>2016-11-03T16:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105222#M183208</link>
      <description>&lt;P&gt;for the issue with MV fields and concatenation, you can always use mvjoin first to get all of the Signature Names comma separated (or any other delim)&lt;/P&gt;

&lt;P&gt;sourcetype="incident"| sort +Severity | lookup geoip clientip as SourceIP_Address| lookup subnetlookup ip as SourceIP_Address OUTPUT subnet_name AS location | eval &lt;BR /&gt;
client_country=replace(client_country," ","") | strcat client_city ", " client_region " " client_country mylocation | eval final_location=if(mylocation==", ",location,mylocation) | rex field=final_location "(?.) (?.)" &lt;BR /&gt;
| eval Signature_Name=mvjoin(Signature_Name,", ")&lt;BR /&gt;
| eval Event_Detail=Signature_Name+ ";" +Vendor_Signature+ ";" +Incident_Detail_URL+ ";" +Analyst_Assessment | table CreateTimeStamp_GMT Data_Source Reference_Number SourceIP_Address SIP_Region SIP_Country Severity Incident_Category Incident_Classification Event_Detail | outputcsv SymantecReport.csv&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105222#M183208</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2020-09-29T11:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate fields into a single string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105223#M183209</link>
      <description>&lt;P&gt;My issue ended up being a command ordering issue. Inadvertently had the eval command before the mv&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenate-fields-into-a-single-string/m-p/105223#M183209</guid>
      <dc:creator>leonphelps_s</dc:creator>
      <dc:date>2016-11-03T18:07:33Z</dc:date>
    </item>
  </channel>
</rss>

