<?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 produce multiple values graphs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404005#M116888</link>
    <description>&lt;P&gt;After a week of putting out other fires&lt;/P&gt;

&lt;P&gt;Okay  that works as long as you don't use the Trellis layout&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2019 03:50:04 GMT</pubDate>
    <dc:creator>jhuysing</dc:creator>
    <dc:date>2019-08-05T03:50:04Z</dc:date>
    <item>
      <title>How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/403999#M116882</link>
      <description>&lt;P&gt;We have a log of some metrics that look like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;20:45:00 10.10.71.01  values : [12035313, 233658, 0, 0, 24249, 13058, 0, 229867, 0, 0, 0, 0, 24249, 0, 0, 0, 37307, 0, 257907, 42125, 320380, 0]&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I can pull out each of the values and produce a table.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\[(?.*)]" 
| eval counters = split( results,",") 
| eval Requests=mvindex(counters,1)   etc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I want to produce a multiline graph, is this possible?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 21:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/403999#M116882</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2019-07-22T21:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404000#M116883</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;You could try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=20 
| eval values="values : [".random().", ".random().", ".tostring(random()%2).", ".tostring(random()%1).", ".random()."]" 
| eval ip="127.0.0.1" 
| eval _time = _time - random()%600 
| eval _raw=strftime(_time, "%H:%M:%S")." ".ip." ".values 
| rename COMMENT as "--- Sample Generated Values above ---"
| rex field=_raw "\[(?&amp;lt;results&amp;gt;.*)\]" 
| eval counters = split( results,", ")
| eval index_counters=mvzip(mvrange(0, mvcount(counters), 1), counters, "-")
| mvexpand index_counters
| eval index_counters=split(index_counters, "-")
| eval CounterType=mvindex(index_counters, 0)
| eval CounterValue=mvindex(index_counters, 1)
| fields _time CounterType CounterValue _raw
| timechart max(CounterValue) as CounterValue by CounterType
| fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it helps!!!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 23:49:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404000#M116883</guid>
      <dc:creator>jaime_ramirez</dc:creator>
      <dc:date>2019-07-22T23:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404001#M116884</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval index_counters=mvzip(mvrange(0, mvcount(counters), 1), counters, "-") 
| mvexpand index_counters 
| eval index_counters=split(index_counters, "-") 
| eval CounterType=mvindex(index_counters, 0) 
| eval CounterValue=mvindex(index_counters, 1) 
| fields _time CounterTypes CounterValue _raw  | sort _time
| table CounterValue , CounterTypes, _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run this query, I  get a result of 21 counterTypes, starting a 0 &lt;/P&gt;

&lt;P&gt;When I replace the last line with&lt;BR /&gt;
     | timechart max(CounterValue) as CounterValue by CounterType&lt;/P&gt;

&lt;P&gt;in the preview there is only 11 columns including others, the other counter types are missing&lt;BR /&gt;
0 1 10 11 12    13 14 15 16 17 OTHER&lt;/P&gt;

&lt;P&gt;and when look at the visualizations the legend only includes the value above and there is a diagonal line going up from left to right&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 03:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404001#M116884</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2019-07-23T03:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404002#M116885</link>
      <description>&lt;P&gt;Try using this:&lt;/P&gt;

&lt;P&gt;...&lt;BR /&gt;
| timechart max(CounterValue) as CounterValue by CounterType limit=0 useother=0&lt;/P&gt;

&lt;P&gt;And in visualizations choose Line Chart&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 17:25:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404002#M116885</guid>
      <dc:creator>jaime_ramirez</dc:creator>
      <dc:date>2019-07-23T17:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404003#M116886</link>
      <description>&lt;P&gt;okay that fixed it so I get all the counter types.  &lt;/P&gt;

&lt;P&gt;The lines were not being drawn. I found i had another problem with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval counters = split( results,",") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;changed it to so there is a space after the comma and all the line get drawn&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval counters = split( results,", ") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I need to figure out how to change the CounterType from a number to the correct name&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 22:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404003#M116886</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2019-07-23T22:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404004#M116887</link>
      <description>&lt;P&gt;You could use rename at the end of the search string:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....
| rename 0 as Zero_Counter, 1 as First_Counter ....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2019 23:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404004#M116887</guid>
      <dc:creator>jaime_ramirez</dc:creator>
      <dc:date>2019-07-23T23:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce multiple values graphs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404005#M116888</link>
      <description>&lt;P&gt;After a week of putting out other fires&lt;/P&gt;

&lt;P&gt;Okay  that works as long as you don't use the Trellis layout&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 03:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-multiple-values-graphs/m-p/404005#M116888</guid>
      <dc:creator>jhuysing</dc:creator>
      <dc:date>2019-08-05T03:50:04Z</dc:date>
    </item>
  </channel>
</rss>

