<?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 isn't the rename command not renaming fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465857#M131206</link>
    <description>&lt;P&gt;This only shows Red Hat results for some reason&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 16:04:24 GMT</pubDate>
    <dc:creator>payton_tayvion</dc:creator>
    <dc:date>2019-08-29T16:04:24Z</dc:date>
    <item>
      <title>Why isn't the rename command not renaming fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465853#M131202</link>
      <description>&lt;P&gt;I'm currently creating a list that lists top 10 technologies and I'm trying to rename "Red" as "Red Hat" using the rename command.&lt;BR /&gt;
Here's the query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=f dc(Vulnerabilities.signature) as count from datamodel="Vulnerabilitiesv3" where (nodename="Vulnerabilities" (Vulnerabilities.severity!=informational Vulnerabilities.severity!=unknown) Vulnerabilities.dest_bunit IN (*) Vulnerabilities.property IN (*) ) by Vulnerabilities.dest, Vulnerabilities.signature, Vulnerabilities.point_of_contact, Vulnerabilities.solution
| rename Vulnerabilities.* AS * 
| rename signature as sig
| lookup workday.csv shortid as point_of_contact output l1, l2,l3,l4
| search (l1="*" OR l2="*" OR l3="*" OR l4="*")
| fields - point_of_contact
| rex field=sig "^(?&amp;lt;Technology&amp;gt;[^\W]++)"
| stats sum(count) as count by Technology
| sort- count 
| head 10
| rename Red as "Red Hat"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Technology  count
 RHEL   6906424
Oracle  1507478
CentOS  402534
Network 186231
Ubuntu  129319
Red 109693
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Aug 2019 14:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465853#M131202</guid>
      <dc:creator>payton_tayvion</dc:creator>
      <dc:date>2019-08-29T14:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't the rename command not renaming fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465854#M131203</link>
      <description>&lt;P&gt;you can rename technology as something else or count as say counts , to achieve this&lt;BR /&gt;
try&lt;BR /&gt;
|eval Technology=case(Technology="Red","Red Hat")&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 15:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465854#M131203</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-29T15:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't the rename command not renaming fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465855#M131204</link>
      <description>&lt;P&gt;try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=f dc(Vulnerabilities.signature) as count from datamodel="Vulnerabilitiesv3" where (nodename="Vulnerabilities" (Vulnerabilities.severity!=informational Vulnerabilities.severity!=unknown) Vulnerabilities.dest_bunit IN (*) Vulnerabilities.property IN (*) ) by Vulnerabilities.dest, Vulnerabilities.signature, Vulnerabilities.point_of_contact, Vulnerabilities.solution
 | rename Vulnerabilities.* AS * 
 | rename signature as sig
 | lookup workday.csv shortid as point_of_contact output l1, l2,l3,l4
 | search (l1="*" OR l2="*" OR l3="*" OR l4="*")
 | fields - point_of_contact
 | rex field=sig "^(?&amp;lt;Technology&amp;gt;[^\W]++)"
 | stats sum(count) as count by Technology
 | sort- count 
 | head 10
 | replace Red WITH "Red Hat" IN  Technology
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 15:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465855#M131204</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-08-29T15:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't the rename command not renaming fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465856#M131205</link>
      <description>&lt;P&gt;You are using the wrong command.  The &lt;CODE&gt;rename&lt;/CODE&gt; command is for field &lt;CODE&gt;names&lt;/CODE&gt; whereas the &lt;CODE&gt;replace&lt;/CODE&gt; command is for field &lt;CODE&gt;values&lt;/CODE&gt;.  You need the latter.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 15:28:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465856#M131205</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-08-29T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't the rename command not renaming fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465857#M131206</link>
      <description>&lt;P&gt;This only shows Red Hat results for some reason&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 16:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-the-rename-command-not-renaming-fields/m-p/465857#M131206</guid>
      <dc:creator>payton_tayvion</dc:creator>
      <dc:date>2019-08-29T16:04:24Z</dc:date>
    </item>
  </channel>
</rss>

