<?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: multikv row timestamp extraction in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78750#M16124</link>
    <description>&lt;P&gt;First, assume that the first column is extracted into a field called "T". You can calculate the full timestamp as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt; | multikv &amp;lt;params&amp;gt; | eval timestamp = _time + strptime(T, "%H:%M") | 
fieldformat timestamp = strftime(timestamp,"%x %X") | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you can use the new field called "timestamp" instead of _time in the remainder of your command...&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2012 03:41:22 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-02-27T03:41:22Z</dc:date>
    <item>
      <title>multikv row timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78749#M16123</link>
      <description>&lt;P&gt;I'm trying to figure out the best way to extract a time stamp (not date) from a row when using multikv.&lt;/P&gt;

&lt;P&gt;Here's the raw data:&lt;/P&gt;

&lt;P&gt;" AIX Net Activity  for Sunday, January 1, 2012  (00:00-00:00) (1) es2p375p"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;         CPU            KB       PKTS            PKT ERRS          
  ------------------ --------- --------- ------------------------- 
  %I  %K %U %W logc   I    O    I    O   In errs O errs Collisions 
  --- -- -- -- ----- ---- ---- ---- ---- ------- ------ ---------- 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;20:00  95  4  1  0  0.40    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
18:00  95  4  1  0  0.38    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
16:00  95  4  1  0  0.38    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
14:00  94  4  1  0  0.42    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
12:00  95  4  1  0  0.41    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
10:00  95  4  1  0  0.40    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
08:00  95  4  1  0  0.41    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
06:00  86  4  5  5  0.73    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
04:00  85  5  7  3  0.95    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
02:00  93  5  1  1  0.51    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
00:24  95  3  1  0  0.36    0    0    *    *     *       *        *&lt;BR /&gt;&lt;BR /&gt;
      --- -- -- -- ----- ---- ---- ---- ---- ------- ------ ---------- &lt;BR /&gt;
SUM:                        0    0&lt;BR /&gt;&lt;BR /&gt;
AVG:   93  4  2  1  0.49    0    0                                     &lt;/P&gt;

&lt;P&gt;I've already configured the multikv.conf and props.conf files to parse the log and extract the fields properly (there are multiple tables in a single log file, one table for each day). &lt;/P&gt;

&lt;P&gt;Splunk see's each table as a different day, but the timestamp for each event/row is always 00:00, as opposed to the time in the first field of the event row. For example, the row&lt;/P&gt;

&lt;P&gt;20:00  95  4  1  0  0.40    0    0    *    *     *       *        *    &lt;/P&gt;

&lt;P&gt;Will have a date/time stamp of January 1, 2012 00:00, instead of January 1, 2012 20:00.&lt;/P&gt;

&lt;P&gt;Any ideas on the best way to solve this? All suggestions are welcome. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2012 20:19:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78749#M16123</guid>
      <dc:creator>kubowler99</dc:creator>
      <dc:date>2012-02-25T20:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: multikv row timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78750#M16124</link>
      <description>&lt;P&gt;First, assume that the first column is extracted into a field called "T". You can calculate the full timestamp as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt; | multikv &amp;lt;params&amp;gt; | eval timestamp = _time + strptime(T, "%H:%M") | 
fieldformat timestamp = strftime(timestamp,"%x %X") | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you can use the new field called "timestamp" instead of _time in the remainder of your command...&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 03:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78750#M16124</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-02-27T03:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: multikv row timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78751#M16125</link>
      <description>&lt;P&gt;Thanks, lguinn. Will give it a shot and post results.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 13:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78751#M16125</guid>
      <dc:creator>kubowler99</dc:creator>
      <dc:date>2012-02-27T13:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: multikv row timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78752#M16126</link>
      <description>&lt;P&gt;Thanks, again.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I don't think the above is completely accurate, as I modified the strftime to (timestamp, "%B %d, %Y %H:%M") to get the full date, and both the day and time are off. Instead of January 5, 2012 19:00, it returns March 02, 2054 01:00.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I'm assuming it's the eval statement that may need to be modified, but not sure.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 14:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78752#M16126</guid>
      <dc:creator>kubowler99</dc:creator>
      <dc:date>2012-02-27T14:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: multikv row timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78753#M16127</link>
      <description>&lt;P&gt;Yeah - looks like the strptime(T, "%H:%M") is being evaluated with a Month, Day, Year, in addition to the Hour:Minute, which is hosing the epochtime. For example, when I only have 'eval timestamp = strptime(T, "%H:%M"), and T="19:00", timestamp returns as February 26, 2012 19:00. This would explain why your solution returns the March 02, 2054 01:00 timestamp. &lt;/P&gt;

&lt;P&gt;Back to the drawing board, I guess. Still working on it.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 15:08:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-row-timestamp-extraction/m-p/78753#M16127</guid>
      <dc:creator>kubowler99</dc:creator>
      <dc:date>2012-02-27T15:08:15Z</dc:date>
    </item>
  </channel>
</rss>

