<?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: Dbquery and time_stamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163839#M46546</link>
    <description>&lt;P&gt;now its working; &lt;BR /&gt;
| dbquery TEST_DB "your SQL here" |  convert timeformat="%F %H:%M:%S" ctime(time_stamp) AS _time  --&amp;gt; did not work&lt;BR /&gt;
| dbquery TEST_DB "your SQL here" | rename time_stamp as _time --&amp;gt; Worked&lt;/P&gt;

&lt;P&gt;Thank You for you time.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:00:25 GMT</pubDate>
    <dc:creator>gudavasr</dc:creator>
    <dc:date>2020-09-28T16:00:25Z</dc:date>
    <item>
      <title>Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163831#M46538</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a query like&lt;BR /&gt;
| dbquery TEST_DB "select a.time_stamp, a.num_busy_engines, a.num_total_engines, a.num_tasks_pending, b.broker_name&lt;BR /&gt;
from broker_stats a, brokers b &lt;BR /&gt;
where a.broker_id = 2131184378  and a.broker_id = b.broker_id&lt;BR /&gt;
and time_stamp &amp;gt; '2014-02-20 4:00:00 PM' and time_stamp &amp;lt; '2014-02-21 3:00:00 AM' order by time_stamp asc"&lt;BR /&gt;
| convert timeformat="%F %H:%M:%S" ctime(time_stamp) AS stats_time  | chart list(num_busy_engines) AS BusyEngines, list(num_total_engines) AS TotalEngines over stats_time&lt;/P&gt;

&lt;P&gt;I am charting this as line graph, but the problem is the maximum visualization of the graph is seen only for 3-4hrs i.e. from 4:00pm to 9:00pm; What should I change to view the graph until 3:00am? I tried timechart but not successful. Please help.&lt;BR /&gt;
Thank You.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163831#M46538</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2020-09-28T15:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163832#M46539</link>
      <description>&lt;P&gt;What span are your timestamps?&lt;/P&gt;

&lt;P&gt;How did you fail when using timechart?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2014 20:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163832#M46539</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-24T20:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163833#M46540</link>
      <description>&lt;P&gt;In the query:&lt;BR /&gt;
time_stamp &amp;gt; '2014-02-20 4:00:00 PM' and time_stamp &amp;lt; '2014-02-21 3:00:00 AM' &lt;/P&gt;

&lt;P&gt;a) the chart shows only the results from 4:00pm to 9:00pm instead of until 3:00am. is there a way to see the line graph until 3:00am&lt;BR /&gt;
b) I tried timechart per_hour(time_stamp) list(num_busy_engines) but not working. How can I use timechart command for this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163833#M46540</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2020-09-28T15:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163834#M46541</link>
      <description>&lt;P&gt;To rephrase the first question, how many timestamps do you get from 4pm to 3am? Splunk JSCharts will only display 500ish data points, you're likely going over that.&lt;/P&gt;

&lt;P&gt;Your timechart in b) looks weird, and it needs a _time field to work with. Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery TEST_DB "your SQL here" | rename time_stamp as _time | timechart avg(*engines)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Depending on your timestamp you may need to keep your convert call from the original query.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2014 20:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163834#M46541</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-24T20:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163835#M46542</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I think I know what is going on here. X-axis is limited to plot first 500 values (or points). Do you know how this can be extended?&lt;BR /&gt;
Thank You.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163835#M46542</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2014-02-27T19:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163836#M46543</link>
      <description>&lt;P&gt;Use the &lt;CODE&gt;timechart&lt;/CODE&gt; command to limit the bucket count to a sensible, well-chartable number.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163836#M46543</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-27T19:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163837#M46544</link>
      <description>&lt;P&gt;timechart command is not returning any output. nly chart command works. I tried this and many more with timechart but no luck; it return only _time values nothing else.&lt;BR /&gt;
| dbquery TEST_DB "your SQL here" | rename time_stamp as _time | timechart avg(*engines)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163837#M46544</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2020-09-28T16:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163838#M46545</link>
      <description>&lt;P&gt;Is your &lt;CODE&gt;time_stamp&lt;/CODE&gt; field an epoch timestamp or a human-readable string?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163838#M46545</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-27T21:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163839#M46546</link>
      <description>&lt;P&gt;now its working; &lt;BR /&gt;
| dbquery TEST_DB "your SQL here" |  convert timeformat="%F %H:%M:%S" ctime(time_stamp) AS _time  --&amp;gt; did not work&lt;BR /&gt;
| dbquery TEST_DB "your SQL here" | rename time_stamp as _time --&amp;gt; Worked&lt;/P&gt;

&lt;P&gt;Thank You for you time.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163839#M46546</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2020-09-28T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dbquery and time_stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163840#M46547</link>
      <description>&lt;P&gt;Great. I've converted a comment to an answer so you can mark the question as solved.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:39:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dbquery-and-time-stamp/m-p/163840#M46547</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-27T21:39:13Z</dc:date>
    </item>
  </channel>
</rss>

