<?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: Json datas selection and meta removal in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569734#M101013</link>
    <description>&lt;P&gt;These props.conf settings MUST go on the first full Splunk Enterprise instance (HF or indexer) that sees the data.&amp;nbsp; The UF will ignore all of them.&amp;nbsp; Perhaps this is why the original props.conf settings didn't work.&lt;/P&gt;&lt;P&gt;To make the comma optional, insert a ? after the comma in the SEDCMD.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 17:07:37 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-10-05T17:07:37Z</dc:date>
    <item>
      <title>Json datas selection and meta removal</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569685#M101007</link>
      <description>&lt;P&gt;Hye.&lt;/P&gt;&lt;P&gt;The situation :&amp;nbsp; an instance of Splunk standalone (&lt;EM&gt;test platform&lt;/EM&gt;), and an UF.&lt;BR /&gt;The data : JSON Stream with multi level.&lt;BR /&gt;The problem : the volume of data being important, we would like to reduce the _raw at only one field. But all JSON fields are saved as _meta.&lt;/P&gt;&lt;P&gt;We have succeeded to update source, sourcetype and host from the JSON datas.&lt;/P&gt;&lt;P&gt;But impossible to omit _meta ... (they always appear in the Search Head)&lt;/P&gt;&lt;P&gt;IN :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"input":{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"type":"log"},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"log":{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"file":"c:\log.josn"},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"@metadata":{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"beat":"filebeat",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"version":"7.10.2"},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"message":"bla bla bla",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"fields":{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"type":"bdc",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"host":"VLCR03",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"type2":"back"}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;OUT :&amp;nbsp;&lt;/P&gt;&lt;P&gt;_raw&amp;nbsp; :&amp;nbsp;"bla bla bla" &lt;STRONG&gt;&lt;FONT color="#339966"&gt;&amp;lt;= OK&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;meta "input.***" &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;= to suppress&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;meta "log.***" &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;= to suppress&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;meta&amp;nbsp;"@metadata.beat"&amp;nbsp;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;&amp;lt;= to keep&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;meta "@metadata.version"&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;= to suppress&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;meta "message"&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;= to suppress&lt;BR /&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;meta "fields.***" &lt;/FONT&gt;&lt;STRONG&gt;&amp;lt;= to suppress&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;props.conf on the UF&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;SHOULD_LINEMERGE = false&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NO_BINARY_CHECK = true&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;CHARSET = AUTO&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;KV_MODE = none&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;AUTO_KV_JSON = false&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INDEXED_EXTRACTIONS = JSON&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRANSFORMS-x = set_host set_source set_sourcetype&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRANSFORMS-y = extract_message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRANSFORMS-z = remove_metadata&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;transforms.conf on the UF&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[extract_message]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SOURCE_KEY = field:message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;REGEX = (.*)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FORMAT = $1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEST_KEY = _raw&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[set_host]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SOURCE_KEY = field:fields.host&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;REGEX = (.*)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FORMAT = host::$1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEST_KEY = MetaData:Host&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[set_source]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SOURCE_KEY = field:log.file&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;REGEX = (.*)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FORMAT = source::$1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEST_KEY = MetaData:Source&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[set_sourcetype]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SOURCE_KEY = fields:fields.type,fields.type2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;REGEX = (.*)\s(.*)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FORMAT = sourcetype::$1:$2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEST_KEY = MetaData:Sourcetype&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[remove_message]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SOURCE_KEY = _meta:message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;REGEX = (.*)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEST_KEY = queue&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FORMAT = nullQueue&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 12:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569685#M101007</guid>
      <dc:creator>pck_npluyaud</dc:creator>
      <dc:date>2021-10-05T12:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Json datas selection and meta removal</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569706#M101010</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;FORMAT = nullQueue&lt;/FONT&gt; setting is for entire events, not individual pieces of text.&amp;nbsp; To remove text, I recommend using &lt;FONT face="courier new,courier"&gt;SEDCMD&lt;/FONT&gt;.&amp;nbsp; I also recommend retaining keywords to make parsing easier at search time.&lt;/P&gt;&lt;P&gt;Try these settings in props.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SEDCMD-noinput = s/"input":\{[\s\S]+?},//
SEDCMD-nolog = s/"log":\{[\s\S]+?},//
SEDCMD-nofields = s/"fields":\{[\s\S]+?},?//
SEDCMD-noversion = s/,\s+"version":"[\s\S]+?"//&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 05 Oct 2021 13:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569706#M101010</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-05T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Json datas selection and meta removal</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569717#M101012</link>
      <description>&lt;P&gt;I put the rule i the props.conf in the UF. But same result , the _meta "input.type" is not removed.&lt;/P&gt;&lt;P&gt;Another point, the sedcmd should be general : the json schema can never be the same (comma non at the same place)&lt;/P&gt;&lt;P&gt;SHOULD_LINEMERGE = false&lt;BR /&gt;NO_BINARY_CHECK = true&lt;BR /&gt;CHARSET = AUTO&lt;BR /&gt;KV_MODE = none&lt;BR /&gt;AUTO_KV_JSON = false&lt;BR /&gt;INDEXED_EXTRACTIONS = JSON&lt;BR /&gt;TRANSFORMS-x = remove_events set_host set_source set_sourcetype&lt;BR /&gt;TRANSFORMS-y = extract_message&lt;BR /&gt;SEDCMD-noinput = s/"input":\{[\s\S]+?},//&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16280i9DE9C46CF4D173B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="a.png" alt="a.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 15:23:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569717#M101012</guid>
      <dc:creator>pck_npluyaud</dc:creator>
      <dc:date>2021-10-05T15:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Json datas selection and meta removal</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569734#M101013</link>
      <description>&lt;P&gt;These props.conf settings MUST go on the first full Splunk Enterprise instance (HF or indexer) that sees the data.&amp;nbsp; The UF will ignore all of them.&amp;nbsp; Perhaps this is why the original props.conf settings didn't work.&lt;/P&gt;&lt;P&gt;To make the comma optional, insert a ? after the comma in the SEDCMD.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 17:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-datas-selection-and-meta-removal/m-p/569734#M101013</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-05T17:07:37Z</dc:date>
    </item>
  </channel>
</rss>

