<?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 extract date/time and host fields from stack trace events and match with user events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171635#M49193</link>
    <description>&lt;P&gt;We get unformatted stack traces dumped into the same source type as our event logs.  I'd like to strip off the time/date and the host fields from events identified as a stack trace, probably truncate off the seconds from the time, and then use the time and host to re-search the logs looking for matching events to help diagnosing application issues.&lt;/P&gt;

&lt;P&gt;Could anyone suggest an approach for this?  Can one do some kind of join, or a subsearch?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Aug 2014 17:47:45 GMT</pubDate>
    <dc:creator>RVDowning</dc:creator>
    <dc:date>2014-08-05T17:47:45Z</dc:date>
    <item>
      <title>How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171635#M49193</link>
      <description>&lt;P&gt;We get unformatted stack traces dumped into the same source type as our event logs.  I'd like to strip off the time/date and the host fields from events identified as a stack trace, probably truncate off the seconds from the time, and then use the time and host to re-search the logs looking for matching events to help diagnosing application issues.&lt;/P&gt;

&lt;P&gt;Could anyone suggest an approach for this?  Can one do some kind of join, or a subsearch?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 17:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171635#M49193</guid>
      <dc:creator>RVDowning</dc:creator>
      <dc:date>2014-08-05T17:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171636#M49194</link>
      <description>&lt;P&gt;You might be able to utilize transaction command for this, may be based on host. Could you post some sample event logs and stack trace logs?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171636#M49194</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-05T18:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171637#M49195</link>
      <description>&lt;P&gt;Typical stack trace:&lt;BR /&gt;
20140805 12:01:09 unhandled error from dispatcher, sender:System.Windows.Threading.Dispatcher&lt;BR /&gt;
System.NullReferenceException: Object reference not set to an instance of an object.&lt;BR /&gt;
   at ........  System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)&lt;BR /&gt;
   at ...............&lt;BR /&gt;
host = A1122334 source = c:\logs\App1\MetricsLog.20140805.8232.log sourcetype = OurSourceType&lt;/P&gt;

&lt;P&gt;Typical log entry follows in next message:&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171637#M49195</guid>
      <dc:creator>RVDowning</dc:creator>
      <dc:date>2014-08-05T18:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171638#M49196</link>
      <description>&lt;P&gt;Typical log entry:&lt;/P&gt;

&lt;P&gt;20140805 13:59:22 [PERF] [GRID APPLY CHANGES START] Action=GridApplyChanges, Guid=8c1551d8-1fc2-478e-a425-aa5535690057, PlanId=8df9ab68-3d08-48d5-a5de-a36f00cd68ac, PlanName=MYPlanName, Dept=123, StartPeriod=2015 P1 (FEBRUARY), EndPeriod=2015 P3 (APRIL), NumPeriods=3, EstimatedColumns=25, NumPlanRows=59, RPRows=0, SQAs=37524, SFAs=112572, NumDoors=636, AppliedBy=userid/a123456, AffProcessSize=1.03GB, Build=5.1.6.16392, Env=PRODUCTION, OSArch=64-bit, NetworkConnection=Local Area Connection, IPAddress=11.22.33.44, HostName=a1122334, ConnectionStatus=Connected, PlanMode=Server&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171638#M49196</guid>
      <dc:creator>RVDowning</dc:creator>
      <dc:date>2014-08-05T18:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171639#M49197</link>
      <description>&lt;P&gt;I can see we have host field matching between these two logs using which a transaction can be created. Have a look at that.&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can define how the grouping should be done, may be based on the maximum duration/span during which both of these events occur.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171639#M49197</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-05T18:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171640#M49198</link>
      <description>&lt;P&gt;Don't think I follow how this would be set up.  I'm really only interested in those transactions during which an exception occurred.  I've used transactions before but I don't see how it applies.  &lt;/P&gt;

&lt;P&gt;It seems to me that I need a search that identifies stacktraces and then does some kind of join or subsearch using the host and time.&lt;/P&gt;

&lt;P&gt;Since there is a stacktrace there is not the normal end-of-transaction entry, such as [GRID APPLY CHANGES END]&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171640#M49198</guid>
      <dc:creator>RVDowning</dc:creator>
      <dc:date>2014-08-05T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171641#M49199</link>
      <description>&lt;P&gt;May be something like this (say normal events logs and stacktrace logs are maximum 5 min apart)&lt;/P&gt;

&lt;P&gt;sourcetype=yourSourceType | transaction host maxspan=5m startswith="GRID APPLY CHANGES START" endswith="error"&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171641#M49199</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-05T18:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date/time and host fields from stack trace events and match with user events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171642#M49200</link>
      <description>&lt;P&gt;You could try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="whatever" Guid="*" | eval time=_time | search [search sourcetype="whatever" NOT Guid="*" | eval time=strptime(substr(_raw,1,18)) | rename host AS HostName | fields time,HostName]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Of course, this assumes that the stacktrace events will have the exact same time stamp as the typical log entry you are interested in.  It also assumes all typical events have a value in Guid field and that none of the stacktrace events have the Guid field.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 03:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-time-and-host-fields-from-stack-trace-events/m-p/171642#M49200</guid>
      <dc:creator>gauldridge</dc:creator>
      <dc:date>2014-08-08T03:14:54Z</dc:date>
    </item>
  </channel>
</rss>

