<?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: Grouping by the words in a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701994#M238079</link>
    <description>&lt;P&gt;Replace&amp;nbsp;searchmatch(text1_value,"Load Balancer") with&amp;nbsp;searchmatch("text1_value=\"*Load Balancer*\""), and so on. &amp;nbsp;BTW, rename is not needed for searchmatch because it accepts any syntax/shortcut that the search command accepts. (Like search, it also does case-insensitive match.) &amp;nbsp;For example,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=monitor name="Manager - Error" text2.value="*Rerun"  text1.value IN ("*Load Balancer*", "*Endpoints*") earliest=-1d latest=now
| stats 
     count(eval(searchmatch("text1.value=\"*Load Balancer*\""))) AS LoadBalancer
     count(eval(searchmatch("text1.value = \"*Endpoints*\""))) AS Endpoints&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2024 19:25:53 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-10-15T19:25:53Z</dc:date>
    <item>
      <title>Grouping by the words in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701916#M238049</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;&lt;BR /&gt;I have a below query, I want to group and count by two different words, one group per word, in a field "text1.value"&amp;nbsp; which are&amp;nbsp;Load Balancer and Endpoints words are located somewhere in a string. Also I want to count how many of them occured per one day.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is this possible?&lt;BR /&gt;&lt;BR /&gt;index=monitor name="Manager - Error" text2.value="*Rerun"&amp;nbsp;&amp;nbsp;text1.value="*Load Balancer*" OR "*Endpoints*"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 12:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701916#M238049</guid>
      <dc:creator>H2ck1ngPr13sT</dc:creator>
      <dc:date>2024-10-15T12:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by the words in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701923#M238052</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271020"&gt;@H2ck1ngPr13sT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if you want your count for one day, you could use something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=monitor name="Manager - Error" text2.value="*Rerun"  text1.value IN ("*Load Balancer*", "*Endpoints*") earliest=-1d latest=now
| rename text1.value AS text1_value
| stats 
     count(eval(searchmatch(text1_value,"Load Balancer"))) AS LoadBalancer
     count(eval(searchmatch(text1_value,"Endpoints"))) AS Endpoints&lt;/LI-CODE&gt;&lt;P&gt;if instead yu want the values for each day in the last 7 days, you could use something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=monitor name="Manager - Error" text2.value="*Rerun"  text1.value IN ("*Load Balancer*", "*Endpoints*") earliest=-17 latest=now
| rename text1.value AS text1_value
| eval type=if(searchmatch(text1_value,"Load Balancer"),"LoadBalancer", "Endpoints")
| timechart span=1d count BY type&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 12:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701923#M238052</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-10-15T12:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by the words in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701975#M238076</link>
      <description>&lt;P&gt;Unfortunately, I'm getting error: "&lt;SPAN&gt;Error in 'EvalCommand': The arguments to the 'searchmatch' function are invalid." I've tried both solutions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 16:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701975#M238076</guid>
      <dc:creator>H2ck1ngPr13sT</dc:creator>
      <dc:date>2024-10-15T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by the words in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701994#M238079</link>
      <description>&lt;P&gt;Replace&amp;nbsp;searchmatch(text1_value,"Load Balancer") with&amp;nbsp;searchmatch("text1_value=\"*Load Balancer*\""), and so on. &amp;nbsp;BTW, rename is not needed for searchmatch because it accepts any syntax/shortcut that the search command accepts. (Like search, it also does case-insensitive match.) &amp;nbsp;For example,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=monitor name="Manager - Error" text2.value="*Rerun"  text1.value IN ("*Load Balancer*", "*Endpoints*") earliest=-1d latest=now
| stats 
     count(eval(searchmatch("text1.value=\"*Load Balancer*\""))) AS LoadBalancer
     count(eval(searchmatch("text1.value = \"*Endpoints*\""))) AS Endpoints&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 19:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/701994#M238079</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-10-15T19:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by the words in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/702034#M238085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271020"&gt;@H2ck1ngPr13sT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry I confused searchmatch with match, please use match function.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 07:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Grouping-by-the-words-in-a-field/m-p/702034#M238085</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-10-16T07:04:50Z</dc:date>
    </item>
  </channel>
</rss>

