<?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: How to create a timechart using a root search with data models and pivots? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156898#M44149</link>
    <description>&lt;P&gt;Lisa, &lt;/P&gt;

&lt;P&gt;I have same issue, from pivot I am not able to plot the timechart graph, though by _time I am able to get require graph. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Not Working&lt;/STRONG&gt;&lt;BR /&gt;
| pivot DataModel_AccessService perf count(TPS) AS "tps" sum(execTime) AS&lt;BR /&gt;
"execTime" SPLITROW _time AS _time PERIOD AUTO SPLITROW host AS hostname|&lt;BR /&gt;
timechart sum(execTime)&lt;BR /&gt;
&lt;STRONG&gt;Working&lt;/STRONG&gt;&lt;BR /&gt;
| pivot DataModel_AccessService perf count(TPS) AS "tps" sum(execTime) AS&lt;BR /&gt;
"execTime" SPLITROW _time AS _time PERIOD AUTO SPLITROW host AS hostname|&lt;BR /&gt;
chart sum(execTime) by _time&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sumit &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:27:56 GMT</pubDate>
    <dc:creator>sumitnagal</dc:creator>
    <dc:date>2020-09-28T18:27:56Z</dc:date>
    <item>
      <title>How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156891#M44142</link>
      <description>&lt;P&gt;According to the documentation here, &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Knowledge/Designdatamodelobjects"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Knowledge/Designdatamodelobjects&lt;/A&gt;, &lt;/P&gt;

&lt;P&gt;"You should create root search objects for any searches that do not map directly to Splunk events. In other words, searches that involve input or output that is not in the format of an event. This includes searches that:&lt;/P&gt;

&lt;P&gt;Make use of transforming commands such as stats, chart, and timechart. Transforming commands organize the data they return into tables rather than event lists."&lt;/P&gt;

&lt;P&gt;Can someone please give me an example or an idea of how to create a timechart using a root search with data models and pivots?  Root search does not extract the _time timestamp so I don't see how I can create a pivot chart with a root search.  Is there a way I can get the timestamp attributes into the root search so I can create a timechart?  I am very confused.&lt;/P&gt;

&lt;P&gt;Thanks for any help.&lt;BR /&gt;
Eric&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 19:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156891#M44142</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2014-07-24T19:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156892#M44143</link>
      <description>&lt;P&gt;This doesn't seem to be what root search was designed to do.&lt;/P&gt;

&lt;P&gt;Could you give an example of why you need to create a root search and have the _time field?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2014 20:07:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156892#M44143</guid>
      <dc:creator>okrabbe</dc:creator>
      <dc:date>2014-07-26T20:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156893#M44144</link>
      <description>&lt;P&gt;Well, first you &lt;EM&gt;can&lt;/EM&gt; have &lt;CODE&gt;_time&lt;/CODE&gt; as part of a root search in a pivot. All you have to do is to include &lt;CODE&gt;_time&lt;/CODE&gt; as one of the fields after the &lt;CODE&gt;by&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But - just because you want to create a timechart doesn't mean that you need a root search. You could have a root event object - no problem. Then open the pivot and choose the object. For the &lt;STRONG&gt;Split Rows&lt;/STRONG&gt;, choose &lt;CODE&gt;_time&lt;/CODE&gt;and choose the interval. For the &lt;STRONG&gt;Column Values&lt;/STRONG&gt;, choose the statistic that you want. Then you can click on the &lt;STRONG&gt;Line Chart&lt;/STRONG&gt; in the black bar on the left, and go from there...&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jul 2014 16:35:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156893#M44144</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-07-27T16:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156894#M44145</link>
      <description>&lt;P&gt;I appreciate your feedback about the by _time. I will try that. In regards to using an root event I have tried that with this query but since it includes a join, I cannot use a root event.  I posted a separate question regarding the join in a root event.  Thanks again. I'll comment back on if it works or not.  &lt;/P&gt;</description>
      <pubDate>Sun, 27 Jul 2014 17:40:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156894#M44145</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2014-07-27T17:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156895#M44146</link>
      <description>&lt;P&gt;lguinn, have you tried that?  i tried adding _time to a root search and then the data model would not load in pivot.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:55:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156895#M44146</guid>
      <dc:creator>okrabbe</dc:creator>
      <dc:date>2014-07-28T14:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156896#M44147</link>
      <description>&lt;P&gt;Here is an example of the query I am trying to do:&lt;BR /&gt;&lt;BR /&gt;
sourcetype=xxx-yyy FOO | join host [search sourcetype=xxx-yyy BAR] | eval var=(ABC - (DEF + GHI + FOO + BAR)) | timechart span=30m sum(var) by host&lt;/P&gt;

&lt;P&gt;Im trying to divide the columns up by the host so not sure how to use "by _time" with this one in data models and generate a pivot from it.  Thanks for all your help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156896#M44147</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2014-07-28T15:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156897#M44148</link>
      <description>&lt;P&gt;Well, first - if you want a timeline then you need to use _time (or &lt;EM&gt;some&lt;/EM&gt; time field!) When you use the &lt;CODE&gt;timechart&lt;/CODE&gt; command, it takes care of this for you automatically.&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=xxx-yyy (FOO OR BAR)&lt;BR /&gt;
| eval var=(ABC - (DEF + GHI + FOO + BAR)) &lt;BR /&gt;
| timechart span=30m sum(var) by host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You don't need the &lt;CODE&gt;join&lt;/CODE&gt; at all, as far as I can see... (And sorry about the updates, but I just noticed that both searches use the same sourcetype - even &lt;EM&gt;less&lt;/EM&gt; cause for a subsearch!)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 04:09:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156897#M44148</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-07-29T04:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156898#M44149</link>
      <description>&lt;P&gt;Lisa, &lt;/P&gt;

&lt;P&gt;I have same issue, from pivot I am not able to plot the timechart graph, though by _time I am able to get require graph. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Not Working&lt;/STRONG&gt;&lt;BR /&gt;
| pivot DataModel_AccessService perf count(TPS) AS "tps" sum(execTime) AS&lt;BR /&gt;
"execTime" SPLITROW _time AS _time PERIOD AUTO SPLITROW host AS hostname|&lt;BR /&gt;
timechart sum(execTime)&lt;BR /&gt;
&lt;STRONG&gt;Working&lt;/STRONG&gt;&lt;BR /&gt;
| pivot DataModel_AccessService perf count(TPS) AS "tps" sum(execTime) AS&lt;BR /&gt;
"execTime" SPLITROW _time AS _time PERIOD AUTO SPLITROW host AS hostname|&lt;BR /&gt;
chart sum(execTime) by _time&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sumit &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156898#M44149</guid>
      <dc:creator>sumitnagal</dc:creator>
      <dc:date>2020-09-28T18:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156899#M44150</link>
      <description>&lt;P&gt;I have exactly the same issue.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 21:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156899#M44150</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2015-04-06T21:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart using a root search with data models and pivots?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156900#M44151</link>
      <description>&lt;P&gt;This seems to work in 6.3. Just make sure you are passing in &lt;STRONG&gt;_time&lt;/STRONG&gt; into the pivot query. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| pivot DataModel_AccessService perf count(TPS) AS hits SPLITROW _time AS _time PERIOD AUTO SPLITROW host AS hostname | timechart sum(hits) by hostname 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 07:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-using-a-root-search-with-data-models/m-p/156900#M44151</guid>
      <dc:creator>spammenot66</dc:creator>
      <dc:date>2016-02-24T07:17:52Z</dc:date>
    </item>
  </channel>
</rss>

