<?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 unstructured JSON file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419018#M73878</link>
    <description>&lt;P&gt;Hi sivaranjiniG,&lt;/P&gt;

&lt;P&gt;You can try this one &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [monitor:///var/log/json.log]&lt;BR /&gt;
 sourcetype = myjson&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [myjson]&lt;BR /&gt;
 REPORT-json = report-json,report-json-kv&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [report-json]&lt;BR /&gt;&lt;BR /&gt;
 # This will get the json payload from the logs. &lt;BR /&gt;
 # Put your specific logic if you need. Below is a very basic logic baed on { bracket&lt;BR /&gt;
 REGEX = (?P{.+)&lt;BR /&gt;
 # Manually extract JSON key-value&lt;BR /&gt;
 [report-json-kv]&lt;BR /&gt;&lt;BR /&gt;
 REGEX = \"(\w+)\":[\s]*\"([^\,}\"]+)&lt;BR /&gt;
 FORMAT = $1::$2&lt;BR /&gt;
 MV_ADD = true&lt;/P&gt;

&lt;P&gt;Original Source : &lt;A href="https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs-json-mixed-with.html"&gt;https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs-json-mixed-with.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Oct 2018 02:53:12 GMT</pubDate>
    <dc:creator>iamarkaprabha</dc:creator>
    <dc:date>2018-10-08T02:53:12Z</dc:date>
    <item>
      <title>index unstructured JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419016#M73876</link>
      <description>&lt;P&gt;i have this following content in my JSON file need to break the event with stats&lt;/P&gt;

&lt;P&gt;Please Help construct props.conf &lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
  "type": "AAA",&lt;BR /&gt;
"name": "AAA AAA",&lt;BR /&gt;
"path": "",&lt;BR /&gt;
"pathFormatted": "AAA-AAA-AAA",&lt;BR /&gt;
"stats": {&lt;BR /&gt;
    "name": "Global AAA",&lt;BR /&gt;
    "numberOfRequests": {&lt;BR /&gt;
        "total": 175,&lt;BR /&gt;
        "ok": 167,&lt;BR /&gt;
        "ko": 8&lt;BR /&gt;
    },&lt;BR /&gt;
    "minResponseTime": {&lt;BR /&gt;
        "total": 147,&lt;BR /&gt;
        "ok": 147,&lt;BR /&gt;
        "ko": 179&lt;BR /&gt;
    },&lt;BR /&gt;
    "maxResponseTime": {&lt;BR /&gt;
        "total": 60006,&lt;BR /&gt;
        "ok": 21336,&lt;BR /&gt;
        "ko": 60006&lt;BR /&gt;
    },&lt;BR /&gt;
    "meanResponseTime": {&lt;BR /&gt;
        "total": 1869,&lt;BR /&gt;
        "ok": 1570,&lt;BR /&gt;
        "ko": 8118&lt;BR /&gt;
    },&lt;BR /&gt;
    "standardDeviation": {&lt;BR /&gt;
        "total": 5150,&lt;BR /&gt;
        "ok": 2719,&lt;BR /&gt;
        "ko": 19619&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles1": {&lt;BR /&gt;
        "total": 1948,&lt;BR /&gt;
        "ok": 1958,&lt;BR /&gt;
        "ko": 1566&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles2": {&lt;BR /&gt;
        "total": 2339,&lt;BR /&gt;
        "ok": 2336,&lt;BR /&gt;
        "ko": 19133&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles3": {&lt;BR /&gt;
        "total": 4868,&lt;BR /&gt;
        "ok": 4800,&lt;BR /&gt;
        "ko": 39569&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles4": {&lt;BR /&gt;
        "total": 19735,&lt;BR /&gt;
        "ok": 15398,&lt;BR /&gt;
        "ko": 55919&lt;BR /&gt;
    },&lt;BR /&gt;
    "group1": {&lt;BR /&gt;
        "name": "t &amp;lt; 5000 ms",&lt;BR /&gt;
        "count": 161,&lt;BR /&gt;
        "percentage": 92&lt;BR /&gt;
    },&lt;BR /&gt;
    "group2": {&lt;BR /&gt;
        "name": "5000 ms &amp;lt; t &amp;lt; 7500 ms",&lt;BR /&gt;
        "count": 1,&lt;BR /&gt;
        "percentage": 1&lt;BR /&gt;
    },&lt;BR /&gt;
    "group3": {&lt;BR /&gt;
        "name": "t &amp;gt; 7500 ms",&lt;BR /&gt;
        "count": 5,&lt;BR /&gt;
        "percentage": 3&lt;BR /&gt;
    },&lt;BR /&gt;
    "group4": {&lt;BR /&gt;
        "name": "failed",&lt;BR /&gt;
        "count": 8,&lt;BR /&gt;
        "percentage": 5&lt;BR /&gt;
    },&lt;BR /&gt;
    "meanNumberOfRequestsPerSecond": {&lt;BR /&gt;
        "total": 0.12455516014234876,&lt;BR /&gt;
        "ok": 0.11886120996441281,&lt;BR /&gt;
        "ko": 0.0056939501779359435&lt;BR /&gt;
    }&lt;BR /&gt;
},&lt;BR /&gt;
"contents": {&lt;BR /&gt;
"AAA-AAA": {&lt;BR /&gt;
          "type": "AAA",&lt;BR /&gt;
"name": "AAA",&lt;BR /&gt;
"path": "AAA",&lt;BR /&gt;
"pathFormatted": "AAA-0f98b",&lt;BR /&gt;
"stats": {&lt;BR /&gt;
    "name": "AAA",&lt;BR /&gt;
    "numberOfRequests": {&lt;BR /&gt;
        "total": 5,&lt;BR /&gt;
        "ok": 5,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "minResponseTime": {&lt;BR /&gt;
        "total": 4759,&lt;BR /&gt;
        "ok": 4759,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "maxResponseTime": {&lt;BR /&gt;
        "total": 5361,&lt;BR /&gt;
        "ok": 5361,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "meanResponseTime": {&lt;BR /&gt;
        "total": 4984,&lt;BR /&gt;
        "ok": 4984,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "standardDeviation": {&lt;BR /&gt;
        "total": 210,&lt;BR /&gt;
        "ok": 210,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles1": {&lt;BR /&gt;
        "total": 4997,&lt;BR /&gt;
        "ok": 4997,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles2": {&lt;BR /&gt;
        "total": 5215,&lt;BR /&gt;
        "ok": 5215,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles3": {&lt;BR /&gt;
        "total": 5288,&lt;BR /&gt;
        "ok": 5288,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "percentiles4": {&lt;BR /&gt;
        "total": 5346,&lt;BR /&gt;
        "ok": 5346,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "group1": {&lt;BR /&gt;
        "name": "t &amp;lt; 5000 ms",&lt;BR /&gt;
        "count": 4,&lt;BR /&gt;
        "percentage": 80&lt;BR /&gt;
    },&lt;BR /&gt;
    "group2": {&lt;BR /&gt;
        "name": "5000 ms &amp;lt; t &amp;lt; 7500 ms",&lt;BR /&gt;
        "count": 1,&lt;BR /&gt;
        "percentage": 20&lt;BR /&gt;
    },&lt;BR /&gt;
    "group3": {&lt;BR /&gt;
        "name": "t &amp;gt; 7500 ms",&lt;BR /&gt;
        "count": 0,&lt;BR /&gt;
        "percentage": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "group4": {&lt;BR /&gt;
        "name": "failed",&lt;BR /&gt;
        "count": 0,&lt;BR /&gt;
        "percentage": 0&lt;BR /&gt;
    },&lt;BR /&gt;
    "meanNumberOfRequestsPerSecond": {&lt;BR /&gt;
        "total": 0.0035587188612099642,&lt;BR /&gt;
        "ok": 0.0035587188612099642,&lt;BR /&gt;
        "ko": 0&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;BR /&gt;
}&lt;BR /&gt;
}&lt;BR /&gt;
}&lt;/P&gt;</description>
      <pubDate>Sun, 07 Oct 2018 14:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419016#M73876</guid>
      <dc:creator>sivaranjiniG</dc:creator>
      <dc:date>2018-10-07T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: index unstructured JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419017#M73877</link>
      <description>&lt;P&gt;If you want to break events before stats then try in props.conf-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetypename]
BREAK_ONLY_BEFORE = stats
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Oct 2018 15:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419017#M73877</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-07T15:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: index unstructured JSON file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419018#M73878</link>
      <description>&lt;P&gt;Hi sivaranjiniG,&lt;/P&gt;

&lt;P&gt;You can try this one &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [monitor:///var/log/json.log]&lt;BR /&gt;
 sourcetype = myjson&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [myjson]&lt;BR /&gt;
 REPORT-json = report-json,report-json-kv&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [report-json]&lt;BR /&gt;&lt;BR /&gt;
 # This will get the json payload from the logs. &lt;BR /&gt;
 # Put your specific logic if you need. Below is a very basic logic baed on { bracket&lt;BR /&gt;
 REGEX = (?P{.+)&lt;BR /&gt;
 # Manually extract JSON key-value&lt;BR /&gt;
 [report-json-kv]&lt;BR /&gt;&lt;BR /&gt;
 REGEX = \"(\w+)\":[\s]*\"([^\,}\"]+)&lt;BR /&gt;
 FORMAT = $1::$2&lt;BR /&gt;
 MV_ADD = true&lt;/P&gt;

&lt;P&gt;Original Source : &lt;A href="https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs-json-mixed-with.html"&gt;https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs-json-mixed-with.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 02:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/index-unstructured-JSON-file/m-p/419018#M73878</guid>
      <dc:creator>iamarkaprabha</dc:creator>
      <dc:date>2018-10-08T02:53:12Z</dc:date>
    </item>
  </channel>
</rss>

