<?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: List fields after rare command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756706#M243124</link>
    <description>&lt;P&gt;You're 100% right. Since we want the rarest ones, we need to sort on count. It was late when I wrote this &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Dec 2025 11:26:25 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-12-22T11:26:25Z</dc:date>
    <item>
      <title>List fields after rare command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756687#M243120</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Iam using below splunk to help identify least common values of &lt;EM&gt;runTime&lt;/EM&gt; field in &lt;STRONG&gt;&lt;EM&gt;myEventRecType&lt;/EM&gt;&lt;/STRONG&gt; file . i get the results .&lt;/P&gt;&lt;P&gt;However I would like to also show additional fields related to the runTime like &lt;EM&gt;requestId&lt;/EM&gt;,&amp;nbsp;&lt;EM&gt;queryExecutionTime&lt;/EM&gt;,&lt;EM&gt;TimeOfExecution&lt;/EM&gt;. How can I get them added?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Index=abc source=xxx earliest=-60m EventRecType=xyz
| rare runTime limit=5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Dec 2025 16:22:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756687#M243120</guid>
      <dc:creator>bmer</dc:creator>
      <dc:date>2025-12-21T16:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: List fields after rare command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756688#M243121</link>
      <description>&lt;P&gt;Perhaps the simplest way to do this is with a subsearch, however, there are limits to the number of events so this may not work for your usecase&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Index=abc source=xxx earliest=-60m EventRecType=xyz [search Index=abc source=xxx earliest=-60m EventRecType=xyz
| rare runTime limit=5
| fields runTime
| format]&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 21 Dec 2025 17:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756688#M243121</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-12-21T17:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: List fields after rare command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756690#M243122</link>
      <description>&lt;P&gt;You can't "add" fields to the results. It wouldn't make sense anyway since "rare" is a transforming command and does aggregation on the original data so other fields' values do not correspond 1:1 to the aggregations.&lt;/P&gt;&lt;P&gt;What you might try doing instead is using stats (or eventstats but that's more limited).&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc source=xxx earliest=-60m EventRecType=xyz
| stats count values(otherField) as otherField values(anotherField) as anotherField by runTime
| sort runTime
| head 5&lt;/LI-CODE&gt;&lt;P&gt;EDIT: I'm not editing the search because&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;'s remark will stop making sense but indeed - the sort is on runTime whereas it should be on count.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2025 19:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756690#M243122</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-12-22T19:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: List fields after rare command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756704#M243123</link>
      <description>&lt;P&gt;I think you probably would want to sort by count not runTime and you can do the head in the sort&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc source=xxx earliest=-60m EventRecType=xyz
| stats count values(otherField) as otherField values(anotherField) as anotherField by runTime
| sort 5 count&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Dec 2025 10:14:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756704#M243123</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-12-22T10:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: List fields after rare command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756706#M243124</link>
      <description>&lt;P&gt;You're 100% right. Since we want the rarest ones, we need to sort on count. It was late when I wrote this &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2025 11:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-fields-after-rare-command/m-p/756706#M243124</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-12-22T11:26:25Z</dc:date>
    </item>
  </channel>
</rss>

