<?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: AIX errpt timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40728#M7555</link>
    <description>&lt;P&gt;Thank you for your response.&lt;BR /&gt;
Hmmm...&lt;BR /&gt;
Now I'm getting "IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION" as one indexed entry, and the actual error itself as another entry. That wasn't the behavior I was expecting...&lt;BR /&gt;
If I'm not going to take the multikv approach, I could probably just "sed" out the headers...&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2010 23:04:03 GMT</pubDate>
    <dc:creator>Branden</dc:creator>
    <dc:date>2010-08-31T23:04:03Z</dc:date>
    <item>
      <title>AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40724#M7551</link>
      <description>&lt;P&gt;I know that Splunk can parse all different types of timestamps, but I've got a funky one. Here's the situation:&lt;/P&gt;

&lt;P&gt;AIX has a command called "errpt" which displays logged errors that the system has generated. It looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION
8650BE3F   0820122810 I H ent2           ETHERCHANNEL RECOVERY
F3846E13   0820122510 P H ent2           ETHERCHANNEL FAILOVER
8650BE3F   0820104410 I H ent2           ETHERCHANNEL RECOVERY
F3846E13   0820093810 P H ent2           ETHERCHANNEL FAILOVER
8650BE3F   0820090910 I H ent2           ETHERCHANNEL RECOVERY
CB4A951F   0819114610 I S SRC            SOFTWARE PROGRAM ERROR
CB4A951F   0819114510 I S SRC            SOFTWARE PROGRAM ERROR
DE3B8540   0817101710 P H hdisk0         PATH HAS FAILED
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks to my newly found friend (multikv) I know now what I want to do with this information. I currently have an app that runs the errpt command every few minutes. If a new one appears, it sends us an email. No big deal.&lt;/P&gt;

&lt;P&gt;The problem is we end up getting duplicate e-mails, especially if it logs multiple errors over the course of a minute, such as in the example above. &lt;/P&gt;

&lt;P&gt;What I'd like to do is parse that timestamp and have Splunk alert us only if new errpt entry has appeared since the previous search. (We run it every 5 minutes).&lt;/P&gt;

&lt;P&gt;The timestamp works like this: 0820122810  (08 = month, 20 = day, 12 = hour, 28 = min, 10 = year). &lt;/P&gt;

&lt;P&gt;I've tried to tackle this in the past in props.conf using TIME_FORMAT, but it never seems to work correctly. Does anyone have any suggestions?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2010 21:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40724#M7551</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-08-31T21:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40725#M7552</link>
      <description>&lt;P&gt;Are you setting the the TIME_FORMAT in props.conf correctly?&lt;/P&gt;

&lt;P&gt;[your_sourcetype]&lt;/P&gt;

&lt;P&gt;TIME_FORMAT=%m%d%H%M%y&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2010 21:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40725#M7552</guid>
      <dc:creator>Brian_Osburn</dc:creator>
      <dc:date>2010-08-31T21:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40726#M7553</link>
      <description>&lt;P&gt;I'm supposed to do that on the indexer (not the forwarder), right? Yes, my props.conf is set correctly I believe. But when its indexed, it indexes the time it captures it, not the timestamp of the errpt output. For example, just now:&lt;BR /&gt;
AA8AB241   0831104210 T O OPERATOR       OPERATOR NOTIFICATION&lt;/P&gt;

&lt;P&gt;Splunk's timestamp: 10:43:09.000&lt;/P&gt;

&lt;P&gt;I have the feeling I'm missing a step somewhere...&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2010 21:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40726#M7553</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-08-31T21:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40727#M7554</link>
      <description>&lt;P&gt;If you're getting this data out with &lt;CODE&gt;multikv&lt;/CODE&gt;, then &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; won't help you. &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; only takes effect at index time, and applies to one single event, so if you do configure that correctly (you'd probably need to set BREAK_ONLY_BEFORE_DATE to false, BREAK_ONLY_BEFORE to something new, TIME_PREFIX to something, and maybe MAX_TIMESTAMP_LOOKAHEAD as well) and Splunk picks it up, the entire event will have the timestamp of the first line.&lt;/P&gt;

&lt;P&gt;You &lt;EM&gt;could&lt;/EM&gt; make each line have the new timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | multikv | rex "^\S+\s+(?&amp;lt;_time&amp;gt;\S+)" | eval _time=strptime(_time,"%m%d%H%M%y")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It might be better to instead change how the data is input in the first place so every event is one line with its own timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = false
TIME_PREFIX = ^\S+\s+
TIME_FORMAT = %m%d%H%M%y
MAX_TIMESTAMP_LOOKAHEAD = 25
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then do an explicit field extraction to replace &lt;CODE&gt;multikv&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-fields = ^(?&amp;lt;ident&amp;gt;\S+)\s+(?&amp;lt;timestamp&amp;gt;\S+)\s+(?&amp;lt;t&amp;gt;\S+)\s+(?&amp;lt;c&amp;gt;\S+)\s+(?&amp;lt;resource&amp;gt;\S+)\s+(?&amp;lt;desc&amp;gt;.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Aug 2010 21:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40727#M7554</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-08-31T21:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40728#M7555</link>
      <description>&lt;P&gt;Thank you for your response.&lt;BR /&gt;
Hmmm...&lt;BR /&gt;
Now I'm getting "IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION" as one indexed entry, and the actual error itself as another entry. That wasn't the behavior I was expecting...&lt;BR /&gt;
If I'm not going to take the multikv approach, I could probably just "sed" out the headers...&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2010 23:04:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40728#M7555</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-08-31T23:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40729#M7556</link>
      <description>&lt;P&gt;Yeah, I skipped out dropping the headers. They don't hurt, and you can transform them out.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2010 23:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40729#M7556</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-08-31T23:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: AIX errpt timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40730#M7557</link>
      <description>&lt;P&gt;All set, working the way I need it to now. Thanks, both of you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2010 00:08:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AIX-errpt-timestamp/m-p/40730#M7557</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-01T00:08:28Z</dc:date>
    </item>
  </channel>
</rss>

