<?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: Charting over column header in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84392#M21524</link>
    <description>&lt;P&gt;Thanks for the answer, however I must precise that the column header names are not field contents, they are manually named by me. So except if there is a way to xyseries on a list of values instead of the content of a field, I cannot use it.&lt;/P&gt;

&lt;P&gt;Or maybe I am missing something?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2012 14:56:03 GMT</pubDate>
    <dc:creator>guilhem</dc:creator>
    <dc:date>2012-10-09T14:56:03Z</dc:date>
    <item>
      <title>Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84390#M21522</link>
      <description>&lt;P&gt;Hi everyone!&lt;BR /&gt;
I'm a new splunk user, and I have a quesion about chart formatting.&lt;/P&gt;

&lt;P&gt;Here is the results of a search I've made:&lt;/P&gt;

&lt;P&gt;v      column Header1     Column Header2    Column Header3     Column Header 4     Column Header 5  ...&lt;BR /&gt;
X               100                          91.2                        85.7                       81.0                          76.2  ...&lt;BR /&gt;
Y               120                          110                         100                         90                             75.3 ...&lt;BR /&gt;
Z               121                           120                          98                          40                               36  ...&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;/P&gt;

&lt;P&gt;EDIT: The column header names are results of a eval expressions, and not extracted from fields.&lt;/P&gt;

&lt;P&gt;I would like to chart the value so that I get this result below:&lt;/P&gt;

&lt;P&gt;[Whatever]                   X                      Y                       Z              ...&lt;BR /&gt;
columnHeader1          100                 120                   121&lt;BR /&gt;
columnHeader2          91.2                110                   120&lt;BR /&gt;
columnHeader3          85.7                100                   98              ...&lt;BR /&gt;&lt;BR /&gt;
.                                    .&lt;BR /&gt;
.                                    .&lt;BR /&gt;
.                                    .&lt;/P&gt;

&lt;P&gt;So that I can use a pretty graph to draw each series X, Y, Z according to the x-axis, which will be the name of the column headers&lt;/P&gt;

&lt;P&gt;I've tried many things, I've tried to use the transpose, but it doesn't work weel because it gives me:&lt;/P&gt;

&lt;P&gt;Column                     Row 1              Row 2                Row 3              ...&lt;BR /&gt;
v                                 X                       Y                      Z&lt;BR /&gt;
columnHeader1          100                 120                   121&lt;BR /&gt;
columnHeader2          91.2                110                   120&lt;BR /&gt;
columnHeader3          85.7                100                   98              ...&lt;BR /&gt;&lt;BR /&gt;
.                                    .&lt;BR /&gt;
.                                    .&lt;BR /&gt;
.                                    .&lt;/P&gt;

&lt;P&gt;I saw that we can rename the column header, but I don't know the values of X, Y, Z beforehand, so I can't use rename, except if there is a way to rename by the value of a field, and then remove the first row, which I don't know how to do either.&lt;/P&gt;

&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;EDIT 2: Thanks for answering so fast, here is the search I am running (on another data set/ fields, I have just transposed it to the _internal index):&lt;/P&gt;

&lt;P&gt;index=_internal &lt;BR /&gt;
| stats c(action) as count1 by source&lt;BR /&gt;
| join type=outer [ search index=_internal action=touch | stats dc(component) as count2 by source]&lt;BR /&gt;
| join type=outer [ search index=_internal action=cancel | stats dc(component) as progress1 by source]&lt;BR /&gt;
| eval %_progress10%=round(progress1*100/count1,1)&lt;BR /&gt;
| eval %_count2%=round(count2/count1,1)&lt;BR /&gt;
| fillnull&lt;BR /&gt;
| fields source %_progress10% %_count2%&lt;/P&gt;

&lt;P&gt;And the results I get (values aren't real values):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           source                 %_progress10%             %_count2%
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;1        license_usage.log             0.3                              2.0&lt;BR /&gt;
2        metrics.log                       0.4                              0.9&lt;BR /&gt;
3        splunkd.log                       0.5                              0.4&lt;BR /&gt;
4       splunkd_access.log           0.6                              0.7&lt;BR /&gt;
5       web_access.log                 0.7                              0.6&lt;BR /&gt;
6      web_service.log                 1.9                              0.1&lt;/P&gt;

&lt;P&gt;What I would like to do is to have this:&lt;/P&gt;

&lt;P&gt;[whatever]           license_usage.log           metrics.log           .....&lt;BR /&gt;
%progress10%              0.3                              0.4&lt;BR /&gt;
%_count2%                   2.0                              0.9&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84390#M21522</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2020-09-28T12:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84391#M21523</link>
      <description>&lt;P&gt;I would recommend the use of xyseries here.  Try the following to see it in action:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | stats count by host sourcetype | xyseries host sourcetype count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will use the values for the host and sourcetype fields for your row and column headers, respectively.  (The format is 'xyseries row_identifier column_identifier data_value')  Try swapping host and sourcetype in the above example to see how the output changes. &lt;/P&gt;

&lt;P&gt;This should accomplish what you're looking for nicely.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:35:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84391#M21523</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-10-09T14:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84392#M21524</link>
      <description>&lt;P&gt;Thanks for the answer, however I must precise that the column header names are not field contents, they are manually named by me. So except if there is a way to xyseries on a list of values instead of the content of a field, I cannot use it.&lt;/P&gt;

&lt;P&gt;Or maybe I am missing something?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84392#M21524</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2012-10-09T14:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84393#M21525</link>
      <description>&lt;P&gt;Can you provide some example data and the search you're using to get your current results?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84393#M21525</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-10-09T14:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84394#M21526</link>
      <description>&lt;P&gt;I've added an example in the first post using _internal index.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 15:57:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84394#M21526</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2012-10-09T15:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84395#M21527</link>
      <description>&lt;P&gt;without changing what you've already provided, you could try &lt;BR /&gt;
| untable source fields value | xyseries fields source value&lt;/P&gt;

&lt;P&gt;I'm not getting useful results with the _internal search you posted, so I can't really test thoroughly.  however, it works with a simpler example:&lt;/P&gt;

&lt;P&gt;index=_internal | timechart count by sourcetype | untable _time series value | xyseries series _time value&lt;/P&gt;

&lt;P&gt;Build it pipe by pipe to see how it's behaving at each step.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 16:08:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84395#M21527</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-10-09T16:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84396#M21528</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;

&lt;P&gt;Indeed it worked, but what I wasn't aware of is that the "fields" name is somewhat a keyword in the splunk language and you can use it as a global name for all your column header (not sure if I am clear, or if I have understood it correctly), the same happen for the "value" keyword.&lt;/P&gt;

&lt;P&gt;Using " | untable source fields value", I was able to put the results in the right format, so I can chart it after with ease.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84396#M21528</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2012-10-10T07:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84397#M21529</link>
      <description>&lt;P&gt;'Fields' and 'value' are arbitrary labels. Replace 'fields' and 'value' with 'peanut_butter' and 'jelly' in the example I gave and you will still get proper results.  &lt;/P&gt;

&lt;P&gt;Glad this worked for you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:35:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84397#M21529</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-10-10T07:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Charting over column header</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84398#M21530</link>
      <description>&lt;P&gt;That's what I was suspecting, so in fact it always work, I was just confused on how the untable command operate, but now I'm clear, as I saw it in action.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 08:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-over-column-header/m-p/84398#M21530</guid>
      <dc:creator>guilhem</dc:creator>
      <dc:date>2012-10-10T08:31:33Z</dc:date>
    </item>
  </channel>
</rss>

