<?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 Can't get automatic extraction to work with json to kv in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-automatic-extraction-to-work-with-json-to-kv/m-p/516180#M87364</link>
    <description>&lt;P&gt;So I'm referencing this solved answer:&amp;nbsp; &lt;A href="https://community.splunk.com/t5/Getting-Data-In/Extract-JSON-data-within-the-logs-JSON-mixed-with-unstructured/td-p/195292/page/2" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Extract-JSON-data-within-the-logs-JSON-mixed-with-unstructured/td-p/195292/page/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But my configuration isn't working.&amp;nbsp; I have this mess of a field:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Message={"ProviderGuid":"eb79061a-a566-4698-9119-3ed2807060e7","YaraMatch":[],"ProviderName":"Microsoft-Windows-DNSServer","EventName":"LOOK_UP","Opcode":0,"OpcodeName":"Info","TimeStamp":"2020-08-25T20:10:50.2211944-07:00","ThreadID":4168,"ProcessID":2632,"ProcessName":"dns","PointerSize":8,"EventDataLength":352,"XmlEventData":{"FormattedMessage":"RESPONSE_SUCCESS: TCP=0; InterfaceIP=192.168.1.5; Destination=192.168.1.50; AA=0; AD=0; QNAME=86.130.9.52.in-addr.arpa.; QTYPE=12; XID=17,307; DNSSEC=0; RCODE=0; Port=63,227; Flags=33,152; Scope=Default; Zone=..Cache; PolicyName=NULL; PacketData=439B8180000100010000000002383603...; AdditionalInfo= VirtualizationInstance:.; GUID={EC86881D-308D-4A91-94FE-5DCDDFCADFE3} ","RCODE":"0","TCP":"0","Scope":"Default","GUID":"{EC86881D-308D-4A91-94FE-5DCDDFCADFE3}","Port":"63,227","AD":"0","QNAME":"86.130.9.52.in-addr.arpa.","PolicyName":"NULL","MSec":"3243143.0166","XID":"17,307","AA":"0","Destination":"192.168.1.50","QTYPE":"12","Zone":"..Cache","PID":"2632","AdditionalInfo":"VirtualizationInstance:.","PacketData":"439B8180000100010000000002383603...","TID":"4168","ProviderName":"Microsoft-Windows-DNSServer","PName":"","DNSSEC":"0","InterfaceIP":"192.168.1.5","EventName":"LOOK_UP","Flags":"33,152"}}&lt;/LI-CODE&gt;&lt;P&gt;and I'm trying to parse out the KV portion in the middle.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my props.conf and transforms.conf files&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;[windns]&lt;BR /&gt;REPORT-jsonkv = report-json,report-kv&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;transforms.conf&lt;/P&gt;&lt;P&gt;[report-json]&lt;BR /&gt;REGEX = XmlEventData":{(?&amp;lt;kvdata&amp;gt;.+?),"&lt;/P&gt;&lt;P&gt;[report-kv]&lt;BR /&gt;REGEX = \s(\S+)=(\S+)&lt;BR /&gt;FORMAT = $1::$2&lt;BR /&gt;MV_ADD = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand the sequence correctly, that blob above should parse into kvdata as the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"FormattedMessage":"RESPONSE_SUCCESS: TCP=0; InterfaceIP=192.168.1.5; Destination=192.168.1.50; AA=0; AD=0; QNAME=86.130.9.52.in-addr.arpa.; QTYPE=12; XID=17,307; DNSSEC=0; RCODE=0; Port=63,227; Flags=33,152; Scope=Default; Zone=..Cache; PolicyName=NULL; PacketData=439B8180000100010000000002383603...; AdditionalInfo= VirtualizationInstance:.; GUID={EC86881D-308D-4A91-94FE-5DCDDFCADFE3} "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then that should become kv pairs&lt;/P&gt;&lt;P&gt;TCP=0&lt;BR /&gt;InterfaceIP=192.168.1.5&lt;BR /&gt;&lt;BR /&gt;and so on....&lt;/P&gt;&lt;P&gt;(except "AdditionalInfo" will NOT parse out due to the REGEX, but the rest should, but that's ok)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a single server, basic config.&lt;/P&gt;&lt;P&gt;suggestions appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2020 03:27:48 GMT</pubDate>
    <dc:creator>reswob10</dc:creator>
    <dc:date>2020-08-26T03:27:48Z</dc:date>
    <item>
      <title>Can't get automatic extraction to work with json to kv</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-automatic-extraction-to-work-with-json-to-kv/m-p/516180#M87364</link>
      <description>&lt;P&gt;So I'm referencing this solved answer:&amp;nbsp; &lt;A href="https://community.splunk.com/t5/Getting-Data-In/Extract-JSON-data-within-the-logs-JSON-mixed-with-unstructured/td-p/195292/page/2" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Extract-JSON-data-within-the-logs-JSON-mixed-with-unstructured/td-p/195292/page/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But my configuration isn't working.&amp;nbsp; I have this mess of a field:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Message={"ProviderGuid":"eb79061a-a566-4698-9119-3ed2807060e7","YaraMatch":[],"ProviderName":"Microsoft-Windows-DNSServer","EventName":"LOOK_UP","Opcode":0,"OpcodeName":"Info","TimeStamp":"2020-08-25T20:10:50.2211944-07:00","ThreadID":4168,"ProcessID":2632,"ProcessName":"dns","PointerSize":8,"EventDataLength":352,"XmlEventData":{"FormattedMessage":"RESPONSE_SUCCESS: TCP=0; InterfaceIP=192.168.1.5; Destination=192.168.1.50; AA=0; AD=0; QNAME=86.130.9.52.in-addr.arpa.; QTYPE=12; XID=17,307; DNSSEC=0; RCODE=0; Port=63,227; Flags=33,152; Scope=Default; Zone=..Cache; PolicyName=NULL; PacketData=439B8180000100010000000002383603...; AdditionalInfo= VirtualizationInstance:.; GUID={EC86881D-308D-4A91-94FE-5DCDDFCADFE3} ","RCODE":"0","TCP":"0","Scope":"Default","GUID":"{EC86881D-308D-4A91-94FE-5DCDDFCADFE3}","Port":"63,227","AD":"0","QNAME":"86.130.9.52.in-addr.arpa.","PolicyName":"NULL","MSec":"3243143.0166","XID":"17,307","AA":"0","Destination":"192.168.1.50","QTYPE":"12","Zone":"..Cache","PID":"2632","AdditionalInfo":"VirtualizationInstance:.","PacketData":"439B8180000100010000000002383603...","TID":"4168","ProviderName":"Microsoft-Windows-DNSServer","PName":"","DNSSEC":"0","InterfaceIP":"192.168.1.5","EventName":"LOOK_UP","Flags":"33,152"}}&lt;/LI-CODE&gt;&lt;P&gt;and I'm trying to parse out the KV portion in the middle.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my props.conf and transforms.conf files&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;[windns]&lt;BR /&gt;REPORT-jsonkv = report-json,report-kv&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;transforms.conf&lt;/P&gt;&lt;P&gt;[report-json]&lt;BR /&gt;REGEX = XmlEventData":{(?&amp;lt;kvdata&amp;gt;.+?),"&lt;/P&gt;&lt;P&gt;[report-kv]&lt;BR /&gt;REGEX = \s(\S+)=(\S+)&lt;BR /&gt;FORMAT = $1::$2&lt;BR /&gt;MV_ADD = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand the sequence correctly, that blob above should parse into kvdata as the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"FormattedMessage":"RESPONSE_SUCCESS: TCP=0; InterfaceIP=192.168.1.5; Destination=192.168.1.50; AA=0; AD=0; QNAME=86.130.9.52.in-addr.arpa.; QTYPE=12; XID=17,307; DNSSEC=0; RCODE=0; Port=63,227; Flags=33,152; Scope=Default; Zone=..Cache; PolicyName=NULL; PacketData=439B8180000100010000000002383603...; AdditionalInfo= VirtualizationInstance:.; GUID={EC86881D-308D-4A91-94FE-5DCDDFCADFE3} "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then that should become kv pairs&lt;/P&gt;&lt;P&gt;TCP=0&lt;BR /&gt;InterfaceIP=192.168.1.5&lt;BR /&gt;&lt;BR /&gt;and so on....&lt;/P&gt;&lt;P&gt;(except "AdditionalInfo" will NOT parse out due to the REGEX, but the rest should, but that's ok)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a single server, basic config.&lt;/P&gt;&lt;P&gt;suggestions appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 03:27:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-automatic-extraction-to-work-with-json-to-kv/m-p/516180#M87364</guid>
      <dc:creator>reswob10</dc:creator>
      <dc:date>2020-08-26T03:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get automatic extraction to work with json to kv</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-automatic-extraction-to-work-with-json-to-kv/m-p/516410#M87401</link>
      <description>&lt;P&gt;what's _raw?&lt;/P&gt;&lt;P&gt;SEDCMD and KV_MODE&amp;#15;&amp;#14;=JSON are better, I guess.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 00:29:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-automatic-extraction-to-work-with-json-to-kv/m-p/516410#M87401</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-27T00:29:08Z</dc:date>
    </item>
  </channel>
</rss>

