<?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: Rename multiple fields to the same name using a * or a generic character, so it can be done on mass. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214944#M187962</link>
    <description>&lt;P&gt;I've got the same problem where there are multiple fields which contain basically the same information, i.e. responseTime, but they are named differently for their business function. I don't want to hardcode 20 different renames, but rather have just one, but rename expects an asterisk on both sides of the AS and you still wind up with 20 different names. Coalesce isn't the answer either as I tried that and it has an entirely different behavior (creation of a MV field?)&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2015 20:16:41 GMT</pubDate>
    <dc:creator>jeremiahc4</dc:creator>
    <dc:date>2015-11-10T20:16:41Z</dc:date>
    <item>
      <title>Rename multiple fields to the same name using a * or a generic character, so it can be done on mass.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214942#M187960</link>
      <description>&lt;P&gt;Rename multiple fields to the same name using a * or a generic character. MY data set is producing a lot of data that can fit into the same name. The issues is renaming all of them could take along time.&lt;/P&gt;

&lt;P&gt;The way i want to do it (using the * - rename "max(XML_PARSE): STAR" as XML_PARSE )&lt;BR /&gt;
index=mlc_test sourcetype=LAS source=LAS.log MSG_TYPE=* | timechart span=10s max(IN_TRANS), max(XML_PARSE), max(HANDLER) by MSG_TYPE | rename "max(XML_PARSE): *" as XML_PARSE &lt;/P&gt;

&lt;P&gt;However this does not work, &lt;/P&gt;

&lt;P&gt;The Long Way [So i want to replace CONTRACT and DRAFT and XXX + YYY with STAR]&lt;BR /&gt;
index=mlc_test sourcetype=LAS source=LAS.log MSG_TYPE=* | timechart span=10s max(IN_TRANS), max(XML_PARSE), max(HANDLER) by MSG_TYPE | rename "max(XML_PARSE): CONTRACT" as XML_PARSE | rename "max(XML_PARSE): DRAFT" as XML_PARSE&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214942#M187960</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2020-09-29T07:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rename multiple fields to the same name using a * or a generic character, so it can be done on mass.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214943#M187961</link>
      <description>&lt;P&gt;If you rename the way you are looking to rename, you will lose the grouping by msg_type. Why not just not group by msg_type? In other words modify your search to &lt;/P&gt;

&lt;P&gt;index=mlc_test sourcetype=LAS source=LAS.log MSG_TYPE=* | timechart span=10s max(IN_TRANS) as in_trans, max(XML_PARSE) as xml_parse, max(HANDLER) as handler &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:49:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214943#M187961</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T07:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rename multiple fields to the same name using a * or a generic character, so it can be done on mass.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214944#M187962</link>
      <description>&lt;P&gt;I've got the same problem where there are multiple fields which contain basically the same information, i.e. responseTime, but they are named differently for their business function. I don't want to hardcode 20 different renames, but rather have just one, but rename expects an asterisk on both sides of the AS and you still wind up with 20 different names. Coalesce isn't the answer either as I tried that and it has an entirely different behavior (creation of a MV field?)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 20:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214944#M187962</guid>
      <dc:creator>jeremiahc4</dc:creator>
      <dc:date>2015-11-10T20:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rename multiple fields to the same name using a * or a generic character, so it can be done on mass.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214945#M187963</link>
      <description>&lt;P&gt;I see replace does what I'm looking for inside the field (i.e. the values). I need something like that for the key or field name.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 20:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214945#M187963</guid>
      <dc:creator>jeremiahc4</dc:creator>
      <dc:date>2015-11-10T20:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rename multiple fields to the same name using a * or a generic character, so it can be done on mass.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214946#M187964</link>
      <description>&lt;P&gt;Have you looked at field alias &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/Addaliasestofields"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/Addaliasestofields&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 20:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-multiple-fields-to-the-same-name-using-a-or-a-generic/m-p/214946#M187964</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-11-10T20:27:25Z</dc:date>
    </item>
  </channel>
</rss>

