<?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: Chart by hour using multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496096#M138257</link>
    <description>&lt;P&gt;Thank you for the help.  I am receiving an error message of &lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The 'mvexpand' function is unsupported or undefined.&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2020 15:22:48 GMT</pubDate>
    <dc:creator>cglowjr</dc:creator>
    <dc:date>2020-05-12T15:22:48Z</dc:date>
    <item>
      <title>Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496092#M138253</link>
      <description>&lt;P&gt;I am having trouble charting some data by hour and consoleID.  Below is the search I used.  I can use the  &lt;CODE&gt;stats&lt;/CODE&gt; function to count by hour, but it doesn't show well in my dashboard.  I am looking to have this same format, but use the field  &lt;CODE&gt;date_hour&lt;/CODE&gt; in the  &lt;CODE&gt;chart count&lt;/CODE&gt; function.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| chart count over pedestalName by date_hour, consoleID&lt;/CODE&gt;  ?  I know this doesn't work, but in my head this is what should work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sg_log" host=PACSTAPP1 "" "OUTGATE" "COMPLETE" "SMT" NOT "TROUBLE_LANE" 
| xmlkv 
| eval consoleID=if(consoleID="AUTO","AUTO","MANUAL") 
| chart count over pedestalName by consoleID
| eval total=round(AUTO+MANUAL) 
| WHERE pedestalName IN ("21","22","23","24","25","26") 
| eval autogate%=round(AUTO/(AUTO+MANUAL)*100,2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 May 2020 16:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496092#M138253</guid>
      <dc:creator>cglowjr</dc:creator>
      <dc:date>2020-05-11T16:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496093#M138254</link>
      <description>&lt;P&gt;there is no detail. no one can answer this.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 19:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496093#M138254</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-11T19:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496094#M138255</link>
      <description>&lt;P&gt;I am trying to use the same query, but use the chart function to show the data by hour and consoleID (consoleID consists of AUTO and MANUAL)&lt;/P&gt;

&lt;P&gt;This is what it looks like now.&lt;/P&gt;

&lt;P&gt;pedestalName    AUTO    MANUAL  total   autogate%&lt;BR /&gt;
21                              256      31          287    89.20&lt;BR /&gt;
22                              270      29          299    90.30&lt;BR /&gt;
23                              242      37          279    86.74&lt;BR /&gt;
24                              231      34          265    87.17&lt;BR /&gt;
25                              281      26          307    91.53&lt;BR /&gt;
26                              269      19          288    93.40&lt;/P&gt;

&lt;P&gt;I want it to look like this, with the hour extending throughout the day... 0700, 0800, 0900 etc&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                                     0700                          0800 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;pedestalName    AUTO    MANUAL       AUTO        MANUAL         total   autogate%&lt;BR /&gt;
21                              256      31           256                52                     287 89.20&lt;BR /&gt;
22                              270      29           300                24                     299 90.30&lt;BR /&gt;
23                              242      37           301                13                     279 86.74&lt;BR /&gt;
24                              231      34           320                26                     265 87.17&lt;BR /&gt;
25                              281      26           187                27                     307 91.53&lt;BR /&gt;
26                              269      19           186                28                     288 93.40&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 19:47:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496094#M138255</guid>
      <dc:creator>cglowjr</dc:creator>
      <dc:date>2020-05-11T19:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496095#M138256</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index="sg_log" host=PACSTAPP1 "" "OUTGATE" "COMPLETE" "SMT" NOT "TROUBLE_LANE" 
| xmlkv 
| eval consoleID=if(consoleID="AUTO","AUTO","MANUAL") 
| eventstats count by date_hour consoleID pedestalName
| eval tmp=date_hour.":".consoleID
| xyseries pedestalName tmp count
| WHERE pedestalName IN ("21","22","23","24","25","26") 
| rename pedestalName as _pedestalName
| addtotals fieldname=total
| foreach "*:AUTO" [ eval sums_auto=mvappend(sums_auto,'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')]
| streamstats window=1 sum(sums_auto) as sums_auto
| eval autogate%=round(sums_auto/total*100,2)
| rename _pedestalName as pedestalName
| fields - sums_auto
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When you ask a question, ask for a detailed explanation from the beginning.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 20:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496095#M138256</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-11T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496096#M138257</link>
      <description>&lt;P&gt;Thank you for the help.  I am receiving an error message of &lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The 'mvexpand' function is unsupported or undefined.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 15:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496096#M138257</guid>
      <dc:creator>cglowjr</dc:creator>
      <dc:date>2020-05-12T15:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496097#M138258</link>
      <description>&lt;P&gt;sorry, I have a typo. &lt;CODE&gt;mvexpand&lt;/CODE&gt; → &lt;CODE&gt;mvappend&lt;/CODE&gt;&lt;BR /&gt;
I correct answer.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 19:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496097#M138258</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-12T19:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Chart by hour using multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496098#M138259</link>
      <description>&lt;P&gt;Thank you so much!  This is great!&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 19:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-by-hour-using-multiple-fields/m-p/496098#M138259</guid>
      <dc:creator>cglowjr</dc:creator>
      <dc:date>2020-05-12T19:56:07Z</dc:date>
    </item>
  </channel>
</rss>

