<?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 Timecharts by a field in single search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540656#M152959</link>
    <description>&lt;P&gt;I've used the trellis option to achieve this. For example:&lt;/P&gt;&lt;P&gt;index=_internal sourcetype=splunkd source=*/splunkd.log*&lt;BR /&gt;| bin _time span=10m&lt;BR /&gt;| stats count(eval(case(log_level=="ERROR", log_level))) as ERROR count(eval(case(log_level=="WARN", log_level))) as WARN count(eval(case(log_level=="INFO", log_level))) as INFO by _time component&lt;/P&gt;&lt;P&gt;will produce a table of log_level counts by _time and component:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%"&gt;_time&lt;/TD&gt;&lt;TD width="20%"&gt;component&lt;/TD&gt;&lt;TD width="20%"&gt;ERROR&lt;/TD&gt;&lt;TD width="20%"&gt;WARN&lt;/TD&gt;&lt;TD width="20%"&gt;INFO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;2021-02-20 11:00&lt;/TD&gt;&lt;TD width="20%"&gt;AdminManager&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the chart configuration, enable trellis and split by the desired field. I split by component in this example to display counts of events by log_level over time per component.&lt;/P&gt;</description>
    <pubDate>Sat, 20 Feb 2021 18:23:08 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2021-02-20T18:23:08Z</dc:date>
    <item>
      <title>Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/511585#M143414</link>
      <description>&lt;P&gt;I wanted to create multiple timecharts in a single search. The scenario i am stuck in is something like this :&lt;/P&gt;&lt;P&gt;index = "A" sourcetype = "B" | where Activity_type = "Activity1" | timechart span=10m count by Event_Type&lt;/P&gt;&lt;P&gt;There are multiple activity_type fields and i want multiple timecharts by Event_Type for different Activity_type in a single search.&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 17:01:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/511585#M143414</guid>
      <dc:creator>nagpalga</dc:creator>
      <dc:date>2020-07-29T17:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540650#M152953</link>
      <description>&lt;P&gt;I would like to do the same in a dashboard if possible -- generate a timechart per host in the search results.&amp;nbsp; Might someone be able to provide some insight here, even point to similar question that has been answered?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 16:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540650#M152953</guid>
      <dc:creator>j0e3gan</dc:creator>
      <dc:date>2021-02-20T16:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540655#M152958</link>
      <description>&lt;P&gt;In your dashboard, near the top of the simpleXML, you can have a base search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;search id="base_search"&amp;gt;
    &amp;lt;query&amp;gt;index = "A" sourcetype = "B" | timechart span=10m count by Activity_type, Event_Type&amp;lt;/query&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in each dashboard panel, you set the query to be based on your base search with the additional where clause&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      &amp;lt;chart&amp;gt;
        &amp;lt;search base="base_search"&amp;gt;
          &amp;lt;query&amp;gt;| search "Activity1"&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 16:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540655#M152958</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-22T16:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540656#M152959</link>
      <description>&lt;P&gt;I've used the trellis option to achieve this. For example:&lt;/P&gt;&lt;P&gt;index=_internal sourcetype=splunkd source=*/splunkd.log*&lt;BR /&gt;| bin _time span=10m&lt;BR /&gt;| stats count(eval(case(log_level=="ERROR", log_level))) as ERROR count(eval(case(log_level=="WARN", log_level))) as WARN count(eval(case(log_level=="INFO", log_level))) as INFO by _time component&lt;/P&gt;&lt;P&gt;will produce a table of log_level counts by _time and component:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%"&gt;_time&lt;/TD&gt;&lt;TD width="20%"&gt;component&lt;/TD&gt;&lt;TD width="20%"&gt;ERROR&lt;/TD&gt;&lt;TD width="20%"&gt;WARN&lt;/TD&gt;&lt;TD width="20%"&gt;INFO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;2021-02-20 11:00&lt;/TD&gt;&lt;TD width="20%"&gt;AdminManager&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the chart configuration, enable trellis and split by the desired field. I split by component in this example to display counts of events by log_level over time per component.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 18:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540656#M152959</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2021-02-20T18:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540869#M153078</link>
      <description>&lt;P&gt;Trellis options give me a timechart per server using my browser, which is perfect.&amp;nbsp; Only downside for me is that PDF export does not support trellis options, but this is still a handy approach when PDF export is not a concern.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 16:49:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540869#M153078</guid>
      <dc:creator>j0e3gan</dc:creator>
      <dc:date>2021-02-22T16:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Timecharts by a field in single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540872#M153079</link>
      <description>&lt;P&gt;In the dashboard where I tested your suggestion, a base search in the related panel followed by a post-process search in each of the panel's charts works well -- gives me a timechart per server both in my browser &lt;EM&gt;and&lt;/EM&gt; PDF exports.&amp;nbsp; Only downside is having to know the number of servers to prepare a chart with a post-process search per server, which is not quite as clean as the trellis option mentioned that dynamically produces charts for &lt;EM&gt;n&lt;/EM&gt; servers.&amp;nbsp; Still, compatibility with PDF exports requires tradeoffs with maintainability in my experience, so this solution is great when I need it.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 17:04:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-Timecharts-by-a-field-in-single-search/m-p/540872#M153079</guid>
      <dc:creator>j0e3gan</dc:creator>
      <dc:date>2021-02-22T17:04:12Z</dc:date>
    </item>
  </channel>
</rss>

