<?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: multiple Y axis results in same graph in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73799#M18513</link>
    <description>&lt;P&gt;Ok, so I figured it out. The problem was in Splunk being able to interpret my Mysql DB time format. In my Mysql query I converted it to timestamp and named it AS _time (as used by Splunk). After that, I just had to manipulate the timechart command.&lt;/P&gt;

&lt;P&gt;My final, and working search:&lt;/P&gt;

&lt;P&gt;| mysqlquery spec=database query="SELECT unix_timestamp(time) AS _time , url , AVG(results) as AVGRES FROM result_tbl BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 1 DAY ) AND CURDATE( ) GROUP BY url, DATE(time), HOUR(time);" schema=database | timechart span=1h avg(AVGRES) by url&lt;/P&gt;

&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:10:10 GMT</pubDate>
    <dc:creator>zarahel</dc:creator>
    <dc:date>2020-09-28T14:10:10Z</dc:date>
    <item>
      <title>multiple Y axis results in same graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73795#M18509</link>
      <description>&lt;P&gt;Hello to you all&lt;/P&gt;

&lt;P&gt;I need your help&lt;/P&gt;

&lt;P&gt;I´m performing a MySQL query and getting the following results:&lt;/P&gt;

&lt;P&gt;TIME     ||  RESULTS   ||       URL&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    22  || &lt;A href="http://www.youtube.com"&gt;www.youtube.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    22  || &lt;A href="http://www.youtube.com"&gt;www.youtube.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    22  || &lt;A href="http://www.google.com"&gt;www.google.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    21  || &lt;A href="http://www.google.com"&gt;www.google.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    23  || &lt;A href="http://www.facebook.com"&gt;www.facebook.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2013-06-23 ||    21  || &lt;A href="http://www.facebook.com"&gt;www.facebook.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I´m trying to create a graph where the X axis is the time, and the Y axis is composed by 3 lines, where each line corresponds to the results obtained for each of the 3 URLs (facebook, google and youtube).&lt;/P&gt;

&lt;P&gt;I´m not sure how to do it. I´ve read some examples where some tried to overlap different searches or different fields, but my case is a little different, since I need to create 3 lines based on different values from the same field 'URL', performed by 1 search.&lt;/P&gt;

&lt;P&gt;Any help is appreciated&lt;/P&gt;

&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 20:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73795#M18509</guid>
      <dc:creator>zarahel</dc:creator>
      <dc:date>2013-06-24T20:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Y axis results in same graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73796#M18510</link>
      <description>&lt;P&gt;You can use the timechart command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search | timechart count by URL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may need to format it so that that it shows bars rather than lines. &lt;/P&gt;

&lt;P&gt;Please let me know if that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 20:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73796#M18510</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-06-24T20:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Y axis results in same graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73797#M18511</link>
      <description>&lt;P&gt;okrabbe_splunk &lt;/P&gt;

&lt;P&gt;Thank you for your feedback. It didn´t work.&lt;/P&gt;

&lt;P&gt;I´m using MySQLConnector to perform the query, and when I add the timechart command, I get "no results found"&lt;/P&gt;

&lt;P&gt;This is the query I´m running:&lt;/P&gt;

&lt;P&gt;| mysqlquery spec=database query="SELECT time AS ATIME , url , AVG(results) FROM result_tbl BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 1 DAY ) AND CURDATE( ) GROUP BY url, DATE(time), HOUR(time);" schema=database | timechart count by url&lt;/P&gt;

&lt;P&gt;If I remove the timechart command I get the results&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73797#M18511</guid>
      <dc:creator>zarahel</dc:creator>
      <dc:date>2020-09-28T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Y axis results in same graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73798#M18512</link>
      <description>&lt;P&gt;Ok, now I understand a bit better.   You cannot use timechart because your time variables are not stored in our _time variable.  You do need to convert it to epoch time.&lt;/P&gt;

&lt;P&gt;|mysqlquery "myquery" | eval _time=strptime(time,"%Y-%m-%d-%H") | timechart count by url&lt;/P&gt;

&lt;P&gt;If this does not work , can you paste the out of the following:&lt;/P&gt;

&lt;P&gt;|mysqlquery "myquery" | eval _time=strptime(time,"%Y-%m-%d-%H") | table _time time url&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 13:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73798#M18512</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-06-25T13:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Y axis results in same graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73799#M18513</link>
      <description>&lt;P&gt;Ok, so I figured it out. The problem was in Splunk being able to interpret my Mysql DB time format. In my Mysql query I converted it to timestamp and named it AS _time (as used by Splunk). After that, I just had to manipulate the timechart command.&lt;/P&gt;

&lt;P&gt;My final, and working search:&lt;/P&gt;

&lt;P&gt;| mysqlquery spec=database query="SELECT unix_timestamp(time) AS _time , url , AVG(results) as AVGRES FROM result_tbl BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 1 DAY ) AND CURDATE( ) GROUP BY url, DATE(time), HOUR(time);" schema=database | timechart span=1h avg(AVGRES) by url&lt;/P&gt;

&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Y-axis-results-in-same-graph/m-p/73799#M18513</guid>
      <dc:creator>zarahel</dc:creator>
      <dc:date>2020-09-28T14:10:10Z</dc:date>
    </item>
  </channel>
</rss>

