<?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: Field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515219#M144648</link>
    <description>&lt;P&gt;Just ensure that you have _time to your data and then it should be work.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Thu, 20 Aug 2020 13:55:08 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2020-08-20T13:55:08Z</dc:date>
    <item>
      <title>Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515156#M144622</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm having issues achieving to extract fields from a sample in Splunk.&lt;/P&gt;&lt;P&gt;I went to "extract fields", I have the first one, but I don't know how to continue.&lt;/P&gt;&lt;P&gt;Here the sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[{"Type":"Attention","ABUSE":18,"GSD 24x7":1,"CLOUD":0,"DC":0,"ECL":0,"ITMS":0,"NET":0,"RFO":17,"Total":36},{"Type":"Active","ABUSE":0,"GSD 24x7":22,"CLOUD":38,"DC":5,"ECL":1,"ITMS":0,"NET":12,"RFO":2,"Total":80},{"Type":"Total","ABUSE":18,"GSD 24x7":23,"CLOUD":38,"DC":5,"ECL":1,"ITMS":0,"NET":12,"RFO":19,"Total":116},{"Type":"P1","ABUSE":0,"GSD 24x7":0,"CLOUD":0,"DC":0,"ECL":0,"ITMS":0,"NET":0,"RFO":6,"Total":6},{"Type":"P2","ABUSE":0,"GSD 24x7":1,"CLOUD":0,"DC":0,"ECL":0,"ITMS":0,"NET":0,"RFO":10,"Total":11},{"Type":"P3\/4","ABUSE":18,"GSD 24x7":0,"CLOUD":0,"DC":0,"ECL":0,"ITMS":0,"NET":0,"RFO":1,"Total":19}]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From that, I would like to be able to calculate averages and sums up from the number, having two fields:&lt;/P&gt;&lt;P&gt;- Team. Values: ABUSE, CLOUD, GSD 24x7, NET, RFO...&lt;/P&gt;&lt;P&gt;- Type: Attention, Active...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with this in the search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;Type&amp;gt;((\.*:\")\w+))"|&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the Type, but no idea on how to proceed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you all in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 09:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515156#M144622</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-08-20T09:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515158#M144623</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/62814"&gt;@marina_rovira&lt;/a&gt;&amp;nbsp;, add another rex for extracting team with mutivalues like&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Team. Values: ABUSE, CLOUD, GSD 24x7, NET, RFO...&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|rex max_match=0 "\"(?&amp;lt;team&amp;gt;.[\w\s]+)\":([0-9]|[0-9]+),"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Please upvote my response, if it resolves the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 10:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515158#M144623</guid>
      <dc:creator>Nisha18789</dc:creator>
      <dc:date>2020-08-20T10:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515186#M144635</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;as your data seems to be valid JSON it's easiest to handle that way.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;index=_internal | head 1
| eval _raw = "[{\"Type\":\"Attention\",\"ABUSE\":18,\"GSD 24x7\":1,\"CLOUD\":0,\"DC\":0,\"ECL\":0,\"ITMS\":0,\"NET\":0,\"RFO\":17,\"Total\":36},{\"Type\":\"Active\",\"ABUSE\":0,\"GSD 24x7\":22,\"CLOUD\":38,\"DC\":5,\"ECL\":1,\"ITMS\":0,\"NET\":12,\"RFO\":2,\"Total\":80},{\"Type\":\"Total\",\"ABUSE\":18,\"GSD 24x7\":23,\"CLOUD\":38,\"DC\":5,\"ECL\":1,\"ITMS\":0,\"NET\":12,\"RFO\":19,\"Total\":116},{\"Type\":\"P1\",\"ABUSE\":0,\"GSD 24x7\":0,\"CLOUD\":0,\"DC\":0,\"ECL\":0,\"ITMS\":0,\"NET\":0,\"RFO\":6,\"Total\":6},{\"Type\":\"P2\",\"ABUSE\":0,\"GSD 24x7\":1,\"CLOUD\":0,\"DC\":0,\"ECL\":0,\"ITMS\":0,\"NET\":0,\"RFO\":10,\"Total\":11},{\"Type\":\"P3\/4\",\"ABUSE\":18,\"GSD 24x7\":0,\"CLOUD\":0,\"DC\":0,\"ECL\":0,\"ITMS\":0,\"NET\":0,\"RFO\":1,\"Total\":19}]"
| rename COMMENTS AS "Previous lines generate your sample data, you get it by indes=xxx"
| spath
| rename {}.* as json_*
| table json_*&lt;/LI-CODE&gt;&lt;P&gt;Unfortunately I'm not getting up what/how you want to calculate those values.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 11:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515186#M144635</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-20T11:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515213#M144645</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks a lot, it looks like a table now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This json gets data every 12 hours. What I pretend to do is to perform some stats about the difference between the one I got the last 12 hours to check difference and how the shifts are performing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it makes sense? I was thinking about to send alerts by e-mail with the stats. But not sure about how I can calculate the stats.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 13:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515213#M144645</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-08-20T13:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515219#M144648</link>
      <description>&lt;P&gt;Just ensure that you have _time to your data and then it should be work.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 13:55:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/515219#M144648</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-20T13:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/517512#M145530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's working perfectly, thanks a lot!&lt;/P&gt;&lt;P&gt;What I was thinking to calculate with this.... This numbers are numbers coming before and after every shift. The simplest calculation to do should be to know the difference between the starting and ending shift. However, I've realized that this won't be that easy. Do you have any idea? If not, I will say no possible to do, I've been request this as an improvement but the main thing is working already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/517512#M145530</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-09-02T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/517524#M145531</link>
      <description>As this is a new requirement, could you create a new question for it wit descriptive title? It’s much easier to found and help other people in community later on.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/517524#M145531</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-02T15:49:43Z</dc:date>
    </item>
  </channel>
</rss>

