<?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: How do I create a multivalue field with an eval function? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431751#M5629</link>
    <description>&lt;P&gt;That's a great suggestion. Unfortunately, it doesn't seem like calculated fields can pipe multiple eval expressions. &lt;/P&gt;

&lt;P&gt;Also, they don't allow chaining multiple calculated fields together - all calculated fields are processed in parallel. I need to be able to create a field with value "QUERY,RESPONSE" and then reference this as multivalue in another field (can be new, can be same). &lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 18:25:25 GMT</pubDate>
    <dc:creator>ejwade</dc:creator>
    <dc:date>2018-08-27T18:25:25Z</dc:date>
    <item>
      <title>How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431749#M5627</link>
      <description>&lt;P&gt;I need to create a &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/Search/Parsemultivaluefields" target="_blank"&gt;multivalue field&lt;/A&gt; using a single eval function. &lt;/P&gt;

&lt;P&gt;I'm using Splunk Enterprise Security and a number of the DNS dashboards rely on the field "message_type" to be populated with either "QUERY" or "RESPONSE". &lt;/P&gt;

&lt;P&gt;In Bro DNS logs, query and response information is combined into a single event, so there is not Bro equivalent to message_type. To get around this (without having to change all the dashboards and affect other DNS data sources), I'm hoping to create a calculated field in the Bro app that will be multivalued with "QUERY" and "RESPONSE" as the values. I wanted to do something like this:&lt;/P&gt;

&lt;P&gt;| eval message_type = "QUERY,RESPONSE" | makemv delim="," message_type&lt;/P&gt;

&lt;P&gt;But the calculated fields don't seem to like piping functions, or functions that aren't eval. Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431749#M5627</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2020-09-29T21:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431750#M5628</link>
      <description>&lt;P&gt;@ejwade&lt;/P&gt;

&lt;P&gt;Have you tried this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval message_type = "QUERY,RESPONSE" | eval message_type=split(message_type,",")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Aug 2018 17:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431750#M5628</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-08-27T17:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431751#M5629</link>
      <description>&lt;P&gt;That's a great suggestion. Unfortunately, it doesn't seem like calculated fields can pipe multiple eval expressions. &lt;/P&gt;

&lt;P&gt;Also, they don't allow chaining multiple calculated fields together - all calculated fields are processed in parallel. I need to be able to create a field with value "QUERY,RESPONSE" and then reference this as multivalue in another field (can be new, can be same). &lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 18:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431751#M5629</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2018-08-27T18:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431752#M5630</link>
      <description>&lt;P&gt;One (chain the two eval items)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval message_type=split( "QUERY,RESPONSE",",")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Two (better, use &lt;CODE&gt;mvappend&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval message_type=mvappend("QUERY","RESPONSE")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Aug 2018 22:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431752#M5630</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-27T22:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431753#M5631</link>
      <description>&lt;P&gt;That was 100% the right approach. Thank you DalJeanis and kamlesh_vaghela for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 22:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431753#M5631</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2018-08-27T22:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431754#M5632</link>
      <description>&lt;P&gt;Did you add this to the CIM for DNS resolution?  I tried changing the Eval Expression in the CIM, and it breaks the datamodel.&lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The arguments to the 'mvappend' function are invalid.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431754#M5632</guid>
      <dc:creator>bkirk</dc:creator>
      <dc:date>2018-11-07T15:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431755#M5633</link>
      <description>&lt;P&gt;This is what I added to the CIM and it worked I missed some quotes on the mvappend:&lt;BR /&gt;
    if(index=bro,mvappend("QUERY","RESPONSE"),if(isnull(message_type) OR message_type="","unknown",message_type))&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:56:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431755#M5633</guid>
      <dc:creator>bkirk</dc:creator>
      <dc:date>2020-09-29T21:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a multivalue field with an eval function?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431756#M5634</link>
      <description>&lt;P&gt;bkirk - I updated the calculated field "message_type" in props.conf instead of trying to manipulate its eval statement in the data model. The eval statement for message_type in the data model is good as it is, because it sets the value to message_type if it exists, otherwise, "unknown"&lt;/P&gt;

&lt;P&gt;I put this in my props:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# Match all bro_* sourcetypes.
[(?::){}bro_*]

EVAL-message_type = split("QUERY,RESPONSE",",")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:59:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-do-I-create-a-multivalue-field-with-an-eval-function/m-p/431756#M5634</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2020-09-29T21:59:57Z</dc:date>
    </item>
  </channel>
</rss>

