<?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: What is the best practice for avoiding irrelevant date in Cisco log being taken as time stamp? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438702#M76483</link>
    <description>&lt;P&gt;In the props.conf use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:ios]
MAX_TIMESTAMP_LOOKAHEAD=15
TIME_FORMAT=%b %d %H:%M:%S      
TIME_PREFIX =^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD --&amp;gt; The number of characters into an event Splunk software should look&lt;BR /&gt;
  for a timestamp.&lt;BR /&gt;
TIME_FORMAT --&amp;gt;Specifies a "strptime" format string to extract the date.&lt;BR /&gt;
TIME_PREFIX --&amp;gt;If set, Splunk software scans the event text for a match for this regex. In this case the ^ asserts position at start of a line &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:02:22 GMT</pubDate>
    <dc:creator>Azeemering</dc:creator>
    <dc:date>2020-09-30T01:02:22Z</dc:date>
    <item>
      <title>What is the best practice for avoiding irrelevant date in Cisco log being taken as time stamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438701#M76482</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
what would be the best practice for avoiding that a recent log line like the following one would be wrongly tagged as coming from two years ago? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 23 23:15:47 cisco123.mylocal.net Compiled Fri 20-Oct-17 20:51 by prod_rel_team

 current sourcetype: cisco:ios
 _time: 2017-10-20T23:15:47.000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My plan would be setting a specific subtype and disabling the timestamp processor for that particular case.&lt;BR /&gt;
transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set_subtype_compiled_message]
REGEX = Compiled\s\w+\s\d+-\w+-\d+\s\d+:\d+\sby
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype:cisco:ios_compiled
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:ios]
TRANSFORMS-set_subtype_compiled_message

[cisco:ios_compiled]
DATETIME_CONFIG = NONE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any better ideas, pros and cons?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Bernd&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 09:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438701#M76482</guid>
      <dc:creator>bkatzlin</dc:creator>
      <dc:date>2019-06-24T09:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best practice for avoiding irrelevant date in Cisco log being taken as time stamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438702#M76483</link>
      <description>&lt;P&gt;In the props.conf use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:ios]
MAX_TIMESTAMP_LOOKAHEAD=15
TIME_FORMAT=%b %d %H:%M:%S      
TIME_PREFIX =^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD --&amp;gt; The number of characters into an event Splunk software should look&lt;BR /&gt;
  for a timestamp.&lt;BR /&gt;
TIME_FORMAT --&amp;gt;Specifies a "strptime" format string to extract the date.&lt;BR /&gt;
TIME_PREFIX --&amp;gt;If set, Splunk software scans the event text for a match for this regex. In this case the ^ asserts position at start of a line &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438702#M76483</guid>
      <dc:creator>Azeemering</dc:creator>
      <dc:date>2020-09-30T01:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best practice for avoiding irrelevant date in Cisco log being taken as time stamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438703#M76484</link>
      <description>&lt;P&gt;Never ever let splunk guess at timestamp; always set the &lt;CODE&gt;magic 6&lt;/CODE&gt;:&lt;BR /&gt;
&lt;A href="https://www.sicherevielfalt.de/blog/the-ultimate-splunk-magic-8-for-a-dramatic-performance-boost/"&gt;https://www.sicherevielfalt.de/blog/the-ultimate-splunk-magic-8-for-a-dramatic-performance-boost/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/4162/"&gt;https://splunkbase.splunk.com/app/4162/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 14:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438703#M76484</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-24T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best practice for avoiding irrelevant date in Cisco log being taken as time stamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438704#M76485</link>
      <description>&lt;P&gt;Reminds me of &lt;A href="https://answers.splunk.com/answers/704533/what-are-the-best-practices-for-defining-source-ty.html"&gt;What are the best practices for defining source types?&lt;/A&gt; so cross linking.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-practice-for-avoiding-irrelevant-date-in-Cisco/m-p/438704#M76485</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2019-07-16T15:26:59Z</dc:date>
    </item>
  </channel>
</rss>

