<?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 How to track transaction with multiple indexes with different fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619228#M215215</link>
    <description>&lt;P&gt;Hello everyone. I am trying to track office and remote logins using multiple indexes with the transaction command. One of the logs has a session id so I am able to use a transaction command to track that but it's the second piece that is difficult. The other index does not have a session id and the only thing that is similar is the username field. For remote logins, if a user signs into the remote desktop app, it will generate an authentication event along with a session id. The other index will also generate a login event. The authentication event and login event are at most a second apart, but in most circumstances are at the same exact time. If a user were to login from the office, only a login event is captured. My query is as follows but there are some issues to the results I am seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index=connection_log username="user" message="logged in") OR (index=remote_app username="user" action=auth OR action=terminateSession)
| transaction username maxspan=2s keeporphans=true
| transaction session_id startswith=auth endswith=terminateSession&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried using subsearches as well but am unable to get the desired results. Wondering if anyone else has tried to do something similar. Your help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2022 15:20:54 GMT</pubDate>
    <dc:creator>jkang117</dc:creator>
    <dc:date>2022-11-02T15:20:54Z</dc:date>
    <item>
      <title>How to track transaction with multiple indexes with different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619228#M215215</link>
      <description>&lt;P&gt;Hello everyone. I am trying to track office and remote logins using multiple indexes with the transaction command. One of the logs has a session id so I am able to use a transaction command to track that but it's the second piece that is difficult. The other index does not have a session id and the only thing that is similar is the username field. For remote logins, if a user signs into the remote desktop app, it will generate an authentication event along with a session id. The other index will also generate a login event. The authentication event and login event are at most a second apart, but in most circumstances are at the same exact time. If a user were to login from the office, only a login event is captured. My query is as follows but there are some issues to the results I am seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index=connection_log username="user" message="logged in") OR (index=remote_app username="user" action=auth OR action=terminateSession)
| transaction username maxspan=2s keeporphans=true
| transaction session_id startswith=auth endswith=terminateSession&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried using subsearches as well but am unable to get the desired results. Wondering if anyone else has tried to do something similar. Your help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 15:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619228#M215215</guid>
      <dc:creator>jkang117</dc:creator>
      <dc:date>2022-11-02T15:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction with multiple indexes with different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619229#M215216</link>
      <description>&lt;P&gt;If a user logged in from the office, how would you tell if/when they logged off or offline?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 04:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619229#M215216</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-11-02T04:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction with multiple indexes with different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619233#M215219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250873"&gt;@jkang117&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;lete me understand: you want to find if a user uses in the same time period (2 seconds) both local and remote access that are in different indexes and the only common field is username, is it correct?&lt;/P&gt;&lt;P&gt;If this is your need, you should try a different approach using sìa streming command as stats or timechart:&lt;/P&gt;&lt;P&gt;so see my approach and adapt it to your need:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=connection_log username="user" message="logged in") OR (index=remote_app username="user" (action=auth OR action=terminateSession))
| timechart span=2s dc(index) AS index_count BY username
| where index_count&amp;gt;1&lt;/LI-CODE&gt;&lt;P&gt;The transaction command can be used only if you haven't any other solution because it's a very slow command, and using two transaction commands, as you search, you can run a search and then go to take a coffe waiting for the answer!&lt;/P&gt;&lt;P&gt;I don't know if my search is exactly what you're searching, but analyze my approach and try to use it.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 07:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619233#M215219</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-02T07:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction with multiple indexes with different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619299#M215242</link>
      <description>&lt;P&gt;There isn't a way to really track that in the logs. What I can definitively track are remote login sessions since there is a session id associated to it.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 14:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619299#M215242</guid>
      <dc:creator>jkang117</dc:creator>
      <dc:date>2022-11-02T14:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction with multiple indexes with different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619300#M215243</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;So to explain, the connection log shows that a user logged in regardless of whether or not the user is coming in remotely or locally at the office. The way to determine if a user is logging in remotely, a user will sign into the remote application and it will generate a login event on the connection at most within 2 seconds. If they are logging from the office, there will only be a login event from the connection log. The issue I am running into is, there are times users might login multiple times within the same session and I'm having difficulty accounting for those logins.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 14:38:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-transaction-with-multiple-indexes-with-different/m-p/619300#M215243</guid>
      <dc:creator>jkang117</dc:creator>
      <dc:date>2022-11-02T14:38:47Z</dc:date>
    </item>
  </channel>
</rss>

