<?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: Metrics vs Events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460375#M129896</link>
    <description>&lt;P&gt;If I understand your question, you can name your stats output fields, and then apply some condition on those. For example:&lt;BR /&gt;
| stats avg(duration) AS AvgDur by host&lt;BR /&gt;
| where AvgDur&amp;gt;123&lt;/P&gt;

&lt;P&gt;And you can do a subsearch to get to a list of hosts you're interested, and then do further refinement on those. For example:&lt;BR /&gt;
[search your_search_to_get_to_hosts | format]&lt;BR /&gt;
index=...&lt;/P&gt;

&lt;P&gt;The first part can generate a number of hosts that meet criteria, the format line can produce an OR-list of them, and then that list is used as criteria into the follow-on search. Take a look at the format docs to leverage this powerful command.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:52:44 GMT</pubDate>
    <dc:creator>jpolvino</dc:creator>
    <dc:date>2020-09-30T01:52:44Z</dc:date>
    <item>
      <title>Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460373#M129894</link>
      <description>&lt;P&gt;Is there a way to use the results of a metrics search as a field value(s) for an event search? &lt;/P&gt;

&lt;P&gt;For example, a specific metrics search will display a list of hosts that meet a certain criteria. I would like to take these host results and further integrate them into an event search as the list of hosts to evaluate. The event data in my environment does not log these criteria, while my metrics dimensions do. &lt;/P&gt;

&lt;P&gt;Is there another recommended approach to tackle this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 12:04:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460373#M129894</guid>
      <dc:creator>brandonamp123</dc:creator>
      <dc:date>2019-08-23T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460374#M129895</link>
      <description>&lt;P&gt;What have you tried so far?  Putting the metrics search within a subsearch should work.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 12:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460374#M129895</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-08-23T12:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460375#M129896</link>
      <description>&lt;P&gt;If I understand your question, you can name your stats output fields, and then apply some condition on those. For example:&lt;BR /&gt;
| stats avg(duration) AS AvgDur by host&lt;BR /&gt;
| where AvgDur&amp;gt;123&lt;/P&gt;

&lt;P&gt;And you can do a subsearch to get to a list of hosts you're interested, and then do further refinement on those. For example:&lt;BR /&gt;
[search your_search_to_get_to_hosts | format]&lt;BR /&gt;
index=...&lt;/P&gt;

&lt;P&gt;The first part can generate a number of hosts that meet criteria, the format line can produce an OR-list of them, and then that list is used as criteria into the follow-on search. Take a look at the format docs to leverage this powerful command.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460375#M129896</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2020-09-30T01:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460376#M129897</link>
      <description>&lt;P&gt;Subsearch worked, thanks Rich!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460376#M129897</guid>
      <dc:creator>brandonamp123</dc:creator>
      <dc:date>2019-08-23T13:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460377#M129898</link>
      <description>&lt;P&gt;Very helpful information, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460377#M129898</guid>
      <dc:creator>brandonamp123</dc:creator>
      <dc:date>2019-08-23T13:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics vs Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460378#M129899</link>
      <description>&lt;P&gt;Please accept the answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 15:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-vs-Events/m-p/460378#M129899</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-08-23T15:08:09Z</dc:date>
    </item>
  </channel>
</rss>

