<?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: Adaptive Response Not Pulling Variables in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466792#M6987</link>
    <description>&lt;P&gt;I've tried that as well and it still doesn't appear to be working.&lt;/P&gt;

&lt;P&gt;Code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;events = helper.get_events()
for event in events:
    print(event)
    risk_object = event.get("risk_object")
    helper.log_info("event.get(\"risk_object\")={}".format(risk_object))
    risk_object_type = event.get("risk_object_type")
    helper.log_info("event.get(\"risk_object_type\")={}".format(risk_object_type))
    risk_message = event.get("risk_message")
    helper.log_info("event.get(\"risk_message\")={}".format(risk_message))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output:&lt;BR /&gt;
signature="event.get("risk_object_type")=None"&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:27:39 GMT</pubDate>
    <dc:creator>ericl42</dc:creator>
    <dc:date>2020-09-30T03:27:39Z</dc:date>
    <item>
      <title>Adaptive Response Not Pulling Variables</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466790#M6985</link>
      <description>&lt;P&gt;I've been using AR rules within notables for about a year now and I've had quite a bit of success with it. Previously I always just used AR to pull variables from my notables via something like this:&lt;/P&gt;

&lt;P&gt;host = helper.get_param("host")&lt;/P&gt;

&lt;P&gt;And since host is a field in my notable, it pulls it fine. However, this does not work for risk_object or risk_object_type. Attached is just one example of a notable that I tripped but it will not pull the risk_object or risk_object_type variable. The odd part is, that it pulls the risk_message variable fine.&lt;/P&gt;

&lt;P&gt;I've tested this with two correlation rules that I have and neither one will pull risk_object but if I alias it to something else, it pulls it fine. Any idea what this is occurring?&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/277823-risk-object-notable.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;BR /&gt;
It looks like the variable is just being pulled out correctly and I'm not sure why. Below is the output from the AR log.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;risk_object = $risk_object$ | table _time   
risk_object_type = $risk_object$ spanning $sourceCount$ Risk Rules
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:23:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466790#M6985</guid>
      <dc:creator>ericl42</dc:creator>
      <dc:date>2020-09-30T03:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adaptive Response Not Pulling Variables</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466791#M6986</link>
      <description>&lt;P&gt;It looks like you're using add-on builder to make the AR action. It could be something internal to the helper class in AoB. The "get_param()" method used to be purely for pulling values specified in alert_actions.conf, not from the raw events themselves. &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/AddonBuilder/3.0.1/UserGuide/PythonHelperFunctions" target="_blank"&gt;https://docs.splunk.com/Documentation/AddonBuilder/3.0.1/UserGuide/PythonHelperFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;To pull the actual values from the event, you could follow the sample pattern as follows:&lt;BR /&gt;
events = helper.get_events()&lt;BR /&gt;
for event in events:&lt;BR /&gt;
    ro = event['risk_object']&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:24:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466791#M6986</guid>
      <dc:creator>kchamplin_splun</dc:creator>
      <dc:date>2020-09-30T03:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adaptive Response Not Pulling Variables</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466792#M6987</link>
      <description>&lt;P&gt;I've tried that as well and it still doesn't appear to be working.&lt;/P&gt;

&lt;P&gt;Code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;events = helper.get_events()
for event in events:
    print(event)
    risk_object = event.get("risk_object")
    helper.log_info("event.get(\"risk_object\")={}".format(risk_object))
    risk_object_type = event.get("risk_object_type")
    helper.log_info("event.get(\"risk_object_type\")={}".format(risk_object_type))
    risk_message = event.get("risk_message")
    helper.log_info("event.get(\"risk_message\")={}".format(risk_message))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output:&lt;BR /&gt;
signature="event.get("risk_object_type")=None"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Adaptive-Response-Not-Pulling-Variables/m-p/466792#M6987</guid>
      <dc:creator>ericl42</dc:creator>
      <dc:date>2020-09-30T03:27:39Z</dc:date>
    </item>
  </channel>
</rss>

