<?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: What are my searches finding? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521820#M147075</link>
    <description>&lt;P&gt;Aah, that helped alot! Just by removing the "stats count" at the end I can actually see what you are describing. Each resulting stat has a source and the System GHI, and anything from 0 to multiple programs, like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcB&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcC&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;P&gt;progA&lt;BR /&gt;progB&lt;BR /&gt;progC&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That does indeed look like what I am after, assuming 'stats count by program' will return&lt;BR /&gt;progA=2&lt;BR /&gt;progB=1&lt;BR /&gt;progC=1&lt;BR /&gt;&lt;BR /&gt;Does this seem right to you? If so case closed, I guess!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:29:58 GMT</pubDate>
    <dc:creator>Freddler</dc:creator>
    <dc:date>2020-09-28T14:29:58Z</dc:date>
    <item>
      <title>What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521409#M146934</link>
      <description>&lt;P&gt;Hi! This is my first post here so I apologise if the format is flawed. I am a Splunk novice and have been tinkering with different searches to try and achieve my goal. I have two searches which both yield &lt;EM&gt;something.&lt;/EM&gt; The results are similar but not identical and I'd like to understand what the difference is.&lt;/P&gt;&lt;P&gt;I'll begin describing the logfiles:&lt;/P&gt;&lt;P&gt;Among loads of other data, there is information about different &lt;STRONG&gt;systems &lt;/STRONG&gt;and&amp;nbsp;different&amp;nbsp;&lt;STRONG&gt;programs&amp;nbsp;&lt;/STRONG&gt;being run. It is structured somthing like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lorem ipsum ..
System: ABC (occurs only once)
Lorem ipsum ..
Starting program: Name (can occur multiple times)
Lorem ipsum ..&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The objective is to find and count all programs that have been run in the same session as a certain system is present. For example, if the system can be either ABC, DEF or GHI, I want all the program names from the logs where the system was GHI but NOT if it was DEF or ABC. There are field extractions for both the system name and the program name.&lt;/P&gt;&lt;P&gt;My searches:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program:" OR "System:"
| stats values(Program) as Program values(System) as System by source
| where System="GHI"
| mvexpand Program
| stats count by Program
| sort count by Program desc
| head 50&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program" OR "System:"
| transaction source startswith="System: GHI" endswith="Starting program:"
| stats values(Program) as Program values(System) as System by source
| mvexpand Program
| stats count by Program
| sort count by Program desc
| head 50&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;As I've stated, these searches seem to yield same-ish results. What is actually happening under the hood here? Also, the number of occurrences of "Starting program" is vastly superior to the "System", so I imagine that the speed could be increased by first finding the logs where the system is "GHI" and then only in those logs perform the program search. Would that be possible?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 07:58:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521409#M146934</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-25T07:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521442#M146944</link>
      <description>&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program:" OR "System:"
| stats values(Program) as Program values(System) as System by source&lt;/LI-CODE&gt;&lt;P&gt;Will give you a list of all the Programs and all the Systems that ran on each source&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Source&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;System&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Program&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysB&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcB&lt;/TD&gt;&lt;TD&gt;sysA&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;When you filter by system, you will still get all the programs and systems that ran on the source where that system executed. For example, where System=sysB&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Source&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;System&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Program&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysB&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;From your description, this doesn't sound like what you are after?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 12:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521442#M146944</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-25T12:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521467#M146951</link>
      <description>&lt;P&gt;You're right, it doesn't sound like what I'm after. What I want is the count of all programs (progA .. progN) that ran on, for instance, sysA across all sources (srcA .. srcN). In any given source sys can be either A or B (or C or D..)&amp;nbsp; but several cannot occur. The total count of the red progs in your table is what I'm after.&amp;nbsp; How would I achieve that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Source&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;System&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Program&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;FONT color="#FF0000"&gt;progA&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;FONT color="#FF0000"&gt;progB&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;FONT color="#FF0000"&gt;progC&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRIKE&gt;sysB cannot occur in same log as sysA&lt;/STRIKE&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcB&lt;/TD&gt;&lt;TD&gt;sysA&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;progA&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;progB&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;progC&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 14:23:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521467#M146951</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-25T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521484#M146959</link>
      <description>&lt;P&gt;Would this scenario be valid&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;source&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;System&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Starting program&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcB&lt;/TD&gt;&lt;TD&gt;sysA&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcC&lt;/TD&gt;&lt;TD&gt;sysB&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;That is, for any given source, only one system runs on it / produces logs?&lt;BR /&gt;Or is it more like each source is the log of an execution run on a system, which starts a number of programs?&lt;BR /&gt;&lt;BR /&gt;Can a system start a program more than once in a run, and if so, does this only count as 1 program or many?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 15:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521484#M146959</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-25T15:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521691#M147014</link>
      <description>&lt;P&gt;Yes, except there is no need to declare sysA twice in srcA - the first one remains valid throughout the entire log. Other than that it looks accurate. Yes, a system can start the same prog multiple times in a run. I think both cases would be interesting: counting only unique runs or counting every run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;source&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;System&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Starting program&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;sysA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcB&lt;/TD&gt;&lt;TD&gt;sysA&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;srcC&lt;/TD&gt;&lt;TD&gt;sysB&lt;/TD&gt;&lt;TD&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;progE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Example results:&lt;BR /&gt;Total count:&lt;BR /&gt;progA: 3&lt;BR /&gt;progB: 1&lt;BR /&gt;progC: 1&lt;BR /&gt;progD: 2&lt;BR /&gt;progE: 1&lt;BR /&gt;&lt;BR /&gt;Unique count:&lt;BR /&gt;progA: 2&lt;BR /&gt;progB: 1&lt;BR /&gt;progC: 1&lt;BR /&gt;progD: 2&lt;BR /&gt;progE: 1&lt;BR /&gt;&lt;BR /&gt;Thank you for your patience &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 06:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521691#M147014</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-28T06:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521708#M147017</link>
      <description>&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program:" OR "System:"
| stats values(Program) as Program values(System) as System by source
| where System="GHI"
| mvexpand Program
| stats count by Program
| sort count by Program desc
| head 50&lt;/LI-CODE&gt;&lt;P&gt;Doesn't this give Program counts of 1 since values(Program) dedup's&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program" OR "System:"
| transaction source startswith="System: GHI" endswith="Starting program:"
| stats values(Program) as Program values(System) as System by source
| mvexpand Program
| stats count by Program
| sort count by Program desc
| head 50&lt;/LI-CODE&gt;&lt;P&gt;Same thing about values dedup'ing. However, transaction may also be limiting the number of events it processes, so if your logs are over say 5000 lines, the counts may be lower.&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program:" OR "System:"
| stats count values(System) as System by source, Program
| where System="GHI"
| stats sum(count) as total by Program&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 07:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521708#M147017</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-28T07:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521780#M147055</link>
      <description>&lt;P&gt;Both my searches return not-unreasonable values larger than 1, but the search using transaction does indeed give lower values for some of the programs, so that may be as you describe it.&lt;/P&gt;&lt;P&gt;Your search finds many events but does not yield any stats.&lt;/P&gt;&lt;P&gt;The way I understand my search is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=Log "Starting program:" OR "System:"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.. yields two separate sets of events. One set where the events contain "Starting program" and another set where the events contain "System".&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| stats values(Program) as Program values(System) as System by source
| where System="GHI"&lt;/PRE&gt;&lt;P&gt;.. somehow, the union of the two sets are calculated. If these two lines change place with eachother, no stats are found. If "by source" is removed and nothing else changed, I do find a bunch of irrelevant programs all with the count of 1. My intuition is that "by source" connects the programs to the systems, and thus when we filter the systems using "where", the programs also get filtered along with them. I have no idea if this is actually the case though.&lt;/P&gt;&lt;PRE&gt;| stats count by Program
| sort count by Program desc&lt;/PRE&gt;&lt;P&gt;.. the result here looks like:&lt;BR /&gt;progA 33&lt;BR /&gt;progB 27&lt;BR /&gt;progC 21&lt;BR /&gt;which is the desired format but I don't know if the numbers are correct. If I change the line to "stats count by Program, source" the results will instead look like this:&lt;BR /&gt;progA srcA 1&lt;BR /&gt;progA srcB 1&lt;BR /&gt;progA srcC 1&lt;BR /&gt;progB srcD 1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:57:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521780#M147055</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-28T12:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521802#M147067</link>
      <description>&lt;P&gt;You have to remember what the pipe "|" is doing. In the case of&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(Program) as Program values(System) as System by source
| where System="GHI"&lt;/LI-CODE&gt;&lt;P&gt;stats collects values of Program into a multi-value field also called Program and values of System into a multi-value field called System where each set comes from the same source i.e. your log. At this point, each event has a mv for Program, a mv for System and a source field.&lt;/P&gt;&lt;P&gt;These events are piped into the where statement, which only passes on events with System equal to GHI or more strictly speaking where one of the values in System is GHI. But we know from your data that System only appear once in each source, so we effectively filtering out all the logs which aren't produced by GHI&lt;/P&gt;&lt;P&gt;If you switch these around, the events are filtered by System equal to GHI which means none of the Program starting events get through to the stats, which is why you get no results&lt;/P&gt;&lt;P&gt;When you change the command to&amp;nbsp;&lt;SPAN&gt;"stats count by Program, source", the counts are for unique combinations of Program and source, so if GHI only runs a program once, all the counts will be 1. Otherwise, the count will be the number of times GHI ran that program in that source (log)&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521802#M147067</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-28T13:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521820#M147075</link>
      <description>&lt;P&gt;Aah, that helped alot! Just by removing the "stats count" at the end I can actually see what you are describing. Each resulting stat has a source and the System GHI, and anything from 0 to multiple programs, like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcA&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcB&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;progA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;srcC&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;GHI&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;P&gt;progA&lt;BR /&gt;progB&lt;BR /&gt;progC&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That does indeed look like what I am after, assuming 'stats count by program' will return&lt;BR /&gt;progA=2&lt;BR /&gt;progB=1&lt;BR /&gt;progC=1&lt;BR /&gt;&lt;BR /&gt;Does this seem right to you? If so case closed, I guess!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:29:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521820#M147075</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-28T14:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521824#M147077</link>
      <description>&lt;P&gt;Yes, the stats count by Program will give you the counts you want&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521824#M147077</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-28T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: What are my searches finding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521826#M147078</link>
      <description>&lt;P&gt;Thank you very much for your help! I feel like my understanding has deepened a bit.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-are-my-searches-finding/m-p/521826#M147078</guid>
      <dc:creator>Freddler</dc:creator>
      <dc:date>2020-09-28T14:47:10Z</dc:date>
    </item>
  </channel>
</rss>

