<?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 Using two timechart to calculate the sum (each 15mim) and then the max (by day) by Folder in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313276#M164750</link>
    <description>&lt;P&gt;Hi, &lt;BR /&gt;
I'm new in Splunk (and my knowledge is very basic) and I have to build a complex dashboard with multiple indexes. I've tried googling it and I did not find anything related to my needs.&lt;BR /&gt;
So, I have my index with a log file from a group of servers (farm) and that log is imported every 15min (96 files everyday).&lt;/P&gt;

&lt;P&gt;My logfile has this name: source=ControlUp_Computers_11_22_2017_16_29_57 where "16_29_57" represents at what time it was imported to splunk.&lt;/P&gt;

&lt;P&gt;In this case I have to SUM all the servers sessions every 15min&lt;/P&gt;

&lt;P&gt;Source examples:&lt;BR /&gt;
ControlUp_Computers_11_22_2017_16_29_57.csv&lt;BR /&gt;
ControlUp_Computers_11_22_2017_16_44_59.csv&lt;/P&gt;

&lt;P&gt;My search is:&lt;/P&gt;

&lt;P&gt;Windows last 4 days&lt;BR /&gt;
index=pt_app_it_controlup sourcetype="csv-computers" &lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| timechart span=15min sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected&lt;BR /&gt;
| timechart span=1d max(Total), max(Active), max(Disconnected)&lt;/P&gt;

&lt;P&gt;Output:&lt;BR /&gt;
_time               max(Total)  max(Active) max(Disconnected)&lt;BR /&gt;
20/11/2017          4197        3076        2784&lt;BR /&gt;
21/11/2017          4243        3014        2803&lt;BR /&gt;
22/11/2017          8601        6089        2849&lt;BR /&gt;
23/11/2017          2570        2038        1824&lt;/P&gt;

&lt;P&gt;Each logfile has the number of all sessions state, so I need to SUM all of them and then get the MAX of each days.&lt;BR /&gt;
But all servers are grouped (by Folder) &lt;/P&gt;

&lt;P&gt;With this search I have my results&lt;BR /&gt;
index=pt_app_it_controlup sourcetype="csv-computers"&lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| eval Folder =substr(Folder,22,25)&lt;BR /&gt;
| timechart span=15min sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected  by Folder&lt;/P&gt;

&lt;P&gt;Folder names (agentes, callcenters)&lt;/P&gt;

&lt;P&gt;Output:&lt;BR /&gt;
_time               |Active: agentes    |Active: callcenters    |Disconnected: agentes  |Disconnected: callcenters  |Total: agentes |Total: callcenters&lt;BR /&gt;
2017-11-24 00:00:00 |11                 |54                     |16                     |584                        |479            |638&lt;BR /&gt;&lt;BR /&gt;
2017-11-24 00:15:00 |9                  |49                     |11                     |535                        |449            |584&lt;BR /&gt;&lt;BR /&gt;
2017-11-24 00:30:00 |9                  |45                     |6                      |439                        |410            |484                &lt;/P&gt;

&lt;P&gt;Now I need to find the MAX of each day by Folder. But applying the 2nd timechart I can't get my results&lt;/P&gt;

&lt;P&gt;index=pt_app_it_controlup sourcetype="csv-computers"&lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| eval Folder =substr(Folder,22,25)&lt;BR /&gt;
| timechart span=15m sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected &lt;BR /&gt;
| timechart span=1d max("Total"), max("Active"), max("Disconnected") by Folder&lt;/P&gt;

&lt;P&gt;Can you help pointing me to the right direction?&lt;/P&gt;

&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:01:31 GMT</pubDate>
    <dc:creator>fariapm1</dc:creator>
    <dc:date>2020-09-29T17:01:31Z</dc:date>
    <item>
      <title>Using two timechart to calculate the sum (each 15mim) and then the max (by day) by Folder</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313276#M164750</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
I'm new in Splunk (and my knowledge is very basic) and I have to build a complex dashboard with multiple indexes. I've tried googling it and I did not find anything related to my needs.&lt;BR /&gt;
So, I have my index with a log file from a group of servers (farm) and that log is imported every 15min (96 files everyday).&lt;/P&gt;

&lt;P&gt;My logfile has this name: source=ControlUp_Computers_11_22_2017_16_29_57 where "16_29_57" represents at what time it was imported to splunk.&lt;/P&gt;

&lt;P&gt;In this case I have to SUM all the servers sessions every 15min&lt;/P&gt;

&lt;P&gt;Source examples:&lt;BR /&gt;
ControlUp_Computers_11_22_2017_16_29_57.csv&lt;BR /&gt;
ControlUp_Computers_11_22_2017_16_44_59.csv&lt;/P&gt;

&lt;P&gt;My search is:&lt;/P&gt;

&lt;P&gt;Windows last 4 days&lt;BR /&gt;
index=pt_app_it_controlup sourcetype="csv-computers" &lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| timechart span=15min sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected&lt;BR /&gt;
| timechart span=1d max(Total), max(Active), max(Disconnected)&lt;/P&gt;

&lt;P&gt;Output:&lt;BR /&gt;
_time               max(Total)  max(Active) max(Disconnected)&lt;BR /&gt;
20/11/2017          4197        3076        2784&lt;BR /&gt;
21/11/2017          4243        3014        2803&lt;BR /&gt;
22/11/2017          8601        6089        2849&lt;BR /&gt;
23/11/2017          2570        2038        1824&lt;/P&gt;

&lt;P&gt;Each logfile has the number of all sessions state, so I need to SUM all of them and then get the MAX of each days.&lt;BR /&gt;
But all servers are grouped (by Folder) &lt;/P&gt;

&lt;P&gt;With this search I have my results&lt;BR /&gt;
index=pt_app_it_controlup sourcetype="csv-computers"&lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| eval Folder =substr(Folder,22,25)&lt;BR /&gt;
| timechart span=15min sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected  by Folder&lt;/P&gt;

&lt;P&gt;Folder names (agentes, callcenters)&lt;/P&gt;

&lt;P&gt;Output:&lt;BR /&gt;
_time               |Active: agentes    |Active: callcenters    |Disconnected: agentes  |Disconnected: callcenters  |Total: agentes |Total: callcenters&lt;BR /&gt;
2017-11-24 00:00:00 |11                 |54                     |16                     |584                        |479            |638&lt;BR /&gt;&lt;BR /&gt;
2017-11-24 00:15:00 |9                  |49                     |11                     |535                        |449            |584&lt;BR /&gt;&lt;BR /&gt;
2017-11-24 00:30:00 |9                  |45                     |6                      |439                        |410            |484                &lt;/P&gt;

&lt;P&gt;Now I need to find the MAX of each day by Folder. But applying the 2nd timechart I can't get my results&lt;/P&gt;

&lt;P&gt;index=pt_app_it_controlup sourcetype="csv-computers"&lt;BR /&gt;
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'&lt;BR /&gt;
| eval Folder =substr(Folder,22,25)&lt;BR /&gt;
| timechart span=15m sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected &lt;BR /&gt;
| timechart span=1d max("Total"), max("Active"), max("Disconnected") by Folder&lt;/P&gt;

&lt;P&gt;Can you help pointing me to the right direction?&lt;/P&gt;

&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313276#M164750</guid>
      <dc:creator>fariapm1</dc:creator>
      <dc:date>2020-09-29T17:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using two timechart to calculate the sum (each 15mim) and then the max (by day) by Folder</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313277#M164751</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=pt_app_it_controlup sourcetype="csv-computers"
| eval Disconnect = 'Disconnected Sessions' + 'Idle Sessions' + 'Other Sessions'
| eval Folder =substr(Folder,22,25)
| timechart span=15m sum("User Sessions") as Total, sum(Active Sessions) as Active, sum(Disconnect) as Disconnected 
| timechart span=1d max(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically get max of each available columns with span=1d.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 15:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313277#M164751</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-28T15:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using two timechart to calculate the sum (each 15mim) and then the max (by day) by Folder</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313278#M164752</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It works, many tanks!!!&lt;/P&gt;

&lt;P&gt;Meanwhile, also found a similar solution:&lt;BR /&gt;
| bucket span=24h _time&lt;BR /&gt;
| stats max(*) as * by _time&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 10:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-timechart-to-calculate-the-sum-each-15mim-and-then-the/m-p/313278#M164752</guid>
      <dc:creator>fariapm1</dc:creator>
      <dc:date>2017-11-29T10:05:53Z</dc:date>
    </item>
  </channel>
</rss>

