<?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: splunk $result.fieldname$ token w/ json data not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/splunk-result-fieldname-token-w-json-data-not-working/m-p/329423#M61095</link>
    <description>&lt;P&gt;woops should have tried this before I posted.  just doing a &lt;CODE&gt;|rename alert.signature as signature&lt;/CODE&gt; solved the issue. Apparently splunk tokens do not like nested json. &lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 21:23:53 GMT</pubDate>
    <dc:creator>zhatsispgx</dc:creator>
    <dc:date>2018-04-12T21:23:53Z</dc:date>
    <item>
      <title>splunk $result.fieldname$ token w/ json data not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/splunk-result-fieldname-token-w-json-data-not-working/m-p/329422#M61094</link>
      <description>&lt;P&gt;Hi all, &lt;/P&gt;

&lt;P&gt;I have a scheduled search that runs against a json data sourcetype. Currently splunk extracts the fields correctly, however when I try to use a &lt;CODE&gt;$result.fieldname$&lt;/CODE&gt; token in my alert actions, its not working for json data. &lt;/P&gt;

&lt;P&gt;Here is a sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{       
     alert: {       
         action:     allowed    
         category:   Attempted Information Leak 
         gid:    1  
         rev:    8  
         severity:   2  
         signature:  ET WEB_SERVER DFind w00tw00t GET-Requests  
         signature_id:   2010794    
    }   
     dest_ip:    x.x.x.x    
     dest_port:  80 
     event_type:     alert  
     flow_id:    131265170182404    
     http:  {       
         hostname:   x.x.x.x    
         http_method:    GET    
         http_user_agent:    ZmEu   
         length:     0  
         protocol:   HTTP/1.1   
         url:    /w00tw00t.at.blackhats.romanian.anti-sec:) 
    }   
     payload_printable:  GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: ZmEu
Host: x.x.x.x
Connection: Close

 proto:  TCP    
 src_ip:     x.x.x.x    
 src_port:   49102  
 stream:     1  
 timestamp:  2018-04-11T17:36:09.121597-0600    
 tx_id:  0  
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my saved search tries to use the following field &lt;CODE&gt;alert.signature&lt;/CODE&gt; for an alert action. So for example, if I wanted to send an email to myself as an alert action and have the value of &lt;CODE&gt;alert.signature&lt;/CODE&gt; in the email body, I am trying by adding &lt;CODE&gt;$result.alert.signature$&lt;/CODE&gt; to the email body which isn't working. Is there a workaround for this? the &lt;CODE&gt;$result.fieldname$&lt;/CODE&gt; works fine for all other datatypes but json from what I can see. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 18:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/splunk-result-fieldname-token-w-json-data-not-working/m-p/329422#M61094</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2018-04-12T18:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: splunk $result.fieldname$ token w/ json data not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/splunk-result-fieldname-token-w-json-data-not-working/m-p/329423#M61095</link>
      <description>&lt;P&gt;woops should have tried this before I posted.  just doing a &lt;CODE&gt;|rename alert.signature as signature&lt;/CODE&gt; solved the issue. Apparently splunk tokens do not like nested json. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 21:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/splunk-result-fieldname-token-w-json-data-not-working/m-p/329423#M61095</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2018-04-12T21:23:53Z</dc:date>
    </item>
  </channel>
</rss>

