<?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: Searching the event log based on a parameter value from another search from the same event log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653476#M225819</link>
    <description>&lt;P&gt;Assuming you have extracted the isTrue and transactionID fields&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(isTrue) as isTrue by transactionID
| where isTrue==1&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 07 Aug 2023 22:01:58 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-08-07T22:01:58Z</dc:date>
    <item>
      <title>How to search the event log based on a parameter value from another search from the same event log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653463#M225816</link>
      <description>&lt;P&gt;We would like to have the search results based on the following criteria. We have records in the event log with the following values&lt;/P&gt;
&lt;P&gt;transactionID: abc | is_true: 1 | eventType: main | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-A | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-C | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-F | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: def | is_true: 0 | eventType: main | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: def | eventType: event-B | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: def | eventType: event-C | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: def | eventType: event-E | other_attributes_data&lt;/P&gt;
&lt;P&gt;We basically want a search string, that identifies the "main" event records whose is_true value is "1". Once that is done, then we want all the events that are associated to the same "transactionID".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this example, since "transactionID: abc" has the main event, whose is_true value is 1, then we would like to list all the events associated to that particular transactionID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output for the query ranswer for the query will be something like&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: main | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-A | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-C | other_attributes_data&lt;/P&gt;
&lt;P&gt;transactionID: abc | eventType: event-F | other_attributes_data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "transactionID: def" records will not be coming back in the search results, as the corresponding main event has is_true value of "0".&lt;/P&gt;
&lt;P&gt;How can we write such query?&lt;/P&gt;
&lt;P&gt;Appreciate the response. Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 16:33:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653463#M225816</guid>
      <dc:creator>vijayaxyz</dc:creator>
      <dc:date>2023-08-08T16:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Searching the event log based on a parameter value from another search from the same event log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653476#M225819</link>
      <description>&lt;P&gt;Assuming you have extracted the isTrue and transactionID fields&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(isTrue) as isTrue by transactionID
| where isTrue==1&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 07 Aug 2023 22:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653476#M225819</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-07T22:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Searching the event log based on a parameter value from another search from the same event log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653583#M225858</link>
      <description>&lt;P&gt;Thanks. That worked.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-event-log-based-on-a-parameter-value-from/m-p/653583#M225858</guid>
      <dc:creator>vijayaxyz</dc:creator>
      <dc:date>2023-08-08T15:03:00Z</dc:date>
    </item>
  </channel>
</rss>

