<?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 need to optimize the below query in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/need-to-optimize-the-below-query/m-p/752958#M4003</link>
    <description>&lt;P&gt;&lt;SPAN&gt;it is utilizing more memory and resource, what to be add and remove for the below query :-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;index=_internal source="*/var/log/splunk/health.log" node_path="splunkd"&lt;BR /&gt;| eval component=case(&lt;BR /&gt;match(host, "sh"), "Search Head",&lt;BR /&gt;match(host, "ix"), "Indexer",&lt;BR /&gt;match(host, "hf"), "Heavy Forwarder",&lt;BR /&gt;match(host, "if"), "Intermediate Forwarder",&lt;BR /&gt;match(host, "uf"), "Universal Forwarder",&lt;BR /&gt;match(host, "ds"), "Deployment Server",&lt;BR /&gt;match(host, "cm"), "Cluster Master",&lt;BR /&gt;match(host, "dp"), "Deployer",&lt;BR /&gt;match(host, "mc"), "Monitoring Console",&lt;BR /&gt;true(), null()&lt;BR /&gt;)&lt;BR /&gt;| stats latest(color) as status by host, component&lt;BR /&gt;| eval "RAG Status"=status&lt;BR /&gt;| rename host as "Host", component as "Check Items"&lt;BR /&gt;| table Date, "Check Items", Host, "RAG Status", Comments&lt;BR /&gt;| sort "Check Items", Host&lt;BR /&gt;| append&lt;BR /&gt;[ search index=_internal source="*license_usage.log" earliest=@d latest=now&lt;BR /&gt;| stats latest(b) AS b by slave, pool&lt;BR /&gt;| eval DailyGB=round(b/1024/1024/1024, 2)&lt;BR /&gt;| stats sum(DailyGB) AS Total_License_Usage_GB&lt;BR /&gt;| eval "RAG Status"=case(Total_License_Usage_GB &amp;gt; 7000, "red", Total_License_Usage_GB &amp;gt; 6000, "yellow", Total_License_Usage_GB &amp;lt;= 6000, "green")&lt;BR /&gt;| eval Host="lm"&lt;BR /&gt;| eval "Check Items"="License Master"&lt;BR /&gt;| eval Date=strftime(now(), "%d %B'%y, %I.%M %p %Z") ]&lt;BR /&gt;| eval email_time = strftime(now(),"%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| table "Check Items", Host, "RAG Status", Total_License_Usage_GB&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2025 09:32:59 GMT</pubDate>
    <dc:creator>Praz_123</dc:creator>
    <dc:date>2025-09-11T09:32:59Z</dc:date>
    <item>
      <title>need to optimize the below query</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/need-to-optimize-the-below-query/m-p/752958#M4003</link>
      <description>&lt;P&gt;&lt;SPAN&gt;it is utilizing more memory and resource, what to be add and remove for the below query :-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;index=_internal source="*/var/log/splunk/health.log" node_path="splunkd"&lt;BR /&gt;| eval component=case(&lt;BR /&gt;match(host, "sh"), "Search Head",&lt;BR /&gt;match(host, "ix"), "Indexer",&lt;BR /&gt;match(host, "hf"), "Heavy Forwarder",&lt;BR /&gt;match(host, "if"), "Intermediate Forwarder",&lt;BR /&gt;match(host, "uf"), "Universal Forwarder",&lt;BR /&gt;match(host, "ds"), "Deployment Server",&lt;BR /&gt;match(host, "cm"), "Cluster Master",&lt;BR /&gt;match(host, "dp"), "Deployer",&lt;BR /&gt;match(host, "mc"), "Monitoring Console",&lt;BR /&gt;true(), null()&lt;BR /&gt;)&lt;BR /&gt;| stats latest(color) as status by host, component&lt;BR /&gt;| eval "RAG Status"=status&lt;BR /&gt;| rename host as "Host", component as "Check Items"&lt;BR /&gt;| table Date, "Check Items", Host, "RAG Status", Comments&lt;BR /&gt;| sort "Check Items", Host&lt;BR /&gt;| append&lt;BR /&gt;[ search index=_internal source="*license_usage.log" earliest=@d latest=now&lt;BR /&gt;| stats latest(b) AS b by slave, pool&lt;BR /&gt;| eval DailyGB=round(b/1024/1024/1024, 2)&lt;BR /&gt;| stats sum(DailyGB) AS Total_License_Usage_GB&lt;BR /&gt;| eval "RAG Status"=case(Total_License_Usage_GB &amp;gt; 7000, "red", Total_License_Usage_GB &amp;gt; 6000, "yellow", Total_License_Usage_GB &amp;lt;= 6000, "green")&lt;BR /&gt;| eval Host="lm"&lt;BR /&gt;| eval "Check Items"="License Master"&lt;BR /&gt;| eval Date=strftime(now(), "%d %B'%y, %I.%M %p %Z") ]&lt;BR /&gt;| eval email_time = strftime(now(),"%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| table "Check Items", Host, "RAG Status", Total_License_Usage_GB&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 09:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/need-to-optimize-the-below-query/m-p/752958#M4003</guid>
      <dc:creator>Praz_123</dc:creator>
      <dc:date>2025-09-11T09:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: need to optimize the below query</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/need-to-optimize-the-below-query/m-p/752968#M4004</link>
      <description>&lt;P&gt;Instead of using &lt;FONT face="courier new,courier"&gt;append&lt;/FONT&gt;, split the query into two separate queries.&amp;nbsp; They'll each run faster.&lt;/P&gt;&lt;P&gt;The first &lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt; command probably is showing empty Date and Comments fields.&amp;nbsp; That's because those fields don't exist after the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:10:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/need-to-optimize-the-below-query/m-p/752968#M4004</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-09-11T12:10:08Z</dc:date>
    </item>
  </channel>
</rss>

