<?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: mstats command in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659622#M111567</link>
    <description>&lt;P&gt;Ok, now i see and get the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 09:15:10 GMT</pubDate>
    <dc:creator>Shakira1</dc:creator>
    <dc:date>2023-10-04T09:15:10Z</dc:date>
    <item>
      <title>mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659587#M111558</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have this command:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| mstats avg("value1) prestats=true WHERE "index"="my_index" span=10s BY host&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| timechart avg("value1") span=10s useother=false BY host WHERE max in top5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and I would like to count the host and trigger when I have less then 3 hosts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tired something like that:&lt;/P&gt;&lt;P&gt;```|&lt;STRONG&gt;stats dc(host) as c_host | where c_host &amp;gt; 3&lt;/STRONG&gt;,``` but its not working as usual .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any idea? thanks!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 07:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659587#M111558</guid>
      <dc:creator>Shakira1</dc:creator>
      <dc:date>2023-10-04T07:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659598#M111559</link>
      <description>&lt;P&gt;It is not clear what you have actually tried and what is "not working". Please provide your full search, anonymised as necessary, and show how it is not working.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 07:41:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659598#M111559</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-04T07:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659600#M111560</link>
      <description>&lt;P&gt;this is my search:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| mstats avg("value1) prestats=true WHERE "index"="my_index" span=10s BY host&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| timechart avg("value1") span=10s useother=false BY host WHERE max in top5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;which is working fine.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I just want to create a new alert that triggered when the host count is less then 3.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;how can I do that?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 07:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659600#M111560</guid>
      <dc:creator>Shakira1</dc:creator>
      <dc:date>2023-10-04T07:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659602#M111561</link>
      <description>&lt;P&gt;If that is your search, you should be getting an error!&lt;/P&gt;&lt;P&gt;Is the search relevant to the count you want i.e. should the count be based on the results of a working search, or from the index, or from part of the search?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 07:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659602#M111561</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-04T07:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659609#M111562</link>
      <description>&lt;P&gt;not sure why you say that. but its working.&lt;/P&gt;&lt;P&gt;just to be clear = value1 = to some internal parameter.&lt;/P&gt;&lt;P&gt;index = my index.&lt;/P&gt;&lt;P&gt;and base on that Im getting information about&amp;nbsp; the hosts .&amp;nbsp;&lt;/P&gt;&lt;P&gt;now I just want to count how many hosts reporting, when its less then 3 I want to trigger about it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope its clear now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659609#M111562</guid>
      <dc:creator>Shakira1</dc:creator>
      <dc:date>2023-10-04T08:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659613#M111564</link>
      <description>&lt;P&gt;&lt;STRONG&gt;| mstats avg("value1) prestats=true WHERE "index"="my_index" span=10s BY host&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;has a missing double quote so will give you an error&lt;/P&gt;&lt;P&gt;Also, assuming that this is corrected, you will get a field called something like "avg(value1)"&lt;/P&gt;&lt;P&gt;This means that you no longer have a field called "value1" so the timechart command has no field to do an average on.&lt;/P&gt;&lt;P&gt;This is why the search you provided does not work.&lt;/P&gt;&lt;P&gt;Assuming it is the timechart table that you want to count hosts for, you could untable the chart table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| untable _time host average
| stats dc(host) as c_host 
| where c_host &amp;lt; 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:19:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659613#M111564</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-04T08:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659620#M111565</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;now I see&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;first I missed&amp;nbsp;&lt;SPAN&gt;double quote, so you are correct - so my search is:&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;| mstats avg("value1") prestats=true WHERE "index"="my_index" span=10s BY host&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| timechart avg("value1") span=10s useother=false BY host WHERE max in top5&lt;/STRONG&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;now, if I want to search by what you worth:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;| mstats avg("value1") prestats=true WHERE "index"="my_index" span=10s BY host&lt;/STRONG&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;| untable _time host average | stats dc(host) as c_host&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;| timechart avg("value1") span=10s useother=false BY host WHERE max in top5&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;| untable _time host average | stats dc(host) as c_host&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Anyway,&amp;nbsp;&lt;/STRONG&gt;I want to use&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;mstats function and get a count for the host.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Oct 2023 09:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659620#M111565</guid>
      <dc:creator>Shakira1</dc:creator>
      <dc:date>2023-10-04T09:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: mstats command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659622#M111567</link>
      <description>&lt;P&gt;Ok, now i see and get the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 09:15:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/mstats-command/m-p/659622#M111567</guid>
      <dc:creator>Shakira1</dc:creator>
      <dc:date>2023-10-04T09:15:10Z</dc:date>
    </item>
  </channel>
</rss>

