<?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 Remove host name in Account_Name field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-host-name-in-Account-Name-field/m-p/468027#M140136</link>
    <description>&lt;P&gt;When people RDP into a server, the results I am getting into splunk is Account_Name=Sever1$ Account_Name = jdoe.&lt;/P&gt;

&lt;P&gt;When I try to display the data in a table it displays...&lt;BR /&gt;
Account_Name:&lt;BR /&gt;
Server1$&lt;BR /&gt;
jdoe&lt;/P&gt;

&lt;P&gt;I want to remove the "Server1$" from field.&lt;/P&gt;

&lt;P&gt;One thing I will add, is this only happens sometime and not all of the time. Can there be a wildcard to remove anything before the "$". &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:35:25 GMT</pubDate>
    <dc:creator>Becherer</dc:creator>
    <dc:date>2020-09-30T05:35:25Z</dc:date>
    <item>
      <title>Remove host name in Account_Name field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-host-name-in-Account-Name-field/m-p/468027#M140136</link>
      <description>&lt;P&gt;When people RDP into a server, the results I am getting into splunk is Account_Name=Sever1$ Account_Name = jdoe.&lt;/P&gt;

&lt;P&gt;When I try to display the data in a table it displays...&lt;BR /&gt;
Account_Name:&lt;BR /&gt;
Server1$&lt;BR /&gt;
jdoe&lt;/P&gt;

&lt;P&gt;I want to remove the "Server1$" from field.&lt;/P&gt;

&lt;P&gt;One thing I will add, is this only happens sometime and not all of the time. Can there be a wildcard to remove anything before the "$". &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-host-name-in-Account-Name-field/m-p/468027#M140136</guid>
      <dc:creator>Becherer</dc:creator>
      <dc:date>2020-09-30T05:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove host name in Account_Name field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-host-name-in-Account-Name-field/m-p/468028#M140137</link>
      <description>&lt;P&gt;There are two ways to fix this.  You could change the way the fields are extracted or you can filter them out at search time.&lt;BR /&gt;
As these are representing machine accounts that may need to be traced at a later date, I would prefer not to stop splunk extracting them.&lt;BR /&gt;
My preferred way of doing this is with an eval function in search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | eval Account_Name=mvfilter(match(Account_Name, ".+[^$]$") )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is using mvfilter to remove fields that don't match a regex.  The regex is looking for &lt;CODE&gt;.*&lt;/CODE&gt; meaning anything followed by &lt;CODE&gt;[^$]&lt;/CODE&gt;meaning anything that is not a $ symbol then &lt;CODE&gt;$&lt;/CODE&gt; as an anchor meaning that must be the end of the field value.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-host-name-in-Account-Name-field/m-p/468028#M140137</guid>
      <dc:creator>bmunson_splunk</dc:creator>
      <dc:date>2020-06-02T07:24:59Z</dc:date>
    </item>
  </channel>
</rss>

