<?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 Help extracting a field from raw data and generating a count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-extracting-a-field-from-raw-data-and-generating-a-count/m-p/367931#M108463</link>
    <description>&lt;P&gt;For  a simple query -&lt;/P&gt;

&lt;P&gt;index=app_au ms.ab=true&lt;/P&gt;

&lt;P&gt;I have a raw output of - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"dtm":"2017-09-27 10:44:42.389 PDT", "logger":"audit.com.foo.store.RequestAuditLog", "app":{"p":8523,"a":"WebNav","e":"prod.live.txn","h":"rn2-rosp-pr02-lweb04.fno.foo.com","dc":"fno"}, "msg":{"ab":true,"forwApp":"entry","resTime":12,"dx":1,"mc":{"s":"consumer","gp":"ww.emea.de","gc":"DEU"},"reqHost":"secure.foo.com","resStatus":"503","forwUrl":"urls-entry.loginJSON","d":"0ef7e2b2-f0f2-4a3e-9098-6812d9546b1b","ip":"92.211.19.113","reqPat":"///login/sign_in","reqApp":"entry","r":"c461b663-7102-4431-a0fc-fff7c472b748","t":1506534282377,"sampleWeight":1.0,"reqUrl":"urls-entry.loginJSON"}}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to extract the ip field and get a list of IP with counts.&lt;BR /&gt;
Please help.&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
Vik&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2017 21:04:24 GMT</pubDate>
    <dc:creator>vik78</dc:creator>
    <dc:date>2017-09-27T21:04:24Z</dc:date>
    <item>
      <title>Help extracting a field from raw data and generating a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-extracting-a-field-from-raw-data-and-generating-a-count/m-p/367931#M108463</link>
      <description>&lt;P&gt;For  a simple query -&lt;/P&gt;

&lt;P&gt;index=app_au ms.ab=true&lt;/P&gt;

&lt;P&gt;I have a raw output of - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"dtm":"2017-09-27 10:44:42.389 PDT", "logger":"audit.com.foo.store.RequestAuditLog", "app":{"p":8523,"a":"WebNav","e":"prod.live.txn","h":"rn2-rosp-pr02-lweb04.fno.foo.com","dc":"fno"}, "msg":{"ab":true,"forwApp":"entry","resTime":12,"dx":1,"mc":{"s":"consumer","gp":"ww.emea.de","gc":"DEU"},"reqHost":"secure.foo.com","resStatus":"503","forwUrl":"urls-entry.loginJSON","d":"0ef7e2b2-f0f2-4a3e-9098-6812d9546b1b","ip":"92.211.19.113","reqPat":"///login/sign_in","reqApp":"entry","r":"c461b663-7102-4431-a0fc-fff7c472b748","t":1506534282377,"sampleWeight":1.0,"reqUrl":"urls-entry.loginJSON"}}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to extract the ip field and get a list of IP with counts.&lt;BR /&gt;
Please help.&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
Vik&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 21:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-extracting-a-field-from-raw-data-and-generating-a-count/m-p/367931#M108463</guid>
      <dc:creator>vik78</dc:creator>
      <dc:date>2017-09-27T21:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help extracting a field from raw data and generating a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-extracting-a-field-from-raw-data-and-generating-a-count/m-p/367932#M108464</link>
      <description>&lt;P&gt;Try this run-anywhere sample ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw= "{\"dtm\":\"2017-09-27 10:44:42.389 PDT\", \"logger\":\"audit.com.foo.store.RequestAuditLog\", \"app\":{\"p\":8523,\"a\":\"WebNav\",\"e\":\"prod.live.txn\",\"h\":\"rn2-rosp-pr02-lweb04.fno.foo.com\",\"dc\":\"fno\"}, \"msg\":{\"ab\":true,\"forwApp\":\"entry\",\"resTime\":12,\"dx\":1,\"mc\":{\"s\":\"consumer\",\"gp\":\"ww.emea.de\",\"gc\":\"DEU\"},\"reqHost\":\"secure.foo.com\",\"resStatus\":\"503\",\"forwUrl\":\"urls-entry.loginJSON\",\"d\":\"0ef7e2b2-f0f2-4a3e-9098-6812d9546b1b\",\"ip\":\"92.211.19.113\",\"reqPat\":\"///login/sign_in\",\"reqApp\":\"entry\",\"r\":\"c461b663-7102-4431-a0fc-fff7c472b748\",\"t\":1506534282377,\"sampleWeight\":1.0,\"reqUrl\":\"urls-entry.loginJSON\"}}"
| rename COMMENT as "The above just enters your test data"

| rename COMMENT as "NOw we read the JSON, rename the ip field, and count them up"
| spath
| rename msg.ip as ip
| stats count as ipcount by ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Sep 2017 00:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-extracting-a-field-from-raw-data-and-generating-a-count/m-p/367932#M108464</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-28T00:20:32Z</dc:date>
    </item>
  </channel>
</rss>

