<?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: Correlate three events with differing properties in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150126#M42053</link>
    <description>&lt;P&gt;Hi AndreasBalster,&lt;/P&gt;

&lt;P&gt;you can use &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.3/SearchReference/Streamstats"&gt;&lt;CODE&gt;streamstats&lt;/CODE&gt;&lt;/A&gt; for this. Given this log file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=123 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=123 session=456
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=456 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=124 exe=/etc/foo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=124 session=457
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=457 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=125 exe=/etc/boo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=125 session=458
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=458 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=126 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=126 session=459
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=459 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=127 exe=/etc/foo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=127 session=460
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=460 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=128 exe=/etc/bla.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=128 session=461
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=461 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=129 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=129 session=462
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=462 acct=root2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I was able to use this search and got back a nice table of &lt;CODE&gt;callid, session, exe and acct&lt;/CODE&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=/var/tmp/myfoo type_name=AUDIT_PATH OR type_name=AUDIT_USER_START OR type_name=AUDIT_SYSCALL | streamstats current=f last(callid) AS last_callid last(session) AS last_session last(acct) AS last_acct  | where callid=last_callid | rename last_session AS session last_acct AS acct | table callid session acct exe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="http://answers.splunk.com//storage/Bildschirmfoto_vom_2014-05-05_08:46:19.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Since you got millions of events I cannot tell if this will perform at a good rate or if it will work at all, since I used the above test file and not your real world data.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Mon, 05 May 2014 06:52:47 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-05-05T06:52:47Z</dc:date>
    <item>
      <title>Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150123#M42050</link>
      <description>&lt;P&gt;I need to correlate three events of different type which have 1 single property in common, respectively:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=123 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=123 session=456
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=456 acct=root
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My tries so far have been unsuccessful and I'm running out of ideas, how can I do this?&lt;/P&gt;

&lt;P&gt;P.S. I'm trying to not use the transaction command&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2014 11:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150123#M42050</guid>
      <dc:creator>AndreasBalster</dc:creator>
      <dc:date>2014-05-02T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150124#M42051</link>
      <description>&lt;P&gt;Have you tried something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=foo type_name=AUDIT_PATH | join callid [search type_name=AUDIT_SYSCALL] | join session [search type_name=AUDIT_USER_START]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 May 2014 12:31:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150124#M42051</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-05-02T12:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150125#M42052</link>
      <description>&lt;P&gt;This produces something, but I cannot verify its correctness or completeness. Judging by the warning message Splunk gives me (Subsearch exceeded 50000 events, using only first 50000) I think it will be incomplete. Thank you for your reply nonetheless!&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2014 14:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150125#M42052</guid>
      <dc:creator>AndreasBalster</dc:creator>
      <dc:date>2014-05-02T14:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150126#M42053</link>
      <description>&lt;P&gt;Hi AndreasBalster,&lt;/P&gt;

&lt;P&gt;you can use &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.3/SearchReference/Streamstats"&gt;&lt;CODE&gt;streamstats&lt;/CODE&gt;&lt;/A&gt; for this. Given this log file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=123 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=123 session=456
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=456 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=124 exe=/etc/foo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=124 session=457
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=457 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=125 exe=/etc/boo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=125 session=458
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=458 acct=root
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=126 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=126 session=459
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=459 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=127 exe=/etc/foo.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=127 session=460
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=460 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=128 exe=/etc/bla.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=128 session=461
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=461 acct=root2
&amp;lt;TS&amp;gt; type_name=AUDIT_PATH callid=129 exe=/etc/sudoers.work
&amp;lt;TS&amp;gt; type_name=AUDIT_SYSCALL callid=129 session=462
&amp;lt;TS&amp;gt; type_name=AUDIT_USER_START session=462 acct=root2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I was able to use this search and got back a nice table of &lt;CODE&gt;callid, session, exe and acct&lt;/CODE&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=/var/tmp/myfoo type_name=AUDIT_PATH OR type_name=AUDIT_USER_START OR type_name=AUDIT_SYSCALL | streamstats current=f last(callid) AS last_callid last(session) AS last_session last(acct) AS last_acct  | where callid=last_callid | rename last_session AS session last_acct AS acct | table callid session acct exe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="http://answers.splunk.com//storage/Bildschirmfoto_vom_2014-05-05_08:46:19.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Since you got millions of events I cannot tell if this will perform at a good rate or if it will work at all, since I used the above test file and not your real world data.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2014 06:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150126#M42053</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-05T06:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150127#M42054</link>
      <description>&lt;P&gt;Sadly, this approach seems to be dependent on the order of events.. My data gets correlated in a non-matching fashion (it puts exes together with users that didn't call those). But many thanks for your reply!&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 07:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150127#M42054</guid>
      <dc:creator>AndreasBalster</dc:creator>
      <dc:date>2014-05-06T07:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate three events with differing properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150128#M42055</link>
      <description>&lt;P&gt;What is your expected output out of this? More information can help get better answers.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 13:21:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-three-events-with-differing-properties/m-p/150128#M42055</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-06T13:21:34Z</dc:date>
    </item>
  </channel>
</rss>

