<?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: One search to create multiple line chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66470#M16534</link>
    <description>&lt;P&gt;Assuming that you have the fields already extracted, this is one way of doing it. In this case we're charting by &lt;CODE&gt;_time&lt;/CODE&gt;, which along with &lt;CODE&gt;first()&lt;/CODE&gt; will work more as a plotting command than an aggregation command, given that there is only one event per &lt;CODE&gt;_time&lt;/CODE&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_base_search | chart first(visibility) first(dewPoint) first(temperature) first(ozone) by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also use &lt;CODE&gt;timechart span=xxx stats_command(field) stats_command(field)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2013 08:05:15 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-06-18T08:05:15Z</dc:date>
    <item>
      <title>One search to create multiple line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66469#M16533</link>
      <description>&lt;P&gt;Is there any way that we can use a search to create multiple line chart? against the time? I set an interval on 300 seconds and against time, what is the best search commands that we can use ?&lt;/P&gt;

&lt;P&gt;time : 1371459878&lt;BR /&gt;
visibility : 1.73&lt;BR /&gt;
windBearing : 197&lt;BR /&gt;
windSpeed : 8.97&lt;BR /&gt;
cloudCover : 0.97&lt;BR /&gt;
dewPoint : 70.9&lt;BR /&gt;
humidity : 0.55&lt;BR /&gt;
icon : cloudy&lt;BR /&gt;
ozone : 264.25&lt;BR /&gt;
precipIntensity : 0&lt;BR /&gt;
pressure : 1004.23&lt;BR /&gt;
summary : Overcast&lt;BR /&gt;
temperature : 90.46&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 06:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66469#M16533</guid>
      <dc:creator>sbnoobbb</dc:creator>
      <dc:date>2013-06-18T06:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: One search to create multiple line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66470#M16534</link>
      <description>&lt;P&gt;Assuming that you have the fields already extracted, this is one way of doing it. In this case we're charting by &lt;CODE&gt;_time&lt;/CODE&gt;, which along with &lt;CODE&gt;first()&lt;/CODE&gt; will work more as a plotting command than an aggregation command, given that there is only one event per &lt;CODE&gt;_time&lt;/CODE&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_base_search | chart first(visibility) first(dewPoint) first(temperature) first(ozone) by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also use &lt;CODE&gt;timechart span=xxx stats_command(field) stats_command(field)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 08:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66470#M16534</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-06-18T08:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: One search to create multiple line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66471#M16535</link>
      <description>&lt;P&gt;Given search below, do you have any guidance to improve my search ?&lt;/P&gt;

&lt;P&gt;sourcetype="NYPWeatherForecastCurrently" | chart first(current_temperature) max(current_temperature) avg(current_temperature) min(current_temperature) first(current_psi) first(current_humidity) first(current_dewpoint) first(current_visibility) first(current_windSpeed) by _time&lt;/P&gt;

&lt;P&gt;time : 1371697655&lt;BR /&gt;
visibility : 0.3&lt;BR /&gt;
windBearing : 247&lt;BR /&gt;
windSpeed : 7.16&lt;BR /&gt;
psiAverage : 162&lt;BR /&gt;
cloudCover : 0.38&lt;BR /&gt;
dewPoint : 72.24&lt;BR /&gt;
humidity : 0.57&lt;BR /&gt;
icon : fog&lt;BR /&gt;
ozone : 268.3&lt;BR /&gt;
precipIntensity : 0&lt;BR /&gt;
pressure : 1007.63&lt;BR /&gt;
summary : Foggy&lt;BR /&gt;
temperature : 89.95&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:08:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66471#M16535</guid>
      <dc:creator>sbnoobbb</dc:creator>
      <dc:date>2020-09-28T14:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: One search to create multiple line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66472#M16536</link>
      <description>&lt;P&gt;if you want to use min/max/avg you might want to &lt;CODE&gt;bucket&lt;/CODE&gt; &lt;CODE&gt;_time&lt;/CODE&gt;, or use the &lt;CODE&gt;timechart&lt;/CODE&gt;. Otherwise the values will be the same (guessing you have one event per _time).&lt;/P&gt;

&lt;P&gt;Use &lt;CODE&gt;timechart span=XXX max(Y) avg(Y) min(Y) max(Z) avg(Z)&lt;/CODE&gt; etc, where the span is long enough to ensure that several events get included in the time-slot.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 07:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66472#M16536</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-06-20T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: One search to create multiple line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66473#M16537</link>
      <description>&lt;P&gt;Thanks !!!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 08:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/One-search-to-create-multiple-line-chart/m-p/66473#M16537</guid>
      <dc:creator>sbnoobbb</dc:creator>
      <dc:date>2013-06-25T08:06:57Z</dc:date>
    </item>
  </channel>
</rss>

