<?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: Not able to create a 24hour chart with the table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96576#M24949</link>
    <description>&lt;P&gt;if your grouping is per time bucket (mybucket), then keep it at every steps of your commands : stats, fields, etc...&lt;BR /&gt;
and at the end your probably want   &lt;CODE&gt;|table A mybucket threshold&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Oct 2012 17:17:04 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2012-10-20T17:17:04Z</dc:date>
    <item>
      <title>Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96572#M24945</link>
      <description>&lt;P&gt;Hello &lt;/P&gt;

&lt;P&gt;I am trying to do a 24hr and 31 days chart for the threshold value which will be as a output of this table. Now the below code gives me threshold value for each workgroup. I now need to create a timechart which mentions about the number of times the threshold for a particular workgroup(A) is exceeded.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxxx search_name="xxxx" | rename record_assignmentGroup as A | eval mybucket=case(date_hour&amp;lt;4,1,date_hour&amp;lt;8,2,date_hour&amp;lt;12,3,date_hour&amp;lt;16,4,date_hour&amp;lt;20,5,date_hour&amp;gt;0,6) | stats count as I by A, mybucket,date_mday,date_month,date_year  | delta I as D  | eval D = abs(D) | eventstats avg(I) as xbar, avg(D) as mbar by A | eval threshold = xbar + (2.66*mbar) | eval threshold=coalesce(threshold,0) | dedup A | fields A threshold | table A threshold
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I made use of macro and now the search is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxxx search_name="xxxx"  |  `bucket_incident` | `threshold_incident`| 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's just a shorter version of the first one.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;A        threshold&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;theou&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 17:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96572#M24945</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-19T17:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96573#M24946</link>
      <description>&lt;P&gt;I am not sure what you trying to do exactly, but you need to perserve _time to use timechart or to use chart use (chart count over time by x) in your stats command and eventstats.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96573#M24946</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-19T20:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96574#M24947</link>
      <description>&lt;P&gt;I should have been a bit more clear. Will update the part now.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96574#M24947</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-19T20:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96575#M24948</link>
      <description>&lt;P&gt;@bmacias84 I updated it now. Any idea on how to solve this.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96575#M24948</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-19T20:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96576#M24949</link>
      <description>&lt;P&gt;if your grouping is per time bucket (mybucket), then keep it at every steps of your commands : stats, fields, etc...&lt;BR /&gt;
and at the end your probably want   &lt;CODE&gt;|table A mybucket threshold&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Oct 2012 17:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96576#M24949</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-10-20T17:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create a 24hour chart with the table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96577#M24950</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/78571"&gt;@theouhuios&lt;/a&gt;, Could you explain what your trying to accomplish with your case statment?&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
eval mybucket=case(date_hour&amp;lt;4,1,date_hour&amp;lt;8,2,date_hour&amp;lt;12,3,date_hour&amp;lt;16,4,date_hour&amp;lt;20,5,date_hour&amp;gt;0,6)&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:40:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-create-a-24hour-chart-with-the-table/m-p/96577#M24950</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2020-09-28T12:40:16Z</dc:date>
    </item>
  </channel>
</rss>

