<?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: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227411#M44350</link>
    <description>&lt;P&gt;sorry there is typo in config. here is the correct one&lt;/P&gt;

&lt;P&gt;EXTRACT-logvalue=^=(?logvalue(INFO|ERROR|WARN))&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2016 16:43:51 GMT</pubDate>
    <dc:creator>krishnani</dc:creator>
    <dc:date>2016-08-12T16:43:51Z</dc:date>
    <item>
      <title>I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227406#M44345</link>
      <description>&lt;P&gt;I created a field and it has 3 values. I just want change one of the values from WARNING to WARN using lookups(.CSV). I also want to know how to configure it in props.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 20:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227406#M44345</guid>
      <dc:creator>krishnani</dc:creator>
      <dc:date>2016-08-11T20:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227407#M44346</link>
      <description>&lt;P&gt;You want to change the value of an extracted field? Why you want to use lookup if you know which value to be replaced with which? You can achieve that using a simple eval/replace command. Further, same can be saved in props.conf on SH to make it happen automatically for your data.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 21:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227407#M44346</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-11T21:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227408#M44347</link>
      <description>&lt;P&gt;If you want to make the change before indexing, you could try sed to replace text. Something like this in your &lt;CODE&gt;props&lt;/CODE&gt; should work &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-warn = s/(WARNING)/WARN/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: This will only affect new data coming in.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 22:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227408#M44347</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-11T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227409#M44348</link>
      <description>&lt;P&gt;You can also modify it in your searches at search_time:&lt;BR /&gt;
| eval yourfield=if(yourfield="WARNING","WARN",yourfield)&lt;BR /&gt;
in this way tou maintain logs as originals and show them as you want&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 06:48:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227409#M44348</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-08-12T06:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227410#M44349</link>
      <description>&lt;P&gt;I updated the my extracted field and values in props.conf like this &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;- EXTRACT-logvalue=^=(?(INFO|ERROR|WARN))&lt;/STRONG&gt;&lt;BR /&gt;
 - it's working fine now but in the above config I hardcoded my values but I want to hardcode only WARN as in future we're expecting more values will come under same sourcetype. if a new value come in to the same sourcetype I need to hard code every value in props.conf.&lt;/P&gt;

&lt;P&gt;So I would like to update my regex will update only from "WARNING" to "WARN" and rest other values (INFO,ERROR etc) need to add automatically to "logvalue" field without hardcoding.&lt;/P&gt;

&lt;P&gt;Any suggestions on regex?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 16:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227410#M44349</guid>
      <dc:creator>krishnani</dc:creator>
      <dc:date>2016-08-12T16:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227411#M44350</link>
      <description>&lt;P&gt;sorry there is typo in config. here is the correct one&lt;/P&gt;

&lt;P&gt;EXTRACT-logvalue=^=(?logvalue(INFO|ERROR|WARN))&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 16:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227411#M44350</guid>
      <dc:creator>krishnani</dc:creator>
      <dc:date>2016-08-12T16:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: I created a field that has 3 values. How can I change one of the values from WARNING to WARN using lookups?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227412#M44351</link>
      <description>&lt;P&gt;Try this as your props.conf entry for field extraction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
EXTRACT-logvalue=^=(?&amp;lt;logLevel&amp;gt;(WARN|\w+))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Working example (run anywhere search) to validate regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval temp="=WARNING =ERROR =INFO =FATAL =SOMETHINGELSE" | table temp | makemv temp | mvexpand temp | rename temp as _raw | rex "^=(?&amp;lt;logLevel&amp;gt;(WARN|\w+))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Aug 2016 17:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-created-a-field-that-has-3-values-How-can-I-change-one-of-the/m-p/227412#M44351</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-12T17:02:43Z</dc:date>
    </item>
  </channel>
</rss>

