<?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 How to change IDS logs to JSON format and index in Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-IDS-logs-to-JSON-format-and-index-in-Splunk/m-p/112597#M23601</link>
    <description>&lt;P&gt;Hi, I trying to index ids logs into splunk server however the log is not in good format.&lt;BR /&gt;
How can i reformat the log into json so it will have table for timestamp, event type, src ip, and the rest.&lt;BR /&gt;
I have try to edit props.conf but still the same.&lt;BR /&gt;
Anything should I do get this work.&lt;BR /&gt;
Thanks.&lt;/P&gt;

&lt;P&gt;[suricata]&lt;BR /&gt;
KV_MODE = json&lt;BR /&gt;
NO_BINARY_CHECK = 1 &lt;BR /&gt;
TRUNCATE = 0&lt;/P&gt;

&lt;P&gt;Here my log in splunk server&lt;/P&gt;

&lt;P&gt;Aug 3 23:59:45 192.168.1.200 Aug 3 23:59:43 IDS suricata: {"timestamp":"2014-08-03T23:59:43.946222","event_type":"alert","src_ip":"192.168.20.1","src_port":6000,"dest_ip":"8.8.8.8","dest_port":22,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2001219,"rev":18,"signature":"ET SCAN Potential SSH Scan","category":"Attempted Information Leak","severity":2}}&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:30:00 GMT</pubDate>
    <dc:creator>hermyphang</dc:creator>
    <dc:date>2020-09-28T17:30:00Z</dc:date>
    <item>
      <title>How to change IDS logs to JSON format and index in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-IDS-logs-to-JSON-format-and-index-in-Splunk/m-p/112597#M23601</link>
      <description>&lt;P&gt;Hi, I trying to index ids logs into splunk server however the log is not in good format.&lt;BR /&gt;
How can i reformat the log into json so it will have table for timestamp, event type, src ip, and the rest.&lt;BR /&gt;
I have try to edit props.conf but still the same.&lt;BR /&gt;
Anything should I do get this work.&lt;BR /&gt;
Thanks.&lt;/P&gt;

&lt;P&gt;[suricata]&lt;BR /&gt;
KV_MODE = json&lt;BR /&gt;
NO_BINARY_CHECK = 1 &lt;BR /&gt;
TRUNCATE = 0&lt;/P&gt;

&lt;P&gt;Here my log in splunk server&lt;/P&gt;

&lt;P&gt;Aug 3 23:59:45 192.168.1.200 Aug 3 23:59:43 IDS suricata: {"timestamp":"2014-08-03T23:59:43.946222","event_type":"alert","src_ip":"192.168.20.1","src_port":6000,"dest_ip":"8.8.8.8","dest_port":22,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2001219,"rev":18,"signature":"ET SCAN Potential SSH Scan","category":"Attempted Information Leak","severity":2}}&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-IDS-logs-to-JSON-format-and-index-in-Splunk/m-p/112597#M23601</guid>
      <dc:creator>hermyphang</dc:creator>
      <dc:date>2020-09-28T17:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change IDS logs to JSON format and index in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-IDS-logs-to-JSON-format-and-index-in-Splunk/m-p/112598#M23602</link>
      <description>&lt;P&gt;Hi hermyphang,&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;KV_MODE&lt;/CODE&gt; in props.conf is only for search-time field extraction not index-time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = [none|auto|auto_escaped|multi|json|xml]
 * Used for search-time field extractions only.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also bear in mind, that the log format must be correct JSON and not some semi-fake JSON like log - you can check the format &lt;A href="http://jsonlint.com"&gt;here&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Use the TRANSFORMS field extraction type to create index-time field extractions. &lt;/P&gt;

&lt;P&gt;NOTE: Index-time field extractions have performance implications. Creating additions to&lt;BR /&gt;
Splunk's default set of indexed fields is ONLY recommended in specific circumstances.&lt;/P&gt;

&lt;P&gt;Whenever possible, extract fields only at search time.&lt;/P&gt;

&lt;P&gt;hope that helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Sat, 06 Sep 2014 06:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-IDS-logs-to-JSON-format-and-index-in-Splunk/m-p/112598#M23602</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-09-06T06:17:33Z</dc:date>
    </item>
  </channel>
</rss>

