<?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 Cisco IOS and WLC time format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426697#M74775</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;we saw this log from cisco IOS in splunk:&lt;BR /&gt;
...Jul 4 16:43:42 HOSTNAME  19028: 10.1.1: Jul &lt;STRONG&gt;4&lt;/STRONG&gt; 16:43:42.804: %LINE.....&lt;/P&gt;

&lt;P&gt;and this from a WLC:&lt;BR /&gt;
...Jul 4 16:44:46 wlc-xxx WLXxxxxx: spamApTa7: Jul &lt;STRONG&gt;04&lt;/STRONG&gt; 16:44:46.583: %CAPWAP&lt;/P&gt;

&lt;P&gt;Please find the date definition with a leading zero and without.&lt;BR /&gt;
To speedup splunk index processing we would like to give Splunk a hint how to extract the time with the miliseconds. Per default there is no extraction of the partial seconds.&lt;/P&gt;

&lt;P&gt;Using the splunk_ta for extraction splunk uses the syslog time as the messages reaches the indexer. Splunk does not use the internal time:&lt;BR /&gt;
Splunk-Event-Time&lt;BR /&gt;
04/07/2018&lt;BR /&gt;
17:07:24.000&lt;BR /&gt;&lt;BR /&gt;
Syslog-Message:&lt;BR /&gt;
Jul  4 17:07:24 hostx 9481: 10.251.8.4: Jul  4 17:07:23.279: %PM-4-ERR_DISABLE: bpduguard XXXXX&lt;/P&gt;

&lt;P&gt;How can we help the index time processing to extract the correct time with miliseconds with both types of syslog-typs in one index?&lt;/P&gt;

&lt;P&gt;Or is it better to seperate the wlc and ios? Can we then use the Cisco-Dashboard app anymore as we have two indexes?&lt;/P&gt;

&lt;P&gt;Torsten&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:19:51 GMT</pubDate>
    <dc:creator>tfechner</dc:creator>
    <dc:date>2020-09-29T20:19:51Z</dc:date>
    <item>
      <title>Cisco IOS and WLC time format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426697#M74775</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;we saw this log from cisco IOS in splunk:&lt;BR /&gt;
...Jul 4 16:43:42 HOSTNAME  19028: 10.1.1: Jul &lt;STRONG&gt;4&lt;/STRONG&gt; 16:43:42.804: %LINE.....&lt;/P&gt;

&lt;P&gt;and this from a WLC:&lt;BR /&gt;
...Jul 4 16:44:46 wlc-xxx WLXxxxxx: spamApTa7: Jul &lt;STRONG&gt;04&lt;/STRONG&gt; 16:44:46.583: %CAPWAP&lt;/P&gt;

&lt;P&gt;Please find the date definition with a leading zero and without.&lt;BR /&gt;
To speedup splunk index processing we would like to give Splunk a hint how to extract the time with the miliseconds. Per default there is no extraction of the partial seconds.&lt;/P&gt;

&lt;P&gt;Using the splunk_ta for extraction splunk uses the syslog time as the messages reaches the indexer. Splunk does not use the internal time:&lt;BR /&gt;
Splunk-Event-Time&lt;BR /&gt;
04/07/2018&lt;BR /&gt;
17:07:24.000&lt;BR /&gt;&lt;BR /&gt;
Syslog-Message:&lt;BR /&gt;
Jul  4 17:07:24 hostx 9481: 10.251.8.4: Jul  4 17:07:23.279: %PM-4-ERR_DISABLE: bpduguard XXXXX&lt;/P&gt;

&lt;P&gt;How can we help the index time processing to extract the correct time with miliseconds with both types of syslog-typs in one index?&lt;/P&gt;

&lt;P&gt;Or is it better to seperate the wlc and ios? Can we then use the Cisco-Dashboard app anymore as we have two indexes?&lt;/P&gt;

&lt;P&gt;Torsten&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:19:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426697#M74775</guid>
      <dc:creator>tfechner</dc:creator>
      <dc:date>2020-09-29T20:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco IOS and WLC time format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426698#M74776</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;you will have to set a TIME_FORMAT and TIME_PREFIX for the cisco:ios sourcetype (see props.conf)&lt;/P&gt;

&lt;P&gt;Use something like Rubular.com to test it.&lt;/P&gt;

&lt;P&gt;For TIME_PREFIX this may work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = \S+:\s\S+:\s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However you may have false positives as it is very generic.&lt;BR /&gt;
Regarding TIME_FORMAT you may have issues with the asterisk. For IOS devices the asterisk is there to indicate that the time is not synced with NTP (ref. &lt;A href="https://networkengineering.stackexchange.com/questions/10168/interpreting-cisco-logging-symbols" target="_blank"&gt;https://networkengineering.stackexchange.com/questions/10168/interpreting-cisco-logging-symbols&lt;/A&gt;), but I am not sure if the meaning is the same for WLC.&lt;/P&gt;

&lt;P&gt;I prefer to trust the syslog server time instead of the device time for Cisco networking devices, but maybe that's just me.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426698#M74776</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2020-09-29T20:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco IOS and WLC time format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426699#M74777</link>
      <description>&lt;P&gt;The asterix  is a typo... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The problem  is to extract the time and date! (23:59:59-offset) - not the prefix.. The time format string according &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Commontimeformatvariables"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Commontimeformatvariables&lt;/A&gt; has no day extracting string for number with and without leading zero. You can use %d or $e.  There is no %XXX as for minutes like %M (do not care about leading zero)&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 06:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426699#M74777</guid>
      <dc:creator>tfechner</dc:creator>
      <dc:date>2018-07-05T06:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco IOS and WLC time format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426700#M74778</link>
      <description>&lt;P&gt;See (from &lt;A href="http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html"&gt;http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;%d&lt;BR /&gt;
The day of the month [01,31]; leading zeros are permitted but not required&lt;/P&gt;

&lt;P&gt;This should also work in Splunk&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 07:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426700#M74778</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2018-07-10T07:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco IOS and WLC time format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426701#M74779</link>
      <description>&lt;P&gt;@tfechner, I think Docs needs correction to description. However, as per Unix documentation %d picks up both date prefixed with 0 and not prefixed with 0. &lt;A href="http://pubs.opengroup.org/onlinepubs/7908799/xsh/strptime.html"&gt;http://pubs.opengroup.org/onlinepubs/7908799/xsh/strptime.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Following is a run anywhere search to demo _time being set from time field with both kind of dates.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval data="time=\"Jul 4 16:43:42.804\",time=\"Jul 04 16:44:46.583\""
| makemv data delim=","
| mvexpand data
| rename data as _raw
| KV
| eval _time=strptime(time,"%b %d %H:%M:%S.%3N")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To answer your other question, you should ideally create two different sourcetypes for data coming in two different formats from two systems. You can correlate them afterwards as per your requirement.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 07:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cisco-IOS-and-WLC-time-format/m-p/426701#M74779</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-07-10T07:56:37Z</dc:date>
    </item>
  </channel>
</rss>

