<?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: Graphing multiple data sources in one chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56461#M13835</link>
    <description>&lt;P&gt;Thank you for the reply. I think "by host" should be "by source", no? That works but, as I said in my comment below, the path to the source file is too long so it gets abbreviated, making it impossible to tell which source is which on the graph...&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2010 20:20:26 GMT</pubDate>
    <dc:creator>Branden</dc:creator>
    <dc:date>2010-09-23T20:20:26Z</dc:date>
    <item>
      <title>Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56456#M13830</link>
      <description>&lt;P&gt;I found some similar questions on here, but not quite what I'm trying to do. &lt;/P&gt;

&lt;P&gt;We have web access logs from several three different web servers (same host, though). I'd like to graph the number of unique hits from each web server on the same graph in a dashboard.&lt;/P&gt;

&lt;P&gt;For example, one search is like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchString&amp;gt;host="xyz" sourcetype="*access*" source="*foo.access*" | timechart dc(remote_host)&amp;lt;/searchString&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another search/graph is like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;searchString&amp;gt;host="xyz" sourcetype="*access*" source="*bar.access*" | timechart dc(remote_host)&amp;lt;/searchString&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like both of these results to appear on the same graph. How can I do this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 03:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56456#M13830</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-23T03:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56457#M13831</link>
      <description>&lt;P&gt;It sounds like you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="*access*" | timechart dc(remote_host) by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;I&gt;(wrapping &amp;lt;searchString&amp;gt; tags removed for clarity)&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 03:57:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56457#M13831</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-23T03:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56458#M13832</link>
      <description>&lt;P&gt;Probably &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart dc(remote_host) by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=source "(?&amp;lt;s&amp;gt;[A-Za-z]+)\.access\b" | timechart dc(remote_host) by s
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Sep 2010 06:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56458#M13832</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-23T06:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56459#M13833</link>
      <description>&lt;P&gt;You can simply OR them together, and then use the searchmatch function of eval to give yourself a field that indicates whether this is a source containing 'foo' or a source containing 'bar'.&lt;/P&gt;

&lt;P&gt;(Im assuming there are a lot of difference sources matching the &lt;EM&gt;foo.access.&lt;/EM&gt; condition, as well as a lot of sources matching the &lt;EM&gt;bar.access.&lt;/EM&gt; condition.)&lt;/P&gt;

&lt;P&gt;This should work: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;host="xyz" sourcetype="*access*" ( source="*foo.access*" OR source="*bar.access*" ) | eval type=if(searchmatch(source="*foo.access.*"),"foo","bar") | timechart dc(remote_host) by type&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;NOTE: this is very similar to this other answer here:  &lt;A href="http://answers.splunk.com/questions/5423/comparing-values-returned-by-two-separate-searches/5439#5439" rel="nofollow"&gt;http://answers.splunk.com/questions/5423/comparing-values-returned-by-two-separate-searches/5439#5439&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 13:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56459#M13833</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-09-23T13:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56460#M13834</link>
      <description>&lt;P&gt;Thank you for the reply. The "by source" solution works, but the path is too long for it to show the entire source file.&lt;BR /&gt;
I can't get the "rex field=source" solution to work. Every time I ever try to use a rex in an XML file, I get a "mismatched tag" error. Not sure how to get around that.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 20:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56460#M13834</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-23T20:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56461#M13835</link>
      <description>&lt;P&gt;Thank you for the reply. I think "by host" should be "by source", no? That works but, as I said in my comment below, the path to the source file is too long so it gets abbreviated, making it impossible to tell which source is which on the graph...&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 20:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56461#M13835</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-23T20:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56462#M13836</link>
      <description>&lt;P&gt;Yes - my apologies, I read too quickly and missed where you said they were all on the same host. See below - the rex approach gkanapathy suggests is likely your best one.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 23:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56462#M13836</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-23T23:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56463#M13837</link>
      <description>&lt;P&gt;If you have angle brackets in the regex you need to either escape them, or preferably wrap them in a CDATA block. This link has an example of what CDATA looks like:  &lt;A href="http://www.quackit.com/xml/tutorial/xml_cdata.cfm"&gt;http://www.quackit.com/xml/tutorial/xml_cdata.cfm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 23:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56463#M13837</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-23T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56464#M13838</link>
      <description>&lt;P&gt;Aaah. Worked! Thanks, both of you!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2010 00:33:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56464#M13838</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-24T00:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56465#M13839</link>
      <description>&lt;P&gt;Thanks for the response!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2010 00:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56465#M13839</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2010-09-24T00:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing multiple data sources in one chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56466#M13840</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Even m facing a same type of problem and by source works, but what if there are n no of distinct values in source and i want to plot graph for only 2 particular values..&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2013 19:24:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Graphing-multiple-data-sources-in-one-chart/m-p/56466#M13840</guid>
      <dc:creator>coolsachin2390</dc:creator>
      <dc:date>2013-03-22T19:24:21Z</dc:date>
    </item>
  </channel>
</rss>

