<?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: How to alert if all the queues for a respective indexer gets full? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625276#M217359</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/135347"&gt;@Navanitha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing tcpin_queue* and counting the number of distinct base queue names by Splunk instance should allow you to alert when all 4 queues across any number of pipelines have breached your threshold:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| rest splunk_server_group=dmc_group_indexer /services/server/introspection/queues
| search ```title=tcpin_queue* OR``` title=parsingQueue* OR title=aggQueue* OR title=typingQueue* OR title=indexQueue*
| eval fifteen_min_fill_perc = round(value_cntr3_size_bytes_lookback / max_size_bytes * 100,2) 
| fields title fifteen_min_fill_perc splunk_server 
| where fifteen_min_fill_perc &amp;gt; 99
| rex field=title "(?&amp;lt;basename&amp;gt;[^.]+)" 
| eventstats dc(basename) as distinct_count by splunk_server
| where distinct_count==4
| fields - basename distinct_count
| rename splunk_server as Instance, title AS "Queue name", fifteen_min_fill_perc AS "Average queue fill percentage (last 15min)"&lt;/LI-CODE&gt;&lt;P&gt;I've added the rex, eventstats, where, and fields commands on lines 6-9 to your original search.&lt;/P&gt;&lt;P&gt;In my own environments, I also keep an eye on blocked queues:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;|  tstats latest(PREFIX(max_size_kb=)) as max_size_kb latest(PREFIX(largest_size=)) as largest_size where index=_internal source=*metrics.log* TERM(group=queue) TERM(blocked=true) by host PREFIX(name=)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 26 Dec 2022 16:22:52 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2022-12-26T16:22:52Z</dc:date>
    <item>
      <title>How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625257#M217357</link>
      <description>&lt;P&gt;I need to create an alert when all the below queues are at 100% for respective indexer.&amp;nbsp; For this I am using "DMC Alert - Saturated Event-Processing Queues" inbuilt alert but need to tweak it a little bit to alert when all the 4 queues "&amp;nbsp;&lt;SPAN&gt;aggQueue.*"&amp;nbsp; "indexQueue.0*"&amp;nbsp; "parsingQueue.*" and "typingQueue.0" are at 100% for that host.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Query -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest splunk_server_group=dmc_group_indexer /services/server/introspection/queues
| search title=tcpin_queue* OR title=parsingQueue* OR title=aggQueue* OR title=typingQueue* OR title=indexQueue*
| eval fifteen_min_fill_perc = round(value_cntr3_size_bytes_lookback / max_size_bytes * 100,2)
| fields title fifteen_min_fill_perc splunk_server
| where fifteen_min_fill_perc &amp;gt; 99
| rename splunk_server as Instance, title AS "Queue name", fifteen_min_fill_perc AS "Average queue fill percentage (last 15min)"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Output -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Queue name Average queue fill percentage (last 15min) Instance&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;aggQueue.0&lt;/TD&gt;
&lt;TD&gt;99.98&lt;/TD&gt;
&lt;TD&gt;x&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;aggQueue.1&lt;/TD&gt;
&lt;TD&gt;100.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t;x&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;aggQueue.0&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;aggQueue.1&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;aggQueue.2&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;indexQueue.0&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;indexQueue.1&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;indexQueue.2&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;parsingQueue.0&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;parsingQueue.1&lt;/TD&gt;
&lt;TD&gt;100.00&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 03:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625257#M217357</guid>
      <dc:creator>Navanitha</dc:creator>
      <dc:date>2022-12-29T03:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625276#M217359</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/135347"&gt;@Navanitha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing tcpin_queue* and counting the number of distinct base queue names by Splunk instance should allow you to alert when all 4 queues across any number of pipelines have breached your threshold:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| rest splunk_server_group=dmc_group_indexer /services/server/introspection/queues
| search ```title=tcpin_queue* OR``` title=parsingQueue* OR title=aggQueue* OR title=typingQueue* OR title=indexQueue*
| eval fifteen_min_fill_perc = round(value_cntr3_size_bytes_lookback / max_size_bytes * 100,2) 
| fields title fifteen_min_fill_perc splunk_server 
| where fifteen_min_fill_perc &amp;gt; 99
| rex field=title "(?&amp;lt;basename&amp;gt;[^.]+)" 
| eventstats dc(basename) as distinct_count by splunk_server
| where distinct_count==4
| fields - basename distinct_count
| rename splunk_server as Instance, title AS "Queue name", fifteen_min_fill_perc AS "Average queue fill percentage (last 15min)"&lt;/LI-CODE&gt;&lt;P&gt;I've added the rex, eventstats, where, and fields commands on lines 6-9 to your original search.&lt;/P&gt;&lt;P&gt;In my own environments, I also keep an eye on blocked queues:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;|  tstats latest(PREFIX(max_size_kb=)) as max_size_kb latest(PREFIX(largest_size=)) as largest_size where index=_internal source=*metrics.log* TERM(group=queue) TERM(blocked=true) by host PREFIX(name=)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Dec 2022 16:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625276#M217359</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2022-12-26T16:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625277#M217360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/135347"&gt;@Navanitha&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;i use this search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal  source=*metrics.log sourcetype=splunkd group=queue 
| eval name=case(name=="aggqueue","2 - Aggregation Queue",
 name=="indexqueue", "4 - Indexing Queue",
 name=="parsingqueue", "1 - Parsing Queue",
 name=="typingqueue", "3 - Typing Queue",
 name=="splunktcpin", "0 - TCP In Queue",
 name=="tcpin_cooked_pqueue", "0 - TCP In Queue") 
| eval max=if(isnotnull(max_size_kb),max_size_kb,max_size) 
| eval curr=if(isnotnull(current_size_kb),current_size_kb,current_size) 
| eval fill_perc=round((curr/max)*100,2) 
| bin _time span=1m
| stats Median(fill_perc) AS "fill_percentage" max(max) AS max max(curr) AS curr by host, _time, name 
| where (fill_percentage&amp;gt;70 AND name!="4 - Indexing Queue") OR (fill_percentage&amp;gt;70 AND name="4 - Indexing Queue")
| sort -_time&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2022 16:25:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625277#M217360</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-26T16:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625324#M217375</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp; Thank you for looking into my query.&amp;nbsp; I tried the search query you posted and the results are same as my search query.&amp;nbsp; What I am looking for a consolidated report for example, in the output I pasted in my original post, instance "Y" has all the four queues full (parsingQueue* OR title=aggQueue* OR title=typingQueue* OR title=indexQueue) so my output should only be this instance name.&amp;nbsp; I will set up and alert for this host for further action.&amp;nbsp; Any suggestions pls ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 11:37:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625324#M217375</guid>
      <dc:creator>Navanitha</dc:creator>
      <dc:date>2022-12-27T11:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625331#M217376</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/135347"&gt;@Navanitha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table in your original post, only instance X would pass the new where clause. If you want to reduce the results to just an instance name, you can add stats, dedup, etc. to your search:&lt;/P&gt;&lt;P&gt;| stats count by splunk_server&lt;BR /&gt;| fields - count&lt;/P&gt;&lt;P&gt;These would replace the rename command.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 14:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/625331#M217376</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2022-12-27T14:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert if all the queues for a respective indexer gets full?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/627455#M218035</link>
      <description>&lt;P&gt;Query seems to be working but partially.&amp;nbsp; When I run the query I get results for splunk_server whose one of the&amp;nbsp; parsing queue pipeline is not greater than the threshold I set (which is &amp;gt;80). As per my requirement this server xyz should not showup as its parsing_queue.0 is not greater than thershold. (It should only report if all its 3 pipelines 4 Queues are greater than 80).&lt;/P&gt;&lt;P&gt;title fifteen_min_fill_perc splunk_server&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;aggQueue.0&lt;/TD&gt;&lt;TD&gt;87.79&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aggQueue.1&lt;/TD&gt;&lt;TD&gt;87.66&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aggQueue.2&lt;/TD&gt;&lt;TD&gt;86.22&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;indexQueue.0&lt;/TD&gt;&lt;TD&gt;88.43&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;indexQueue.1&lt;/TD&gt;&lt;TD&gt;87.96&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;indexQueue.2&lt;/TD&gt;&lt;TD&gt;89.16&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;parsingQueue.0&lt;/TD&gt;&lt;TD&gt;65.10&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;parsingQueue.1&lt;/TD&gt;&lt;TD&gt;86.32&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;typingQueue.0&lt;/TD&gt;&lt;TD&gt;88.28&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;typingQueue.1&lt;/TD&gt;&lt;TD&gt;87.87&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;typingQueue.2&lt;/TD&gt;&lt;TD&gt;89.13&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Appreciate if you could also help me understand more on why dc is used here and how does it work?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 13:28:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-if-all-the-queues-for-a-respective-indexer-gets/m-p/627455#M218035</guid>
      <dc:creator>Navanitha</dc:creator>
      <dc:date>2023-01-18T13:28:06Z</dc:date>
    </item>
  </channel>
</rss>

