<?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: help to rename automatically random pie label in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400367#M190858</link>
    <description>&lt;P&gt;If u know all possible values of the process_name, add them together in a case statement.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 09:37:19 GMT</pubDate>
    <dc:creator>jitendragupta</dc:creator>
    <dc:date>2019-07-19T09:37:19Z</dc:date>
    <item>
      <title>help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400364#M190855</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I use the search below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup host.csv 
    | table host] index="x" sourcetype="x"
| bucket _time span=3m 
| where process_cpu_used_percent&amp;gt;80 
| dedup host process_name 
| stats count(host) as Total by process_name 
| sort -Total limit=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;process_name correspond to a piece of my pie chart and can be different at each times&lt;BR /&gt;
I search an solution to rename automatically the process_name because one of them are not explicit&lt;BR /&gt;
example : I have a process_name called "mfevtp" which correspond to McAFEE &lt;BR /&gt;
So I want to display "McAFEE" in my label instead "mfevtp"&lt;BR /&gt;
How to do this please?&lt;BR /&gt;
thanks&lt;BR /&gt;
regards&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400364#M190855</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T01:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400365#M190856</link>
      <description>&lt;P&gt;What does this query give you? -&amp;gt; &lt;BR /&gt;
index="x" sourcetype="x" | table process_name | dedup process_name &lt;/P&gt;

&lt;P&gt;The only output of this query comes as a label in your pie chart.&lt;BR /&gt;
I am not sure whether aliasing is there or not in Splunk. You can try this manual process:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [| inputlookup host.csv 
     | table host] index="x" sourcetype="x"
 | bucket _time span=3m 
 | where process_cpu_used_percent&amp;gt;80 
 | dedup host process_name 
 | stats count(host) as Total by process_name 
 | sort -Total limit=10) | eval process_name=if(process_name="mfevtp","McAFEE ",process_name)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:20:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400365#M190856</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2020-09-30T01:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400366#M190857</link>
      <description>&lt;P&gt;thanks it works but sometimes I have not the exact name for the process name&lt;BR /&gt;
and if I do eval process_name=if(process_name="mfevtp*","McAFEE ",process_name) it doesnt works&lt;BR /&gt;
an idea please??&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400366#M190857</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T01:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400367#M190858</link>
      <description>&lt;P&gt;If u know all possible values of the process_name, add them together in a case statement.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 09:37:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400367#M190858</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2019-07-19T09:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400368#M190859</link>
      <description>&lt;P&gt;yes but my question is why I can use *&lt;BR /&gt;
sometime a process name can be named "mfetvtp1" or "mfevtp2" &lt;BR /&gt;
But both have to be called McAFEE&lt;BR /&gt;
So why I can do process_name="mfevtp*"??&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 10:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400368#M190859</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-19T10:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400369#M190860</link>
      <description>&lt;P&gt;My case eval works but sometimes I need to use *&lt;/P&gt;

&lt;P&gt;`| eval process_name=case(process_name=="mfevtps*")&lt;BR /&gt;
But when I am doing * I have no results&lt;BR /&gt;
How to use * in my case eavl please?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400369#M190860</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T01:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400370#M190861</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...&amp;lt;your query&amp;gt;| eval process_name = if(like(process_name,"mfetvtp%"),"McAFEE",process_name)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 09:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400370#M190861</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-22T09:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400371#M190862</link>
      <description>&lt;P&gt;hi it seems to be ok!&lt;BR /&gt;
last question, I have a lot of process name&lt;BR /&gt;
so how to concatene them in if like??&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 09:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400371#M190862</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-22T09:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400372#M190863</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval process_name = case(like(process_name,"mfetvtp%"),"McAFEE",like(process_name,"abc%"),"ABC",1=1,process_name)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;keep&lt;CODE&gt;1=1&lt;/CODE&gt; in your query, if none of the condition was matched it will return the value.&lt;/P&gt;

&lt;P&gt;If its fine, please accept the answer.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 10:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400372#M190863</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-22T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: help to rename automatically random pie label</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400373#M190864</link>
      <description>&lt;P&gt;many thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 10:16:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-rename-automatically-random-pie-label/m-p/400373#M190864</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-22T10:16:17Z</dc:date>
    </item>
  </channel>
</rss>

