<?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: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692027#M235584</link>
    <description>&lt;P&gt;It's not a very good search to begin with (unneeded multisearch and wildcard-beginning search terms) so maybe show a sample (anonymized if needed) of your data and a description of what you need to get from it. That might be easier than "fixing" this one.&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jun 2024 18:29:19 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-06-30T18:29:19Z</dc:date>
    <item>
      <title>I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692024#M235583</link>
      <description>&lt;P&gt;I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days. My below query works for a days search but doesn't displays for 7 days. Could you please help with fixing the query.&lt;/P&gt;&lt;P&gt;Below is my query.&lt;/P&gt;&lt;P&gt;| multisearch&lt;BR /&gt;[ search index=myindex source=mysoruce "* from *" earliest=-7d@d latest=@d&lt;BR /&gt;| fields TRN, tomcatget, Queue ]&lt;BR /&gt;[ search index=myindex source=mysoruce *sent* earliest=-7d@d latest=@d&lt;BR /&gt;| fields TRN, TimeMQPut, Status]&lt;BR /&gt;[ search index=myindex source=mysoruce *Priority* earliest=-7d@d latest=@d&lt;BR /&gt;| fields TRN,Priority ]&lt;BR /&gt;| stats values(*) as * by TRN&lt;BR /&gt;| eval PPut=strptime(tomcatput, "%y%m%d %H:%M:%S")&lt;BR /&gt;| eval PGet=strptime(tomcatget,"%y%m%d %H:%M:%S")&lt;BR /&gt;| eval tomcatGet2tomcatPut=round((PPut-PGet),0)&lt;BR /&gt;| fillnull value="No_tomcatPut_Time" tomcatput&lt;BR /&gt;| fillnull value="No_tomcatGet_Time" tomcatget&lt;BR /&gt;| table TRN, Queue, BackEndID, Status, Priority, tomcatget, tomcatput, tomcatGet2tomcatPut&lt;BR /&gt;| eval E2E_5min=if(tomcatGet2tomcatPut&amp;lt;=300,1,0)&lt;BR /&gt;| eval E2E_20min=if(tomcatGet2tomcatPut&amp;gt;300 and tomcatGet2tomcatPut&amp;lt;=1200,1,0)&lt;BR /&gt;| eval E2E_50min=if(tomcatGet2tomcatPut&amp;gt;1200 and tomcatGet2tomcatPut&amp;lt;=3000,1,0)&lt;BR /&gt;| eval E2EGT50min=if(tomcatGet2tomcatPut&amp;gt;3000,1,0)&lt;BR /&gt;| eval Total = E2E_5min + E2E_20min + E2E_50min + E2EGT50min&lt;BR /&gt;| stats sum(E2E_5min) as sum_5min sum(E2E_20min) as sum_20min sum(E2E_50min) as sum_50min sum(E2EGT50min) as sum_50GTmin sum(Total) as sum_total by Priority&lt;BR /&gt;| eval bad = if(Priority="High", sum_20min + sum_50min + sum_50GTmin, if(Priority="Medium", sum_50min + sum_50GTmin, if(Priority="Low", sum_50GTmin, null())))&lt;BR /&gt;| eval good = if(Priority="High", sum_5min, if(Priority="Medium", sum_5min + sum_20min, if(Priority="Low", sum_5min+ sum_20min + sum_50min, null())))&lt;BR /&gt;| eval per_cal = if(Priority="High", (good / sum_total) * 100, if(Priority="Medium", (good / sum_total) * 100, if(Priority="Low", (good / sum_total) * 100, null())))&lt;BR /&gt;| table Priority per_cal&lt;BR /&gt;&lt;BR /&gt;looking to get output in below format.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a508184_1-1719771321895.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31567iE66938AC13FE9F06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a508184_1-1719771321895.png" alt="a508184_1-1719771321895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 18:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692024#M235583</guid>
      <dc:creator>a508184</dc:creator>
      <dc:date>2024-06-30T18:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692027#M235584</link>
      <description>&lt;P&gt;It's not a very good search to begin with (unneeded multisearch and wildcard-beginning search terms) so maybe show a sample (anonymized if needed) of your data and a description of what you need to get from it. That might be easier than "fixing" this one.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 18:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692027#M235584</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-06-30T18:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692030#M235586</link>
      <description>&lt;P&gt;Thanks PickleRick, I get each field details from different sources, my bad I updated the same source for all the searches, actually those are different.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 19:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692030#M235586</guid>
      <dc:creator>a508184</dc:creator>
      <dc:date>2024-06-30T19:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692031#M235587</link>
      <description>&lt;P&gt;Apart from the problems already identified by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;you should do as advised and provide anonymised representative examples of your events and a description of what it is you are trying to do, because your current approach does not look very performant or even workable.&lt;/P&gt;&lt;P&gt;If you want daily statistics, you should include some sort of time factor in your by clause&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin _time span=1d
| stats values(*) as * by _time, TRN&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 30 Jun 2024 19:29:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692031#M235587</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-06-30T19:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692034#M235589</link>
      <description>&lt;P&gt;below are the logs.&lt;/P&gt;&lt;P&gt;source=gettomcat&lt;BR /&gt;240628 05:59:41 6677 gettomcat: ===&amp;gt; TRN@q1: abbb-acabca-adste112 [Priority=Medium].&lt;BR /&gt;240628 05:59:41 6677 gettomcat: &amp;lt;--- TRN: abbb-acabca-adste112 - S.&lt;/P&gt;&lt;P&gt;source=puttomcat&lt;BR /&gt;240628 05:59:58 32296 puttomcat: ---&amp;gt; TRN: abbb-acabca-adste112 - Done.&lt;/P&gt;&lt;P&gt;From the gettomcat source extracted the priority and time, from the puttomcat i have extracted the time, i did a calculation to see the round trip of a request and also percentage of passed request.&lt;/P&gt;&lt;P&gt;Now i need to disable as per the below screenshot. Priority, percentage of each prioirty per day for the last 7 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a508184_0-1719781007883.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31568iC6CBF411540B91C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a508184_0-1719781007883.png" alt="a508184_0-1719781007883.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 20:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692034#M235589</guid>
      <dc:creator>a508184</dc:creator>
      <dc:date>2024-06-30T20:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692049#M235591</link>
      <description>&lt;P&gt;From you query, it looks like you have already extracted&amp;nbsp;&lt;SPAN&gt;TRN, tomcatget, Queue,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TimeMQPut, Status&lt;/SPAN&gt;&lt;SPAN&gt;, and Priority; is this correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is tomcatput the same as TimeMQPut?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I assume a success is when Status is "Done" - what about non-successes, do you get a different value in Status?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 04:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692049#M235591</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-01T04:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692121#M235609</link>
      <description>&lt;P&gt;Yes&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&amp;nbsp;i have extracted all&amp;nbsp;&lt;SPAN&gt;TRN, tomcatget, Queue,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TimeMQPut, Status&lt;/SPAN&gt;&lt;SPAN&gt;, and Priority.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you're right tomcatput=TimeMQPut, ignore about the status am not using it for the response time calculation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Splunk query which i shared has response time.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval E2E_5min=if(tomcatGet2tomcatPut&amp;lt;=300,1,0)
| eval E2E_20min=if(tomcatGet2tomcatPut&amp;gt;300 and tomcatGet2tomcatPut&amp;lt;=1200,1,0)
| eval E2E_50min=if(tomcatGet2tomcatPut&amp;gt;1200 and tomcatGet2tomcatPut&amp;lt;=3000,1,0)
| eval E2EGT50min=if(tomcatGet2tomcatPut&amp;gt;3000,1,0)
| eval Total = E2E_5min + E2E_20min + E2E_50min + E2EGT50min
| stats sum(E2E_5min) as sum_5min sum(E2E_20min) as sum_20min sum(E2E_50min) as sum_50min sum(E2EGT50min) as sum_50GTmin sum(Total) as sum_total by Priority&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;This will give below output.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a508184_0-1719845835273.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31576iD0548B0D9DEFEE16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a508184_0-1719845835273.png" alt="a508184_0-1719845835273.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Now am creating a field called good and adding adding a condition.&lt;BR /&gt;If priority is High then it should be in sum_5min&lt;BR /&gt;if&amp;nbsp;priority is medium then it should be in sum_20min, so adding sum_5min + sum_20min&lt;BR /&gt;If priority is High then it should be in sum_50min, so adding sum_5min + sum_20min + sum_50min&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval good = if(Priority="High", sum_5min, if(Priority="Medium", sum_5min + sum_20min, if(Priority="Low", sum_5min+ sum_20min + sum_50min, null())))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;After getting the good field data, now am calculating percentage of success which display in a table format&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a508184_1-1719846201203.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31577i3A0D29C63A923966/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a508184_1-1719846201203.png" alt="a508184_1-1719846201203.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When i try a timechart it doesnt work as expected.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;timechart span=1d avg(per_cal) by Priority&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Gives me output no results found.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 16:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692121#M235609</guid>
      <dc:creator>a508184</dc:creator>
      <dc:date>2024-07-01T16:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need to display priority data for 7 days with the percentage, however am unable to display it in 7 days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692131#M235611</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try something like this (this assumes that you want daily results based on when the get was received, rather than the put, if this is different, change the bin command to use the other field)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex source=mysoruce earliest=-7d@d latest=@d
| eval PPut=strptime(tomcatput, "%y%m%d %H:%M:%S")
| eval PGet=strptime(tomcatget, "%y%m%d %H:%M:%S")
| stats min(PGet) as PGet, max(PPut) as PPut, values(Priority) as Priority by TRN
| eval tomcatGet2tomcatPut=round((PPut-PGet),0)
| eval E2E_5min=if(tomcatGet2tomcatPut&amp;lt;=300,1,0)
| eval E2E_20min=if(tomcatGet2tomcatPut&amp;gt;300 and tomcatGet2tomcatPut&amp;lt;=1200,1,0)
| eval E2E_50min=if(tomcatGet2tomcatPut&amp;gt;1200 and tomcatGet2tomcatPut&amp;lt;=3000,1,0)
| eval E2EGT50min=if(tomcatGet2tomcatPut&amp;gt;3000,1,0)
| eval Total = E2E_5min + E2E_20min + E2E_50min + E2EGT50min
| bin PGet as _time span=1d
| stats sum(E2E_5min) as sum_5min sum(E2E_20min) as sum_20min sum(E2E_50min) as sum_50min sum(E2EGT50min) as sum_50GTmin sum(Total) as sum_total by _time Priority
| eval good = if(Priority="High", sum_5min, if(Priority="Medium", sum_5min + sum_20min, if(Priority="Low", sum_5min+ sum_20min + sum_50min, null())))
| eval Per_cal=round(100*good/sum_total,1)
| xyseries _time Priority Per_cal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 15:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-to-display-priority-data-for-7-days-with-the-percentage/m-p/692131#M235611</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-01T15:50:40Z</dc:date>
    </item>
  </channel>
</rss>

