<?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: index time extraction for json logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543634#M90757</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you please try by adding&amp;nbsp;WRITE_META = true ?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props.conf

[aws:s3]
TRANSFORMS-xyz= s3-trans

transforms.conf

[s3-trans]
REGEX = [\"|\@](\w+)\":[\s]*([^\,\}]+)
FORMAT = $1::$2
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Mar 2021 11:37:10 GMT</pubDate>
    <dc:creator>scelikok</dc:creator>
    <dc:date>2021-03-13T11:37:10Z</dc:date>
    <item>
      <title>index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/542826#M90675</link>
      <description>&lt;P&gt;Hi Splunkers ,&lt;/P&gt;&lt;P&gt;I'm collecting logs from S3&amp;nbsp;through heavy forwarder which are in json format . After indexing i see the logs in below format. i want fields inside the message field to be extracted into individual fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{ [-]&lt;BR /&gt;@timestamp: 2021-03-08T12:55:42.959Z&lt;BR /&gt;@version: 1&lt;BR /&gt;host: XX.XXX.XXX.XXX&lt;BR /&gt;message: &amp;lt;171&amp;gt;Mar 08 13:09:22 LOGSTASH[-]: {"@version":"1","facility_label":"zyx","program":"CRON","logtype":"syslog-prod","priority":86,"tags":["_grokparsefailure"],"pid":"1234","vmd_name":"abc","host":"XX.XXX.XXX.XXX","severity":6,"facility":10,"beat":{"name":"zxz"},"@timestamp":"","type":"xyz","timestamp":"Mar 8 13:09:22","logsource":"abc","severity_label":"Informational","message":"abc: session closed for user root\n"}&lt;BR /&gt;port: 1234&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the&amp;nbsp; following transforms config at HF and it didn't work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;[aws:s3]&lt;BR /&gt;TRANSFORMS-xyz= s3-trans&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;[s3-trans]&lt;BR /&gt;REGEX = [\"|\@](\w+)\":[\s]*([^\,\}]+)&lt;BR /&gt;FORMAT = $1::$2&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 13:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/542826#M90675</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-08T13:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543336#M90720</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp; , &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/221196"&gt;@koshyk&lt;/a&gt;&amp;nbsp;Any help on this topic please ?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 09:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543336#M90720</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-11T09:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543399#M90730</link>
      <description>&lt;P&gt;Can you paste _raw event data here? Just open event -&amp;gt; Event actions -&amp;gt; Show Source&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="soutamo_0-1615475644533.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13273i25A23332AB3CB657/image-size/medium?v=v2&amp;amp;px=400" role="button" title="soutamo_0-1615475644533.png" alt="soutamo_0-1615475644533.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 15:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543399#M90730</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-03-11T15:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543418#M90731</link>
      <description>&lt;P&gt;Raw Event :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"message":"&amp;lt;171&amp;gt;Mar 11 15:58:48 XX.XXX.XXX.XXX LOGSTASH[-]: {\"@version\":\"1\",\"facility_label\":\"user-level\",\"program\":\"audispd\",\"logtype\":\"syslog\",\"priority\":14,\"tags\":[\"_grokparsefailure\"],\"vmd_name\":\"abc\",\"host\":\"XX.XXX.XXX.XXX\",\"severity\":6,\"facility\":1,\"Hostname\":\"abc\",\"beat\":{\"name\":\"abc\"},\"@timestamp\":\"2021-03-11T15:58:48.000Z\",\"type\":\"abc\",\"timestamp\":\"Mar 11 15:58:48\",\"logsource\":\"abc\",\"severity_label\":\"Informational\",\"message\":\"node=abc type=SOCKADDR msg=audit(1615478328.279:1722168): saddr=000000000000000000000000\\n\"}","@timestamp":"2021-03-11T15:50:46.242Z","host":"XX.XXX.XXX.XXX","@version":"1","port":00000}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is how it look syntaxed format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{ [-]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;@timestamp: 2021-03-11T15:50:46.242Z&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;@version: 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;host: XX.XXX.XXX.XXX&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;message: &amp;lt;171&amp;gt;Mar 11 15:58:48 XX.XXX.XXX.XXX LOGSTASH[-]: {"@version":"1","facility_label":"user-level","program":"audispd","logtype":"syslog","priority":14,"tags":["_grokparsefailure"],"vmd_name":"abc","host":"XX.XXX.XXX.XXX","severity":6,"facility":1,"Hostname":"abc","beat":{"name":"abc"},"@timestamp":"2021-03-11T15:58:48.000Z","type":"abc","timestamp":"Mar 11 15:58:48","logsource":"abc","severity_label":"Informational","message":"node=abc type=SOCKADDR msg=audit(1615478328.279:1722168): saddr=000000000000000000000000\n"}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;port: 0000&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 16:09:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543418#M90731</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-11T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543634#M90757</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you please try by adding&amp;nbsp;WRITE_META = true ?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props.conf

[aws:s3]
TRANSFORMS-xyz= s3-trans

transforms.conf

[s3-trans]
REGEX = [\"|\@](\w+)\":[\s]*([^\,\}]+)
FORMAT = $1::$2
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 11:37:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543634#M90757</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-03-13T11:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543966#M90786</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp; it didnt work. Fields are not getting extracted.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543966#M90786</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T09:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543979#M90793</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;As an alternate option i want to remove the the starting characters(marked in Red) from the below log sample .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gets appended in all the logs and i want to remove it before indexing . Could you please help with the props and transforms config&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Raw Event :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;{"message":"&amp;lt;100&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt;Mar 11 15:58:48 XX.XXX.XXX.XXX LOGSTASH[-]: {\"@version\":\"1\",\"facility_label\":\"user-level\",\"program\":\"audispd\",\"logtype\":\"syslog\",\"priority\":14,\"tags\":[\"_grokparsefailure\"],\"vmd_name\":\"abc\",\"host\":\"XX.XXX.XXX.XXX\",\"severity\":6,\"facility\":1,\"Hostname\":\"abc\",\"beat\":{\"name\":\"abc\"},\"@timestamp\":\"2021-03-11T15:58:48.000Z\",\"type\":\"abc\",\"timestamp\":\"Mar 11 15:58:48\",\"logsource\":\"abc\",\"severity_label\":\"Informational\",\"message\":\"node=abc type=SOCKADDR msg=audit(1615478328.279:1722168): saddr=000000000000000000000000\\n\"}","@timestamp":"2021-03-11T15:50:46.242Z","host":"XX.XXX.XXX.XXX","@version":"1","port":00000}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 11:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543979#M90793</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543982#M90794</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;To remove the starting line of the string use SEDCMD in props.conf&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;SEDCMD-reovingmesagestring =s/{"message":"\&amp;lt;\d+\&amp;gt;//g&lt;/P&gt;&lt;P&gt;I am not sure how your data looks like. So if above one doesn't work use the below one.&lt;/P&gt;&lt;P&gt;SEDCMD-string2=s/message:\s+\&amp;lt;\d+\&amp;gt;//g&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543982#M90794</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-16T12:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543988#M90795</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232459"&gt;@Vardhan&lt;/a&gt;&amp;nbsp;Your first regex looks good as it is capturing the intended characters . But after adding that in props.conf at HF .Im still seeing the characters and it is not removed.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 13:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543988#M90795</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T13:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543991#M90796</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;&amp;nbsp;what about the second regex?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 13:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543991#M90796</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-16T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543994#M90797</link>
      <description>&lt;P&gt;Second Regex i didnt try as the regex is not capturing the intended characters. If you look at raw the log , i just want to parse and remove the&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;{"message":"&amp;lt;100&amp;gt;&lt;/STRONG&gt;&amp;nbsp; from the raw log and start with the timestamp instead&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 13:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543994#M90797</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T13:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543995#M90798</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;&amp;nbsp;can you share the screenshot of logs in index and sample log in text format?&lt;/P&gt;&lt;P&gt;And after placing the first regex did you restarted the HF? And did u wait for the new data to come into the index? The props. conf settings will only apply for the new data and not for the existing data in the index.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 13:37:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/543995#M90798</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-16T13:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544008#M90801</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232459"&gt;@Vardhan&lt;/a&gt;&amp;nbsp; There are 2 things I'm looking at .&lt;/P&gt;&lt;P&gt;1. Auto extraction of fields at index time . Check the formatted log file snapshot. It has a nested json .(All the fields inside the message field needs to be extracted)&lt;/P&gt;&lt;P&gt;if option 1 is not possible .&amp;nbsp; Need help in 2nd option&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Parse the incoming raw logs and remove&amp;nbsp; the&amp;nbsp;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;{"message":"&amp;lt;100&amp;gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&lt;FONT color="#000000"&gt;at the &lt;/FONT&gt;&lt;/FONT&gt;beginning&amp;nbsp;of each event. Check raw log snapshot for reference.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Sample log&amp;nbsp; can be seen in other comments.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks in Advance&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544008#M90801</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T14:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544009#M90802</link>
      <description>&lt;P&gt;Raw log format attached&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544009#M90802</guid>
      <dc:creator>spl_unker</dc:creator>
      <dc:date>2021-03-16T14:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: index time extraction for json logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544014#M90804</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36996"&gt;@spl_unker&lt;/a&gt;Can you try the second regex which I gave and restart the HF and see the result how it is working for new data?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-time-extraction-for-json-logs/m-p/544014#M90804</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-16T14:46:34Z</dc:date>
    </item>
  </channel>
</rss>

