<?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: Parsing Redis logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79171#M20035</link>
    <description>&lt;P&gt;Can you please post a few sample lines of your Redis log(s)? &lt;BR /&gt;
Also, check the &lt;CODE&gt;source&lt;/CODE&gt; stanza as it looks like you may need to escape the periods and the &lt;CODE&gt;\d&lt;/CODE&gt; (digits). It is very likely that this is the problem - where logs are not being assigned &lt;CODE&gt;sourcetype=redis&lt;/CODE&gt; and therefore the timestamps are not being extracted properly. Run a quick test with this and see if data comes in with correct timestamps:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::.../redis/redis.log*]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;gt; please upvote and accept answer if you find it useful - thanks!&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2012 14:25:05 GMT</pubDate>
    <dc:creator>_d_</dc:creator>
    <dc:date>2012-02-27T14:25:05Z</dc:date>
    <item>
      <title>Parsing Redis logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79170#M20034</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I'm having trouble getting my Redis logs parsed correctly by Splunk, it gets the timestamps messed up.&lt;BR /&gt;
I have the following stanzas in my indexer props.conf&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;[source::.../redis/redis.log(.\d+(.gz)?)?]&lt;BR /&gt;
sourcetype=redis&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;[redis]&lt;BR /&gt;
NO_BINARY_CHECK=1&lt;BR /&gt;
TIME_PREFIX=[\d+]\s+&lt;BR /&gt;
TIME_FORMAT=%d %b %H:%M:%S&lt;BR /&gt;
&lt;/P&gt;The log filenames are in the format&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
/var/log/redis/redis.log&lt;BR /&gt;
/var/log/redis/redis.log.1&lt;BR /&gt;
/var/log/redis/redis.log.2.gz&lt;BR /&gt;
...&lt;/CODE&gt;&lt;/P&gt;&lt;BR /&gt;
The problem seems to be that the indexer doesn't want to apply the correct sourcetype to the logs, instead it uses redis.log-too_small and redis-too_small.&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79170#M20034</guid>
      <dc:creator>marksnelling</dc:creator>
      <dc:date>2020-09-28T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Redis logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79171#M20035</link>
      <description>&lt;P&gt;Can you please post a few sample lines of your Redis log(s)? &lt;BR /&gt;
Also, check the &lt;CODE&gt;source&lt;/CODE&gt; stanza as it looks like you may need to escape the periods and the &lt;CODE&gt;\d&lt;/CODE&gt; (digits). It is very likely that this is the problem - where logs are not being assigned &lt;CODE&gt;sourcetype=redis&lt;/CODE&gt; and therefore the timestamps are not being extracted properly. Run a quick test with this and see if data comes in with correct timestamps:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::.../redis/redis.log*]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;gt; please upvote and accept answer if you find it useful - thanks!&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 14:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79171#M20035</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2012-02-27T14:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Redis logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79172#M20036</link>
      <description>&lt;P&gt;I've tried both escaping and raw periods in this stanza with no effect. I should also add that the Redis data is coming from a Universal Forwarder.&lt;/P&gt;

&lt;P&gt;Here's a sample of the Redis logs...&lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;[3223] 26 Feb 23:59:01 * Background append only file rewriting started by pid 19383&lt;BR /&gt;
[19383] 26 Feb 23:59:01 * SYNC append only file rewrite performed&lt;BR /&gt;
[3223] 26 Feb 23:59:01 * Background append only file rewriting terminated with success&lt;BR /&gt;
rewritten.&lt;BR /&gt;
[3223] 26 Feb 23:59:01 * The new append only file was selected for future appends.&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 14:33:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79172#M20036</guid>
      <dc:creator>marksnelling</dc:creator>
      <dc:date>2012-02-27T14:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Redis logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79173#M20037</link>
      <description>&lt;P&gt;I would try the following (not sure whether the editor here is omitting YOUR backslashes but please note the backslashes in TIME_PREFIX): &lt;/P&gt;

&lt;P&gt;On the Universal Forwarder:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::.../redis/redis.log*]&lt;BR /&gt;
sourcetype = redis&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;On the Indexer:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[redis] &lt;BR /&gt;
NO_BINARY_CHECK = 1 &lt;BR /&gt;
TIME_PREFIX = \[\d+\]\s+ &lt;BR /&gt;
TIME_FORMAT = %d %b %H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;On the Indexer ONLY:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::.../redis/redis.log*]&lt;BR /&gt;
sourcetype = redis &lt;BR /&gt;
NO_BINARY_CHECK = 1 &lt;BR /&gt;
TIME_PREFIX = \[\d+\]\s+ &lt;BR /&gt;
TIME_FORMAT = %d %b %H:%M:%S&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 14:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79173#M20037</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2012-02-27T14:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Redis logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79174#M20038</link>
      <description>&lt;P&gt;Thanks, the first option worked.&lt;BR /&gt;
the editor was removing the back-slashes in my post.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 10:00:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing-Redis-logs/m-p/79174#M20038</guid>
      <dc:creator>marksnelling</dc:creator>
      <dc:date>2012-02-28T10:00:06Z</dc:date>
    </item>
  </channel>
</rss>

