<?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: Dual Histogram in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111175#M29127</link>
    <description>&lt;P&gt;I know this is an old question....would it be possible to get a few example events for each data set?  I have an idea of how to do this, but need to see some events to make sure&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2015 20:45:15 GMT</pubDate>
    <dc:creator>fourkidsco</dc:creator>
    <dc:date>2015-04-16T20:45:15Z</dc:date>
    <item>
      <title>Dual Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111174#M29126</link>
      <description>&lt;P&gt;I am trying to create a histogram with two data sets that share the x-axis. I can do it for each data set but can not get the sets onto a common x-axis.&lt;/P&gt;

&lt;P&gt;Example search for one histogram: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*logs* earliest="10/13/2014:00:00:00" | rex "(?i)method.*=\s(?P&amp;lt;method1_time&amp;gt;\\d+)" |bucket method1_time span=100|           chart count by method1_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I add method2_time to a unified x-axis?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Nov 2014 02:36:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111174#M29126</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2014-11-12T02:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dual Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111175#M29127</link>
      <description>&lt;P&gt;I know this is an old question....would it be possible to get a few example events for each data set?  I have an idea of how to do this, but need to see some events to make sure&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 20:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111175#M29127</guid>
      <dc:creator>fourkidsco</dc:creator>
      <dc:date>2015-04-16T20:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dual Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111176#M29128</link>
      <description>&lt;P&gt;Sorry to take so long but here is an example of the events in the log. Haven't looked at this one in a while but would still like to be able to do this (two data sets on the same x-axis for a histogram)&lt;/P&gt;

&lt;P&gt;2014-12-07 16:36:12,393 method1 - method time(ms) = 14714&lt;BR /&gt;
2014-12-07 16:36:14,643 method2 - method time(ms) = 12652&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 19:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111176#M29128</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2015-06-25T19:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dual Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111177#M29129</link>
      <description>&lt;P&gt;Got the answer from fourkidsco&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; I'm going to give this one a shot in  the absence of any data examples...which means it may not work. I am assuming that the method2_time is extracted from the same events as method1_time? (This was unclear) If method1_time and method2_time are extracted from the same events, I would suggest extracting 2 things here instead of one: rather than extract the time to "method1_time" and "method2_time", just extract it to "method_time".  Add another extraction to get the "method_type" (type 1 or type 2). Now do the following:  ...| chart count over method_time span=100 by method_type That should give you a single histogram with 2 bars per bucket, one each for type 1 and type 2. This may not work if the data is substantially different from what I had assumed it was.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This worked well for me. Query I used was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*logs* earliest="10/13/2014:00:00:00" | rex "(?i)method.*=\s(?P&amp;lt;method_time&amp;gt;\\d+)" |search method_time=*|rex "(?i)java.class.signature*-\s(?P&amp;lt;method_name&amp;gt;\w+)\("|search method_name=get*|bucket method_time span=100|chart count over method_time by method_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2015 20:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dual-Histogram/m-p/111177#M29129</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2015-06-25T20:40:43Z</dc:date>
    </item>
  </channel>
</rss>

