<?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: Why do special characters &amp;quot;[0[0m&amp;quot; appear in my events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252733#M48611</link>
    <description>&lt;P&gt;Interesting, we see these characters here as well - &lt;A href="https://s3.amazonaws.com/archive.travis-ci.org/jobs/151408640/log.txt"&gt;archive.travis-ci.org&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 16:25:26 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2016-12-01T16:25:26Z</dc:date>
    <item>
      <title>Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252732#M48610</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I deploy Splunk forwarder on a JBoss server to forward data towards my test environment Splunk. &lt;/P&gt;

&lt;P&gt;In the Universal Forwarder (UF) monitor file server.log file, the line &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01/12/16 15:11:50,398 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015950: JBoss EAP 6.4.8.GA (AS 7.5.8.Final-redhat-2) stopped in 358ms
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is transfomed by the event below &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;#27;[0m&amp;#27;[0m01/12/16 15:11:50,398 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015950: JBoss EAP 6.4.8.GA (AS 7.5.8.Final-redhat-2) stopped in 358ms
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All lines is prepended by characters &lt;CODE&gt;[0m[0m&lt;/CODE&gt; for INFO message or &lt;CODE&gt;[0[31m&lt;/CODE&gt; when it's a ERROR message&lt;/P&gt;

&lt;P&gt;Someone can explain why? &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 14:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252732#M48610</guid>
      <dc:creator>pmerlin1</dc:creator>
      <dc:date>2016-12-01T14:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252733#M48611</link>
      <description>&lt;P&gt;Interesting, we see these characters here as well - &lt;A href="https://s3.amazonaws.com/archive.travis-ci.org/jobs/151408640/log.txt"&gt;archive.travis-ci.org&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 16:25:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252733#M48611</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-12-01T16:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252734#M48612</link>
      <description>&lt;P&gt;A shot in the dark will be the log lines might have colour coding info in them to appear colourful on console, however when they are sent over to Splunk this colour coding stays preserved as part of log line. Generally the colour code numbers are as follows clubbed together with &lt;CODE&gt;[ and m&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Black        0;30     Dark Gray     1;30
Red          0;31     Light Red     1;31
Green        0;32     Light Green   1;32
Brown/Orange 0;33     Yellow        1;33
Blue         0;34     Light Blue    1;34
Purple       0;35     Light Purple  1;35
Cyan         0;36     Light Cyan    1;36
Light Gray   0;37     White         1;37
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can try to rex them out using something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query to return the event
| rex mode=sed field=_raw "s/\[[0-9]+m//g"
| complete your query
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252734#M48612</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-12-01T19:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252735#M48613</link>
      <description>&lt;P&gt;Thank you gokrakoid&lt;BR /&gt;
I prefer to strip the color codes before indexing &lt;BR /&gt;
I try in transforms.conf on my indexer :&lt;BR /&gt;
[MyLOG-stripper-colorcodes]&lt;BR /&gt;
REGEX = ^[\d+m[\d+m(.*)$&lt;BR /&gt;
FORMAT = $1&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;but it deosn't work. The characters are not removed still. Any idea ?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 22:42:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252735#M48613</guid>
      <dc:creator>pmerlin1</dc:creator>
      <dc:date>2016-12-01T22:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252736#M48614</link>
      <description>&lt;P&gt;Can you try to escape any special characters like &lt;CODE&gt;[&lt;/CODE&gt; to make it &lt;CODE&gt;\[&lt;/CODE&gt; or try to see if &lt;CODE&gt;sedcmd&lt;/CODE&gt; can assist to do that in &lt;CODE&gt;props.conf&lt;/CODE&gt;?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your:sourcetype]
  SEDCMD-rep_1 = s/\[[0-9]+m//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please note that you will have other properties as well in &lt;CODE&gt;props.conf&lt;/CODE&gt; so do not remove them for &lt;CODE&gt;your:sourcetype&lt;/CODE&gt;. Just append the line &lt;CODE&gt;SEDCMD-rep_1 = s/\[[0-9]+m//g&lt;/CODE&gt; to existing properties.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252736#M48614</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-12-01T23:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252737#M48615</link>
      <description>&lt;P&gt;Thanks gokadroit.&lt;BR /&gt;
I solve my color syntaxing issue, in modfying my custom java log handler . I dont want report the clean effort on Splunk. I remove %K{level}% of the pattern in the logger configuration.&lt;BR /&gt;
Now it works the event is display without color codes.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 09:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252737#M48615</guid>
      <dc:creator>pmerlin1</dc:creator>
      <dc:date>2016-12-02T09:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252738#M48616</link>
      <description>&lt;P&gt;This solution is working for us very well. &lt;/P&gt;

&lt;P&gt;I can combine it with my query and rex does the job. I can create macros too. &lt;/P&gt;

&lt;P&gt;| rex mode=sed field=_raw "s/[[0-9]+m//g"&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 21:58:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252738#M48616</guid>
      <dc:creator>mahendra5</dc:creator>
      <dc:date>2017-07-14T21:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why do special characters "[0[0m" appear in my events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252739#M48617</link>
      <description>&lt;P&gt;@gokadroid &lt;BR /&gt;
this works perfect, sourectype can easily eliminate those before even it gets indexed. &lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 22:17:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-special-characters-quot-0-0m-quot-appear-in-my-events/m-p/252739#M48617</guid>
      <dc:creator>mahendra5</dc:creator>
      <dc:date>2017-07-14T22:17:59Z</dc:date>
    </item>
  </channel>
</rss>

