<?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 Search results 5 times actual events for JSON data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Search-results-5-times-actual-events-for-JSON-data/m-p/647207#M110054</link>
    <description>&lt;P&gt;Greetings community experts&lt;/P&gt;&lt;P&gt;Search results for JSON data received via curl and Rest API from AWS are five times the actual events. Seeking help understanding why events are counted more than once.&lt;/P&gt;&lt;P&gt;Indexed using sourcetype _JSON&lt;/P&gt;&lt;P&gt;Looking at the data Splunk reports 4 deviceConnectivityUpdate events and 1 deviceStateEvent which agrees with the data.&lt;/P&gt;&lt;P&gt;However when I run stats count by("hits{}._source.logType") by "hits{}._source.userName I get 5x count of events.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same is true with this search using dedup&lt;/P&gt;&lt;P&gt;| eval DCU=mvfilter(match('hits{}._source.logType',"deviceConnectivityUpdate")) | eval DSE=mvfilter(match('hits{}._source.logType',"deviceStateEvent")) | dedup DCU DSE | stats count(DCU) count(DSE) by hits{}._source.userName&lt;/P&gt;&lt;P&gt;The data _raw&lt;/P&gt;&lt;P&gt;{"total":{"value":5,"relation":"eq"},"max_score":1,"hits":[{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"zbIdu4gBwP_vIV4KexH0","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390007","userName":"gary.whitlocks22","cloudTimestampUTC":"2023-06-14T18:14:11Z","isDeviceOffline":false}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"z7Ieu4gBwP_vIV4KARGG","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390007","userName":"gary.whitlocks22","cloudTimestampUTC":"2023-06-14T18:14:45Z","isDeviceOffline":true}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"0LIeu4gBwP_vIV4KHxHn","_score":1,"_source":{"version":1,"logType":"deviceStateEvent","deviceSerialNumber":"4931490086","userName":"NSSS","cloudTimestampUTC":"2023-06-14T18:14:53Z","deviceTimestampUTC":"2023-06-14T18:14:55Z","batteryPercent":49,"isCheckIn":false,"isAntiSurveillanceViolation":false,"isLowBatteryViolation":false,"isCellularViolation":false,"isDseDelayed":false,"bleMacAddress":"7d:8e:1a:be:92:5a","cellIpv4Address":"0.0.0.0","cellIpv6Address":"::"}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"zrIdu4gBwP_vIV4KsxFQ","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390006","userName":"PennyAndroid","cloudTimestampUTC":"2023-06-14T18:14:25Z","isDeviceOffline":true}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"0bIeu4gBwP_vIV4KhBGr","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390006","userName":"PennyAndroid","cloudTimestampUTC":"2023-06-14T18:15:19Z","isDeviceOffline":false}}]}&lt;/P&gt;&lt;P&gt;JSON format&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"total": {&lt;BR /&gt;"value": 5,&lt;BR /&gt;"relation": "eq"&lt;BR /&gt;},&lt;BR /&gt;"max_score": 1,&lt;BR /&gt;"hits": [&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "zbIdu4gBwP_vIV4KexH0",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390007",&lt;BR /&gt;"userName": "gary.whitlocks22",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:11Z",&lt;BR /&gt;"isDeviceOffline": false&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "z7Ieu4gBwP_vIV4KARGG",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390007",&lt;BR /&gt;"userName": "gary.whitlocks22",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:45Z",&lt;BR /&gt;"isDeviceOffline": true&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "0LIeu4gBwP_vIV4KHxHn",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceStateEvent",&lt;BR /&gt;"deviceSerialNumber": "4931490086",&lt;BR /&gt;"userName": "NSSS",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:53Z",&lt;BR /&gt;"deviceTimestampUTC": "2023-06-14T18:14:55Z",&lt;BR /&gt;"batteryPercent": 49,&lt;BR /&gt;"isCheckIn": false,&lt;BR /&gt;"isAntiSurveillanceViolation": false,&lt;BR /&gt;"isLowBatteryViolation": false,&lt;BR /&gt;"isCellularViolation": false,&lt;BR /&gt;"isDseDelayed": false,&lt;BR /&gt;"bleMacAddress": "7d:8e:1a:be:92:5a",&lt;BR /&gt;"cellIpv4Address": "0.0.0.0",&lt;BR /&gt;"cellIpv6Address": "::"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "zrIdu4gBwP_vIV4KsxFQ",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390006",&lt;BR /&gt;"userName": "PennyAndroid",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:25Z",&lt;BR /&gt;"isDeviceOffline": true&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "0bIeu4gBwP_vIV4KhBGr",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390006",&lt;BR /&gt;"userName": "PennyAndroid",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:15:19Z",&lt;BR /&gt;"isDeviceOffline": false&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jun 2023 18:46:42 GMT</pubDate>
    <dc:creator>Seawheels51</dc:creator>
    <dc:date>2023-06-15T18:46:42Z</dc:date>
    <item>
      <title>Search results 5 times actual events for JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-results-5-times-actual-events-for-JSON-data/m-p/647207#M110054</link>
      <description>&lt;P&gt;Greetings community experts&lt;/P&gt;&lt;P&gt;Search results for JSON data received via curl and Rest API from AWS are five times the actual events. Seeking help understanding why events are counted more than once.&lt;/P&gt;&lt;P&gt;Indexed using sourcetype _JSON&lt;/P&gt;&lt;P&gt;Looking at the data Splunk reports 4 deviceConnectivityUpdate events and 1 deviceStateEvent which agrees with the data.&lt;/P&gt;&lt;P&gt;However when I run stats count by("hits{}._source.logType") by "hits{}._source.userName I get 5x count of events.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same is true with this search using dedup&lt;/P&gt;&lt;P&gt;| eval DCU=mvfilter(match('hits{}._source.logType',"deviceConnectivityUpdate")) | eval DSE=mvfilter(match('hits{}._source.logType',"deviceStateEvent")) | dedup DCU DSE | stats count(DCU) count(DSE) by hits{}._source.userName&lt;/P&gt;&lt;P&gt;The data _raw&lt;/P&gt;&lt;P&gt;{"total":{"value":5,"relation":"eq"},"max_score":1,"hits":[{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"zbIdu4gBwP_vIV4KexH0","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390007","userName":"gary.whitlocks22","cloudTimestampUTC":"2023-06-14T18:14:11Z","isDeviceOffline":false}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"z7Ieu4gBwP_vIV4KARGG","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390007","userName":"gary.whitlocks22","cloudTimestampUTC":"2023-06-14T18:14:45Z","isDeviceOffline":true}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"0LIeu4gBwP_vIV4KHxHn","_score":1,"_source":{"version":1,"logType":"deviceStateEvent","deviceSerialNumber":"4931490086","userName":"NSSS","cloudTimestampUTC":"2023-06-14T18:14:53Z","deviceTimestampUTC":"2023-06-14T18:14:55Z","batteryPercent":49,"isCheckIn":false,"isAntiSurveillanceViolation":false,"isLowBatteryViolation":false,"isCellularViolation":false,"isDseDelayed":false,"bleMacAddress":"7d:8e:1a:be:92:5a","cellIpv4Address":"0.0.0.0","cellIpv6Address":"::"}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"zrIdu4gBwP_vIV4KsxFQ","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390006","userName":"PennyAndroid","cloudTimestampUTC":"2023-06-14T18:14:25Z","isDeviceOffline":true}},{"_index":"index_44444444-4444-4444-4444-444444444444","_id":"0bIeu4gBwP_vIV4KhBGr","_score":1,"_source":{"version":1,"logType":"deviceConnectivityUpdate","deviceSerialNumber":"4931390006","userName":"PennyAndroid","cloudTimestampUTC":"2023-06-14T18:15:19Z","isDeviceOffline":false}}]}&lt;/P&gt;&lt;P&gt;JSON format&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"total": {&lt;BR /&gt;"value": 5,&lt;BR /&gt;"relation": "eq"&lt;BR /&gt;},&lt;BR /&gt;"max_score": 1,&lt;BR /&gt;"hits": [&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "zbIdu4gBwP_vIV4KexH0",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390007",&lt;BR /&gt;"userName": "gary.whitlocks22",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:11Z",&lt;BR /&gt;"isDeviceOffline": false&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "z7Ieu4gBwP_vIV4KARGG",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390007",&lt;BR /&gt;"userName": "gary.whitlocks22",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:45Z",&lt;BR /&gt;"isDeviceOffline": true&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "0LIeu4gBwP_vIV4KHxHn",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceStateEvent",&lt;BR /&gt;"deviceSerialNumber": "4931490086",&lt;BR /&gt;"userName": "NSSS",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:53Z",&lt;BR /&gt;"deviceTimestampUTC": "2023-06-14T18:14:55Z",&lt;BR /&gt;"batteryPercent": 49,&lt;BR /&gt;"isCheckIn": false,&lt;BR /&gt;"isAntiSurveillanceViolation": false,&lt;BR /&gt;"isLowBatteryViolation": false,&lt;BR /&gt;"isCellularViolation": false,&lt;BR /&gt;"isDseDelayed": false,&lt;BR /&gt;"bleMacAddress": "7d:8e:1a:be:92:5a",&lt;BR /&gt;"cellIpv4Address": "0.0.0.0",&lt;BR /&gt;"cellIpv6Address": "::"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "zrIdu4gBwP_vIV4KsxFQ",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390006",&lt;BR /&gt;"userName": "PennyAndroid",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:14:25Z",&lt;BR /&gt;"isDeviceOffline": true&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"_index": "index_44444444-4444-4444-4444-444444444444",&lt;BR /&gt;"_id": "0bIeu4gBwP_vIV4KhBGr",&lt;BR /&gt;"_score": 1,&lt;BR /&gt;"_source": {&lt;BR /&gt;"version": 1,&lt;BR /&gt;"logType": "deviceConnectivityUpdate",&lt;BR /&gt;"deviceSerialNumber": "4931390006",&lt;BR /&gt;"userName": "PennyAndroid",&lt;BR /&gt;"cloudTimestampUTC": "2023-06-14T18:15:19Z",&lt;BR /&gt;"isDeviceOffline": false&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 18:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-results-5-times-actual-events-for-JSON-data/m-p/647207#M110054</guid>
      <dc:creator>Seawheels51</dc:creator>
      <dc:date>2023-06-15T18:46:42Z</dc:date>
    </item>
  </channel>
</rss>

