<?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: Why do my inline eval statements work with spath, but do not as calculated fields in props.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-my-inline-eval-statements-work-with-spath-but-do-not-as/m-p/411334#M72831</link>
    <description>&lt;P&gt;EXTRACT works with regex, not with spath. You could try with EVAL statements in your props.conf.&lt;/P&gt;

&lt;P&gt;But it might make more sense to just apply something like KV_MODE = json in your props.conf. Or just get the splunk stream TA on your search heads, which should be able to handle all the field extraction stuff for such data I would say?&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 13:01:41 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-11-26T13:01:41Z</dc:date>
    <item>
      <title>Why do my inline eval statements work with spath, but do not as calculated fields in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-my-inline-eval-statements-work-with-spath-but-do-not-as/m-p/411333#M72830</link>
      <description>&lt;P&gt;Why does this work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dns sourcetype=stream:dns
| eval host_addresses=spath(_raw,"host_addr{}")
| eval hostnames=spath(_raw,”hostname{}”)
| eval message_types=spath(_raw,"message_type{}")
| eval names=spath(_raw,"name{}")
| eval queries=spath(_raw,"query{}")
| eval query_types=spath(_raw,"query_type{}")
| eval ttls=spath(_raw,"ttl{}")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;but this does not in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[stream:dns]
EXTRACT-host_addresses = spath(_raw,"host_addr{}")
EXTRACT-message_types = spath(_raw,"message_type{}")
EXTRACT-hostnames = spath(_raw,"hostname{}")
EXTRACT-names = spath(_raw,"name{}")
EXTRACT-queries = spath(_raw,"query{}")
EXTRACT-query_types = spath(_raw,"query_type{}")
EXTRACT-ttls = spath(_raw,"ttl{}")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 12:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-my-inline-eval-statements-work-with-spath-but-do-not-as/m-p/411333#M72830</guid>
      <dc:creator>jwalthour</dc:creator>
      <dc:date>2018-11-26T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my inline eval statements work with spath, but do not as calculated fields in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-my-inline-eval-statements-work-with-spath-but-do-not-as/m-p/411334#M72831</link>
      <description>&lt;P&gt;EXTRACT works with regex, not with spath. You could try with EVAL statements in your props.conf.&lt;/P&gt;

&lt;P&gt;But it might make more sense to just apply something like KV_MODE = json in your props.conf. Or just get the splunk stream TA on your search heads, which should be able to handle all the field extraction stuff for such data I would say?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 13:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-my-inline-eval-statements-work-with-spath-but-do-not-as/m-p/411334#M72831</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-11-26T13:01:41Z</dc:date>
    </item>
  </channel>
</rss>

