<?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: FieldAlias Setup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52962#M179684</link>
    <description>&lt;P&gt;Your second &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt; statement will override the first.&lt;/P&gt;

&lt;P&gt;Try adding an extension so that you have two unique entries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELDALIAS-acct = acct AS account
FIELDALIAS-username = User_Name AS account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternately, you can have both aliases in a single line. If you go that route, you will still override any previously defined value for &lt;CODE&gt;FIELDALIAS=&lt;/CODE&gt;, so it's still a good idea to add a qualifier as shown above.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2010 20:26:31 GMT</pubDate>
    <dc:creator>southeringtonp</dc:creator>
    <dc:date>2010-09-17T20:26:31Z</dc:date>
    <item>
      <title>FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52961#M179683</link>
      <description>&lt;P&gt;I'm trying to setup Fieldalias and not getting desire results.  Here is what I have put into the props.conf file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  FIELDALIAS = acct AS account
  FIELDALIAS = User_Name AS account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something??&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2010 20:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52961#M179683</guid>
      <dc:creator>wildbill4</dc:creator>
      <dc:date>2010-09-17T20:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52962#M179684</link>
      <description>&lt;P&gt;Your second &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt; statement will override the first.&lt;/P&gt;

&lt;P&gt;Try adding an extension so that you have two unique entries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELDALIAS-acct = acct AS account
FIELDALIAS-username = User_Name AS account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternately, you can have both aliases in a single line. If you go that route, you will still override any previously defined value for &lt;CODE&gt;FIELDALIAS=&lt;/CODE&gt;, so it's still a good idea to add a qualifier as shown above.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2010 20:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52962#M179684</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-17T20:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52963#M179685</link>
      <description>&lt;P&gt;Does it matter where in the props.conf file I input the FIELDALIAS information?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2010 20:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52963#M179685</guid>
      <dc:creator>wildbill4</dc:creator>
      <dc:date>2010-09-17T20:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52964#M179686</link>
      <description>&lt;P&gt;It will have to be in a stanza that matches the sourcetype (or host, or source) for which you want to set the field alias. Other than that, it doesn't matter as long as it's a unique entry as above. If it's non-unique, then you have to worry about precedence rules, since another entry could override it (possibly from a different app). Also, I'm assuming you're only trying to use it within the search app -- if you need it across multiple apps you'll need to check the permissions and make sure it's set to global.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2010 21:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52964#M179686</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-17T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52965#M179687</link>
      <description>&lt;P&gt;Thanks for the assistance&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2010 21:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52965#M179687</guid>
      <dc:creator>wildbill4</dc:creator>
      <dc:date>2010-09-17T21:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: FieldAlias Setup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52966#M179688</link>
      <description>&lt;P&gt;Unfortunately, field aliasing is one-to-one, and won't allow you to map many-to-one. The reason is that if orig_field doesn't exist, a blank value will be assigned to new_field. &lt;/P&gt;

&lt;P&gt;Consider an event that has only the acct field. Both FIELDALIAS directives will be evaluated. Lexicographically, FIELDALIAS-acct runs first and successfully aliases acct as account. But when FIELDALIAS-username runs it finds no User_Name field, so the result is the account field will be blank.&lt;/P&gt;

&lt;P&gt;There are two ways to work around this.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Use props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REPORT-alias_account = acct_as_account,User_Name_as_account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[acct_as_account]
SOURCE_KEY = acct
REGEX = (?&amp;lt;account&amp;gt;.+)
[User_Name_as_account]
SOURCE_KEY = User_Name
REGEX = (?&amp;lt;account&amp;gt;.+)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Use the search language:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval account= IF(ISNULL(acct),User_Name,acct)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 19 Oct 2010 08:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FieldAlias-Setup/m-p/52966#M179688</guid>
      <dc:creator>Dan</dc:creator>
      <dc:date>2010-10-19T08:05:08Z</dc:date>
    </item>
  </channel>
</rss>

