<?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 Extractor - extract digit from brackets in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563027#M196157</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237383"&gt;@darspla&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to use a regex to extract the fields you need.&lt;/P&gt;&lt;P&gt;I could be more precise if you share two or three examples of your logs (in text format, not image),&lt;/P&gt;&lt;P&gt;Anyway try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\[\s+(?&amp;lt;users_to_delete&amp;gt;\d+)\s+\] users to delete, \[\s+(?&amp;lt;users_to_add&amp;gt;\d+)\s+\] users to add, \[\s+(?&amp;lt;users_to_update&amp;gt;\d+)\s+\] users to update"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 07:06:50 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-08-12T07:06:50Z</dc:date>
    <item>
      <title>Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563026#M196156</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I would like to extract particular digit from brackets, index it as follows and based on that create stats hourly.&lt;BR /&gt;Each time is picking this up with bracket as a string.&lt;BR /&gt;&lt;BR /&gt;This is service which is making entry every hour, once will recognize to add up will present digit , if not will be 0.&lt;BR /&gt;My goal would be to have stats from every hour on the graph to see how does it changes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="darspla_0-1628751294001.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15541i7C8923F35D2DEC54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="darspla_0-1628751294001.png" alt="darspla_0-1628751294001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 06:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563026#M196156</guid>
      <dc:creator>darspla</dc:creator>
      <dc:date>2021-08-12T06:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563027#M196157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237383"&gt;@darspla&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to use a regex to extract the fields you need.&lt;/P&gt;&lt;P&gt;I could be more precise if you share two or three examples of your logs (in text format, not image),&lt;/P&gt;&lt;P&gt;Anyway try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\[\s+(?&amp;lt;users_to_delete&amp;gt;\d+)\s+\] users to delete, \[\s+(?&amp;lt;users_to_add&amp;gt;\d+)\s+\] users to add, \[\s+(?&amp;lt;users_to_update&amp;gt;\d+)\s+\] users to update"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:06:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563027#M196157</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-08-12T07:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563030#M196159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for quick reply.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;2021-08-12&amp;nbsp;&lt;/SPAN&gt;7:17:34.338 AM 2021-08-12 07:17:34,338+0200 Caesium-1-1 INFO ServiceRunner [c.a.c.d.xxx.cache.xxx] scanned and compared [ 9506 ] users to delete, [ 0 ] users to add, [ 378 ] users to update in DB cache in [ 1166ms ]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="t"&gt;2021-08-12&lt;/SPAN&gt; &lt;SPAN class="t"&gt;06:17:34&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="t"&gt;305&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN class="t"&gt;0200&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Caesium-1-1&lt;/SPAN&gt; &lt;SPAN class="t"&gt;INFO&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ServiceRunner&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN class="t"&gt;c.a.c.d.xxx.cache.xxx&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN class="t a"&gt;&lt;SPAN class="t"&gt;scanned&lt;/SPAN&gt; &lt;SPAN class="t"&gt;and&lt;/SPAN&gt; &lt;SPAN class="t"&gt;compared&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt; [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;9506&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="t a"&gt;, [ &lt;SPAN class="t"&gt;0&lt;/SPAN&gt; ] &lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;add&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;, [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;125&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;update&lt;/SPAN&gt; &lt;SPAN class="t"&gt;in&lt;/SPAN&gt; &lt;SPAN class="t"&gt;DB&lt;/SPAN&gt; &lt;SPAN class="t"&gt;cache&lt;/SPAN&gt; &lt;SPAN class="t"&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;1129ms&lt;/SPAN&gt;&lt;SPAN&gt; ]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563030#M196159</guid>
      <dc:creator>darspla</dc:creator>
      <dc:date>2021-08-12T07:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563033#M196161</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237383"&gt;@darspla&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as you can see at&amp;nbsp;&lt;A href="https://regex101.com/r/hQylcj/1" target="_blank"&gt;https://regex101.com/r/hQylcj/1&lt;/A&gt;&amp;nbsp;the above regex is correct.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563033#M196161</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-08-12T07:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563037#M196162</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Yes, works very nicely. Would you have any idea how to retrieve stats daily from action like below when :&lt;BR /&gt;&lt;SPAN class="t"&gt;"[36972&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t h"&gt;update "&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;9216&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;delete&lt;/SPAN&gt;&lt;SPAN&gt;, [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;2&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; &lt;SPAN class="t"&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;, [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;36972&lt;/SPAN&gt;&lt;SPAN&gt; ] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;users&lt;/SPAN&gt; &lt;SPAN class="t"&gt;to&lt;/SPAN&gt; update &lt;SPAN class="t"&gt;in&lt;/SPAN&gt; &lt;SPAN class="t"&gt;DB&lt;/SPAN&gt; &lt;SPAN class="t"&gt;cache&lt;/SPAN&gt; &lt;SPAN class="t"&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; [ &lt;/SPAN&gt;&lt;SPAN class="t"&gt;6847ms&lt;/SPAN&gt;&lt;SPAN&gt; ]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Retrieve data when is higher than '100' ?&lt;BR /&gt;Bit concern which graph to choose to make it readable for many people.&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Aug 2021 08:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563037#M196162</guid>
      <dc:creator>darspla</dc:creator>
      <dc:date>2021-08-12T08:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563087#M196183</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237383"&gt;@darspla&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't know your logs and your requirements.&lt;/P&gt;&lt;P&gt;I suppose that you could have a time distribution day by day or hour by hour, it depends on how frequently you receive the above logs.&lt;/P&gt;&lt;P&gt;So, if e.e. you receive the above logs once in a day, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex "\[\s+(?&amp;lt;users_to_delete&amp;gt;\d+)\s+\] users to delete, \[\s+(?&amp;lt;users_to_add&amp;gt;\d+)\s+\] users to add, \[\s+(?&amp;lt;users_to_update&amp;gt;\d+)\s+\] users to update"
| timechart span=1d max(users_to_add) AS users_to_add&lt;/LI-CODE&gt;&lt;P&gt;or something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex "\[\s+(?&amp;lt;users_to_delete&amp;gt;\d+)\s+\] users to delete, \[\s+(?&amp;lt;users_to_add&amp;gt;\d+)\s+\] users to add, \[\s+(?&amp;lt;users_to_update&amp;gt;\d+)\s+\] users to update"
| bin span=1d _time
| stats max(users_to_delete) AS users_to_delete max(users_to_add) AS users_to_add max(users_to_update) AS users_to_update BY _time&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 14:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563087#M196183</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-08-12T14:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563151#M196215</link>
      <description>&lt;P&gt;Thanks a lot &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, that gave some vision. Modified in 2 other ways so fetched info needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:17:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563151#M196215</guid>
      <dc:creator>darspla</dc:creator>
      <dc:date>2021-08-13T07:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractor - extract digit from brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563153#M196216</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237383"&gt;@darspla&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time.&lt;/P&gt;&lt;P&gt;If this answer solves your question, please, accept it for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extractor-extract-digit-from-brackets/m-p/563153#M196216</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-08-13T07:32:00Z</dc:date>
    </item>
  </channel>
</rss>

