<?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: loglevel detection incorrect - How do you re-align/transform it? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183682#M36784</link>
    <description>&lt;P&gt;Many thanks bshuler_splunk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
That's exactly what I'm looking for (and a classic case of RTFM!)&lt;BR /&gt;
Thanks for your patience and assistance - Much appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2014 15:55:59 GMT</pubDate>
    <dc:creator>Splunkdoobiest</dc:creator>
    <dc:date>2014-03-12T15:55:59Z</dc:date>
    <item>
      <title>loglevel detection incorrect - How do you re-align/transform it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183678#M36780</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm a relative newbie at this stuff so please bear with me if I am asking a stupid question.&lt;BR /&gt;
I have an index that has inputs from two logfiles in different formats:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Logfile 1:&lt;/EM&gt; &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;00:00:01|14|Debug|&amp;lt;Message Text&amp;gt;|&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Logfile2:&lt;/EM&gt; &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;2014-03-11 00:00:00,085 [alert1] INFO  &amp;lt;Message Text&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;loglevel is generally assigned correctly for Logfile2, but never for Logfile1, except when INFO, DEBUG, etc are contained in the message text (ie: not the actual log level as listed after the second pipe in the given example above.)&lt;/P&gt;

&lt;P&gt;Basically I would like to assign the correct Loglevel to messages from both sourcetypes such that should I query the index for a report against total loglevel messages for a given period, for example, I would actually end up with accurate results.&lt;/P&gt;

&lt;P&gt;I'm entirely certain my confusion is simple lack of experience, as I can happily generate simple queries and reports, but trying to align the data as per my requirement above is totally defeating me.&lt;/P&gt;

&lt;P&gt;Any suggestions would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 13:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183678#M36780</guid>
      <dc:creator>Splunkdoobiest</dc:creator>
      <dc:date>2014-03-12T13:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: loglevel detection incorrect - How do you re-align/transform it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183679#M36781</link>
      <description>&lt;P&gt;I suspect you have both logs set as the same sourcetype, and so your field extractions are colliding. Here is a workaround for that.&lt;/P&gt;

&lt;P&gt;You need to create 2 field extractions. Name the first loglevel, and the second loglevel2. The manage your field extractions, and change the ?P&lt;LOGLEVEL2&gt; to ?P&lt;LOGLEVEL&gt;&lt;/LOGLEVEL&gt;&lt;/LOGLEVEL2&gt;&lt;/P&gt;

&lt;P&gt;This will let you define multiple extractions with the same name, and allow you to support both logs.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://d.pr/i/KOME"&gt;http://d.pr/i/KOME&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 14:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183679#M36781</guid>
      <dc:creator>bshuler_splunk</dc:creator>
      <dc:date>2014-03-12T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: loglevel detection incorrect - How do you re-align/transform it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183680#M36782</link>
      <description>&lt;P&gt;Thanks bshuler_splunk!&lt;/P&gt;

&lt;P&gt;That certainly gets all the correct log-levels listed against the index.&lt;BR /&gt;
I defined the extractions as follows:&lt;BR /&gt;
Logfile1: (?i)^[^|]&lt;EM&gt;|\d+(?P&lt;LOGLEVEL&gt;|\w+|) &lt;BR /&gt;
Logfile2: (?i)^[^]]&lt;/LOGLEVEL&gt;&lt;/EM&gt;]\s+(?P&lt;LOGLEVEL&gt;[^ ]+)&lt;/LOGLEVEL&gt;&lt;/P&gt;

&lt;P&gt;Unfortunately I now end up with a slightly stranger mish-mash, owing to my extractions.  I now get loglevel duplicates like this:&lt;BR /&gt;
|Debug|&lt;BR /&gt;
DEBUG&lt;BR /&gt;
|Warn|&lt;BR /&gt;
WARN&lt;/P&gt;

&lt;P&gt;I just need to find a way to tell splunk that "|Warn| = WARN" etc...&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 14:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183680#M36782</guid>
      <dc:creator>Splunkdoobiest</dc:creator>
      <dc:date>2014-03-12T14:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: loglevel detection incorrect - How do you re-align/transform it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183681#M36783</link>
      <description>&lt;P&gt;Tags: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Abouttagsandaliases"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Abouttagsandaliases&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183681#M36783</guid>
      <dc:creator>bshuler_splunk</dc:creator>
      <dc:date>2014-03-12T15:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: loglevel detection incorrect - How do you re-align/transform it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183682#M36784</link>
      <description>&lt;P&gt;Many thanks bshuler_splunk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
That's exactly what I'm looking for (and a classic case of RTFM!)&lt;BR /&gt;
Thanks for your patience and assistance - Much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/loglevel-detection-incorrect-How-do-you-re-align-transform-it/m-p/183682#M36784</guid>
      <dc:creator>Splunkdoobiest</dc:creator>
      <dc:date>2014-03-12T15:55:59Z</dc:date>
    </item>
  </channel>
</rss>

