<?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: 2 Searches on the same bar chart - (further detail described) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23238#M4123</link>
    <description>&lt;P&gt;I like it, but doesn't quite do what I require. Probably because I didn't give you enough detail in my original question. Anyway, I have edited the orignal to provide further information. Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Nov 2012 16:08:07 GMT</pubDate>
    <dc:creator>lanode</dc:creator>
    <dc:date>2012-11-05T16:08:07Z</dc:date>
    <item>
      <title>2 Searches on the same bar chart - (further detail described)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23236#M4121</link>
      <description>&lt;P&gt;OK - I've got 2 searches:-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Telephone Log" 213 NOT "&amp;lt;I&amp;gt;" 
sourcetype="Telephone Log" 213 NOT "&amp;lt;I&amp;gt;" | regex _raw!=(\b\d\d:00'\d\d)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first search captures all outbound calls from extension 213&lt;/P&gt;

&lt;P&gt;The second search captures all outbound calls from extension 213 that are in excess of 1 miunte&lt;/P&gt;

&lt;P&gt;I would like to plot these 2 searches on the same bar chart. With the bars overlayed.&lt;/P&gt;

&lt;P&gt;So, for any selected timeframe I can see how many outbound calls have been made on any particluar day and overlayed on that bar another showing me the number of calls that were in excess of 1 minute.&lt;/P&gt;

&lt;P&gt;Any help is very much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2012 11:49:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23236#M4121</guid>
      <dc:creator>lanode</dc:creator>
      <dc:date>2012-11-05T11:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Searches on the same bar chart - (further detail described)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23237#M4122</link>
      <description>&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;First, you are missing stats commands to return data in a chart format,&lt;BR /&gt;
by example &lt;MYSEARCH&gt; | stats count&lt;/MYSEARCH&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;One method is to merge results from 2 searches, and distinguish them by one field, in this case I use the field "type" &lt;BR /&gt;
Then use an append between the 2 searches.&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype="Telephone Log" 213 NOT "" &lt;BR /&gt;
| eval type="searchA" &lt;BR /&gt;
| stats count by type &lt;BR /&gt;
| append [ sourcetype="Telephone Log" 213 NOT "" &lt;BR /&gt;
| regex _raw!=(bdd:00'dd)&lt;BR /&gt;
| eval type="searchB"&lt;BR /&gt;
| stats count by type ]&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Another method is to use a single search, and use the result of the regex field extraction to distinguish them&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype="Telephone Log" 213 NOT "" &lt;BR /&gt;
| regex "(?&amp;lt;myregex&amp;gt;bdd:00'dd)" &lt;BR /&gt;
| fillnull myregex value="not found"&lt;BR /&gt;
| stats count by myregex&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2012 15:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23237#M4122</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-11-05T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Searches on the same bar chart - (further detail described)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23238#M4123</link>
      <description>&lt;P&gt;I like it, but doesn't quite do what I require. Probably because I didn't give you enough detail in my original question. Anyway, I have edited the orignal to provide further information. Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2012 16:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23238#M4123</guid>
      <dc:creator>lanode</dc:creator>
      <dc:date>2012-11-05T16:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Searches on the same bar chart - (further detail described)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23239#M4124</link>
      <description>&lt;P&gt;@YannK gives two good strategies, but if they're not doing what you want, consider this approach. Instead of using &lt;CODE&gt;regex&lt;/CODE&gt; to filter, use &lt;CODE&gt;rex&lt;/CODE&gt; with a capture group to do like Yann suggested. Use this captured variable to set a sort of binary flag, like: &lt;PRE&gt;eval longer_than_minute=if(isnotnull(&amp;lt;captured_var&amp;gt;, "Y", "N")&lt;/PRE&gt; Then you can &lt;CODE&gt;stats count by longer_than_minute&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Furthermore, I'll point out that if there's an &amp;lt;O&amp;gt; flag to signal an outbound call (to contrast the &amp;lt;I&amp;gt; flag for inbound calls), you're better off searching for that as a &lt;EM&gt;positive&lt;/EM&gt; match, rather than NOT; bloom filters will often make a positive match faster than a negative match.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 01:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23239#M4124</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-11-06T01:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Searches on the same bar chart - (further detail described)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23240#M4125</link>
      <description>&lt;P&gt;Thank you guys for your responses to my problem.&lt;/P&gt;

&lt;P&gt;I think I've found the solution. It is an adaptation of "yannK's" first suggestion.&lt;/P&gt;

&lt;P&gt;Solution :-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="Telephone Log" 213 NOT "&amp;lt;I&amp;gt;" 
| timechart count as CALLS
| appendcols [ search 213 NOT "&amp;lt;I&amp;gt;" | regex _raw!=(\b\d\d:00'\d\d) | timechart count as Excess1min ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tested it and compared results with raw data and all looks good so far.&lt;/P&gt;

&lt;P&gt;Thanks again for your swift help with this matter. - Much appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-Searches-on-the-same-bar-chart-further-detail-described/m-p/23240#M4125</guid>
      <dc:creator>lanode</dc:creator>
      <dc:date>2012-11-06T10:27:33Z</dc:date>
    </item>
  </channel>
</rss>

