<?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: combine two log files to eachother no corresponding fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193526#M55708</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I made this search:&lt;/P&gt;

&lt;P&gt;tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/saml*" loglevel=ERROR earliest=-5d@d latest=now |join _time [search tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/access*" earliest=-5d@d latest=now]&lt;/P&gt;

&lt;P&gt;But no results, am I doing something wrong?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:57:11 GMT</pubDate>
    <dc:creator>arjangoos</dc:creator>
    <dc:date>2020-09-28T19:57:11Z</dc:date>
    <item>
      <title>combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193522#M55704</link>
      <description>&lt;P&gt;We have an access_log file with an 500 error and want to relate this to the application log of the application:&lt;/P&gt;

&lt;P&gt;access_log:&lt;BR /&gt;
84.86.179.166 - - 16 0.016 [12/May/2015:15:27:01 +0200] GET /wmo/wicket/bookmarkable/nl.rotterdam.ioo.wmo.web.wizard.pages.OverzichtPage?18 HTTP/1.1" 500 3961 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko ZrD6VR3+lj9yqADqNbE3RFxE"&lt;/P&gt;

&lt;P&gt;application_log:&lt;BR /&gt;
ERROR | [http-jboss-local/10.9.8.162:8430-14] | 2015-05-12 15:27:01,160 | org.apache.wicket.DefaultExceptionMapper.java | Unexpected error occurred&lt;BR /&gt;
java.lang.NullPointerException&lt;/P&gt;

&lt;P&gt;How can we relate these two files/lines together? &lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 13:49:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193522#M55704</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2015-05-12T13:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193523#M55705</link>
      <description>&lt;P&gt;Hi.. purely from the info above, looks like the only common element seems to be time. So if that holds good across all records maybe you can just do a join on time. That being said, you can also consider using lookup tables to tie/map the source hosts appropriately.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 14:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193523#M55705</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-05-12T14:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193524#M55706</link>
      <description>&lt;P&gt;Ok but how can I do that?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 14:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193524#M55706</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2015-05-12T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193525#M55707</link>
      <description>&lt;P&gt;Assuming x is your index (and both sources are in the same index) you can try something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x earliest=-5h@h latest=now source="access_log"|join _time [search index=x earliest=-5h@h latest=now source="application_log"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above is just a format... use appropriate fields (maybe sourcetype .... if relevant to your case) in the search.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 14:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193525#M55707</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-05-12T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193526#M55708</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I made this search:&lt;/P&gt;

&lt;P&gt;tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/saml*" loglevel=ERROR earliest=-5d@d latest=now |join _time [search tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/access*" earliest=-5d@d latest=now]&lt;/P&gt;

&lt;P&gt;But no results, am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193526#M55708</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2020-09-28T19:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193527#M55709</link>
      <description>&lt;P&gt;Hmm... not sure. Can be be whole bunch of things &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;    ... do you have all the required access /are tags defined in app context etc?? but are you seeing results if you run those searches individually?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/saml*" loglevel=ERROR earliest=-5d@d latest=now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::host="jboss_prod" source="/usr/share/jbossas/domain/log/servers/sso/access*" earliest=-5d@d latest=now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the above are working independently, which is the larger dataset? are the time stamps matching?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 15:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193527#M55709</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-05-12T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: combine two log files to eachother no corresponding fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193528#M55710</link>
      <description>&lt;P&gt;I recently had to solve the same situation and came up with using the &lt;CODE&gt;transaction&lt;/CODE&gt; command, so your search would look like this&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;tag::host="jboss_prod" (source="/usr/share/jbossas/domain/log/servers/sso/saml*" AND loglevel=ERROR) OR &lt;BR /&gt;
(source="/usr/share/jbossas/domain/log/servers/sso/access*" AND status=500)  |  &lt;BR /&gt;
transaction host startswith=loglevel=ERROR endswith=status=500 maxspan=1s&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;ANDs&lt;/CODE&gt; are for pure readability ... Not sure if the field name for your HTTP status codes is &lt;CODE&gt;status&lt;/CODE&gt; but you might get the point.&lt;/P&gt;

&lt;P&gt;So with the search command you filter for either loglevel=ERROR in your Jboss Logfile or for any HTTP status=500 in your access_log, then starting a transaction, make sure that the host value is the same for Exception and HTTP 500 and finally maxspan=1s as the ERROR is followed by the HTTP 500 in less than a second.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 09:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-log-files-to-eachother-no-corresponding-fields/m-p/193528#M55710</guid>
      <dc:creator>cruschke_bde</dc:creator>
      <dc:date>2015-05-13T09:11:27Z</dc:date>
    </item>
  </channel>
</rss>

