<?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 chart with multiple hour fields from 0h to 24h? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227646#M67236</link>
    <description>&lt;P&gt;Can you post a sample event and desired output ?&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2016 18:24:33 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-06-24T18:24:33Z</dc:date>
    <item>
      <title>How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227643#M67233</link>
      <description>&lt;P&gt;I have some performance data that is for the most part, fairly standard, such as SystemName, Metric (cpu, memory, whatever), counter type (percent, kbs, the unit basically), and then I have field 0h to 24h, which is the value on the hour.&lt;/P&gt;

&lt;P&gt;I'd like to show, for example, the memory percent as a line chart, but I'm unsure how to tell Splunk to pull the data from the hour fields.&lt;/P&gt;

&lt;P&gt;Sample Data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Workload Name, Counter Name, Counter Metric,Rollup Type,    0h, 1h, 2h, 3h
SYSTEM1234, Read workload metric, number, max, 77, 141, 254, 190
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this only shows hours 0 to 3, there are 24 of those fields.&lt;/P&gt;

&lt;P&gt;So what i'd like to see is a line chart, where the X axis has the 0h, 1h, 2h all the way to 24h and the Y is retaliative to the values (in this case, 77-254) &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 16:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227643#M67233</guid>
      <dc:creator>jrich523</dc:creator>
      <dc:date>2016-06-24T16:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227644#M67234</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base Search Here | eval _time=YourHourFieldHere | rex field=_time mode=sed "s/[hH]$//" | eval _time=_time * 60 * 60 | fieldformat _time = strftime(_time, "%H") | timechart span=1h avg(*) AS * BY host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jun 2016 16:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227644#M67234</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-24T16:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227645#M67235</link>
      <description>&lt;P&gt;I'm not sure I follow, where you have the YourHourFieldHere, that's one field, I have 24 fields related to time, h0, h1,h2 all the way to h24&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 17:42:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227645#M67235</guid>
      <dc:creator>jrich523</dc:creator>
      <dc:date>2016-06-24T17:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227646#M67236</link>
      <description>&lt;P&gt;Can you post a sample event and desired output ?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 18:24:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227646#M67236</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-24T18:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227647#M67237</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search giving your fields Workload Name, Counter Name, Counter Metric,Rollup Type,  0h, 1h, 2h, 3h...
| eval Metric='Workload Name'.":".'Counter Name'.":".'Counter Metric'.":".'Rollup Type' | fields - "Workload Name" "Counter Name" "Counter Metric" "Rollup Type" | untable Metric hour value | table hour Metric value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   your base search giving your fields Workload Name, Counter Name, Counter Metric,Rollup Type,  0h, 1h, 2h, 3h...
    | eval Metric='Workload Name'.":".'Counter Name'.":".'Counter Metric'.":".'Rollup Type' | fields - "Workload Name" "Counter Name" "Counter Metric" "Rollup Type" | untable Metric hour value | chart values(value) over hour by Metric
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jun 2016 19:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227647#M67237</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-24T19:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart with multiple hour fields from 0h to 24h?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227648#M67238</link>
      <description>&lt;P&gt;Its still a little weird (seems like there is duplicate data perhaps?) but i was able to get that working. thanks! I'll have to go read up on untable, it seems to be the real magic here&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 21:18:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-with-multiple-hour-fields-from-0h-to-24h/m-p/227648#M67238</guid>
      <dc:creator>jrich523</dc:creator>
      <dc:date>2016-06-24T21:18:42Z</dc:date>
    </item>
  </channel>
</rss>

