<?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 How to edit my search to create a field using eval? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-field-using-eval/m-p/206347#M60051</link>
    <description>&lt;P&gt;Currently working on an integration betweek Splunk and RSA Archer eGRC. We are working with the security operations model with the plan that when a Notable event triggers, the alerts and notable would then be forwarded to the SOC module within Archer. &lt;/P&gt;

&lt;P&gt;We have established connection and have shown that we can pass events between the two systems, but not with the provided templates to get the correct info over to Archer. &lt;/P&gt;

&lt;P&gt;Here is the very basic search we are using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cisco:asa  eventtype="Justin Test" 
| stats count by _time 
| where count&amp;gt;=1 
| eval _raw="CEF:0|Splunk|Splunk|6.0.1|20|This incident is based on the aggregation criteria Source where Source is " + source + "|3|RCFApplicationName=secops aggregationcriteria=splunk-source-" + source + " sourcetype=" + sourcetype + " msg=Grouped by source - "+ source + " hosts=" + host + " rt=" + _time + " act=" + action + " eventsource=" + source + " eventtype=" + type + " externalId=" + session_id + " src=" + src + " sourcedomain=" + src_dns + " smac=" + src_mac + " dst=" + dest + " destinationdomain=" + dest_dns + " dmac=" + dest_mac +  " deviceip=" + dvc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This creates the &lt;STRONG&gt;_raw&lt;/STRONG&gt; feld and includes the data there following. This is where our issue lies. With the full search provided, it does not create the eval field. If I remove everything after the first closing quotation marks it will create the _raw field. I think the first issue arrises with the " + source +" &lt;/P&gt;

&lt;P&gt;Any thoughts? I believe this syntax was written for 6.0.1 and thus perhaps the eval command has changed since then? Just spitballing and wanted to get another set of eyes. &lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2016 21:13:25 GMT</pubDate>
    <dc:creator>jph11</dc:creator>
    <dc:date>2016-08-04T21:13:25Z</dc:date>
    <item>
      <title>How to edit my search to create a field using eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-field-using-eval/m-p/206347#M60051</link>
      <description>&lt;P&gt;Currently working on an integration betweek Splunk and RSA Archer eGRC. We are working with the security operations model with the plan that when a Notable event triggers, the alerts and notable would then be forwarded to the SOC module within Archer. &lt;/P&gt;

&lt;P&gt;We have established connection and have shown that we can pass events between the two systems, but not with the provided templates to get the correct info over to Archer. &lt;/P&gt;

&lt;P&gt;Here is the very basic search we are using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cisco:asa  eventtype="Justin Test" 
| stats count by _time 
| where count&amp;gt;=1 
| eval _raw="CEF:0|Splunk|Splunk|6.0.1|20|This incident is based on the aggregation criteria Source where Source is " + source + "|3|RCFApplicationName=secops aggregationcriteria=splunk-source-" + source + " sourcetype=" + sourcetype + " msg=Grouped by source - "+ source + " hosts=" + host + " rt=" + _time + " act=" + action + " eventsource=" + source + " eventtype=" + type + " externalId=" + session_id + " src=" + src + " sourcedomain=" + src_dns + " smac=" + src_mac + " dst=" + dest + " destinationdomain=" + dest_dns + " dmac=" + dest_mac +  " deviceip=" + dvc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This creates the &lt;STRONG&gt;_raw&lt;/STRONG&gt; feld and includes the data there following. This is where our issue lies. With the full search provided, it does not create the eval field. If I remove everything after the first closing quotation marks it will create the _raw field. I think the first issue arrises with the " + source +" &lt;/P&gt;

&lt;P&gt;Any thoughts? I believe this syntax was written for 6.0.1 and thus perhaps the eval command has changed since then? Just spitballing and wanted to get another set of eyes. &lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 21:13:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-field-using-eval/m-p/206347#M60051</guid>
      <dc:creator>jph11</dc:creator>
      <dc:date>2016-08-04T21:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a field using eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-field-using-eval/m-p/206348#M60052</link>
      <description>&lt;P&gt;You &lt;CODE&gt;stats&lt;/CODE&gt; command is the issue. After the stats command you are only left with  &lt;CODE&gt;count&lt;/CODE&gt; and &lt;CODE&gt;_time&lt;/CODE&gt; fields. So none of the other fields exist. Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=cisco:asa  eventtype="Justin Test" 
 | eval _raw="CEF:0|Splunk|Splunk|6.0.1|20|This incident is based on the aggregation criteria Source where Source is " + source + "|3|RCFApplicationName=secops aggregationcriteria=splunk-source-" + source + " sourcetype=" + sourcetype + " msg=Grouped by source - "+ source + " hosts=" + host + " rt=" + _time + " act=" + action + " eventsource=" + source + " eventtype=" + type + " externalId=" + session_id + " src=" + src + " sourcedomain=" + src_dns + " smac=" + src_mac + " dst=" + dest + " destinationdomain=" + dest_dns + " dmac=" + dest_mac +  " deviceip=" + dvc
| stats count values(_raw) as _raw by _time 
| where count&amp;gt;=1 
| table _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2016 21:33:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-field-using-eval/m-p/206348#M60052</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-04T21:33:13Z</dc:date>
    </item>
  </channel>
</rss>

