<?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: How to change how field values appear on a chart (ex: &amp;quot;cat&amp;quot; to &amp;quot;gato&amp;quot;) via a lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146091#M40771</link>
    <description>&lt;P&gt;First create a CSV file, with all the current, and new names you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Animal,NewAnimal
Cat,Gato
Dog,Perro
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Next, add your CSV file to Splunk, by going to Settings -&amp;gt; Lookups -&amp;gt; Lookup table files -&amp;gt; Add new&lt;/P&gt;

&lt;P&gt;Choose your lookup file and give it a destination file name (it can be the same as the existing file name). Click Save.&lt;/P&gt;

&lt;P&gt;Then, add a lookup definition by going to Settings -&amp;gt; Lookups -&amp;gt; Lookup definitions -&amp;gt; Add new&lt;/P&gt;

&lt;P&gt;Give the lookup a name. Again, it can be the same as your file name, or you could simply call it "animals". Leave it on "File-based" and then select your CSV file from the drop-down menu. Click Save.&lt;/P&gt;

&lt;P&gt;Now, you can use your lookup file in your search. Assuming you called the lookup definition "animals", you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="Foo" | lookup animals Animal OUTPUT NewAnimal| chart count by Timestamp, NewAnimal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Apr 2015 20:49:07 GMT</pubDate>
    <dc:creator>masonmorales</dc:creator>
    <dc:date>2015-04-17T20:49:07Z</dc:date>
    <item>
      <title>How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146088#M40768</link>
      <description>&lt;P&gt;I have a chart which graphs counts of things over time; so, animals per second.  There are columns for cats, dogs and rats and each gets its own column and its own label on the side ... inbound field of "animal" which can contain "rat, cat or dog" over time.  What I would like to do is translate "cat" to "gato", "dog" to "perro", "rat" to "rata" at the time of the chart being drawn.  Programmatically this would be accomplished via a lookup table at the time that the chart was being drawn so that the legend for "dog" would be displayed as "perro" ...&lt;/P&gt;

&lt;P&gt;Is this possible with either simple or advanced XML?&lt;/P&gt;

&lt;P&gt;Thx!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 21:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146088#M40768</guid>
      <dc:creator>choward94002</dc:creator>
      <dc:date>2015-04-16T21:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146089#M40769</link>
      <description>&lt;P&gt;Could you provide more details like, how is your current query and its output and what is expected from the search result point of view?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 21:16:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146089#M40769</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-04-16T21:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146090#M40770</link>
      <description>&lt;P&gt;Thanks for your help!  The index being used contains two values, "Timestamp" and "Animal" where each entry contains the time of the event and what kind of animal occurred; cat, dog, rat, etc. ... so,&lt;/P&gt;

&lt;P&gt;00:01:30,Dog&lt;BR /&gt;
00:01:31,Cat&lt;BR /&gt;
00:01,31,Rat&lt;BR /&gt;
00:01,45,Dog&lt;/P&gt;

&lt;P&gt;I want to display a column chart of animals per minute, so this chart would have three "bins", the first bin containing one "Dog" column count, the second bin containing one "Cat" and one "Rat" count column, the third bin containing one "Dog" column&lt;/P&gt;

&lt;P&gt;The query is [index="Foo" | chart count by Timestamp, Animal]&lt;/P&gt;

&lt;P&gt;That all works, and on the right of the chart I get a legend listing "Dog", "Cat" and "Rat" corresponding to the data values for "Animal" ... what I'd like, though, is for some sort of lookup to change "Dog" to "Perro", "Cat" to "Gato" and "Rat" to "Rata" on the legend.  I don't want to post-process the index itself, changing all of the "Dog"'s to "Perro"'s, and I can't change the incoming data to say "Gato" rather than "Cat" ... the change needs to happen at the time the chart is generated.  Programmatically I could do it using C# and a charting package, but I was curious if that was possible using the provided Splunk stuff ..&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146090#M40770</guid>
      <dc:creator>choward94002</dc:creator>
      <dc:date>2015-04-17T15:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146091#M40771</link>
      <description>&lt;P&gt;First create a CSV file, with all the current, and new names you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Animal,NewAnimal
Cat,Gato
Dog,Perro
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Next, add your CSV file to Splunk, by going to Settings -&amp;gt; Lookups -&amp;gt; Lookup table files -&amp;gt; Add new&lt;/P&gt;

&lt;P&gt;Choose your lookup file and give it a destination file name (it can be the same as the existing file name). Click Save.&lt;/P&gt;

&lt;P&gt;Then, add a lookup definition by going to Settings -&amp;gt; Lookups -&amp;gt; Lookup definitions -&amp;gt; Add new&lt;/P&gt;

&lt;P&gt;Give the lookup a name. Again, it can be the same as your file name, or you could simply call it "animals". Leave it on "File-based" and then select your CSV file from the drop-down menu. Click Save.&lt;/P&gt;

&lt;P&gt;Now, you can use your lookup file in your search. Assuming you called the lookup definition "animals", you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="Foo" | lookup animals Animal OUTPUT NewAnimal| chart count by Timestamp, NewAnimal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Apr 2015 20:49:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146091#M40771</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2015-04-17T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146092#M40772</link>
      <description>&lt;P&gt;Cool, I'll give that a try, much thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 21:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146092#M40772</guid>
      <dc:creator>choward94002</dc:creator>
      <dc:date>2015-04-17T21:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change how field values appear on a chart (ex: "cat" to "gato") via a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146093#M40773</link>
      <description>&lt;P&gt;Please click "Accept Answer" if this worked for you&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 21:46:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-how-field-values-appear-on-a-chart-ex-quot-cat/m-p/146093#M40773</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2015-04-17T21:46:43Z</dc:date>
    </item>
  </channel>
</rss>

