<?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 can i set different timeline for my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342009#M101337</link>
    <description>&lt;P&gt;What's the full search that you used, which includes your all time subsearch? You should be using &lt;CODE&gt;earliest=0&lt;/CODE&gt; in the subsearch to override the timerange just for that subsearch.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2017 17:00:09 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-12-15T17:00:09Z</dc:date>
    <item>
      <title>How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342008#M101336</link>
      <description>&lt;P&gt;I have the following search:&lt;/P&gt;

&lt;P&gt;index="monthlycdr"  "Call Duration"=* Name=\"***\" |  eval "Call Duration"=replace('Call Duration',"\"","") | convert dur2sec("Call Duration") as "CDinsec" |  eval "Name"=replace('Name',"\"","")&lt;BR /&gt;&lt;BR /&gt;
| eval "transporttype"=replace('Transport Type',"\"","")  | eval "Voice_count"=case( match(transporttype, "(?i)voice") OR match(transporttype, "(?i)pstn"), CDinsec) &lt;BR /&gt;
|  eval "Video_count" =case(match(transporttype, "^(?i)h323$") OR match(transporttype, "^(?i)sip$"),CDinsec) &lt;BR /&gt;
| stats avg("Voice_count") as Avg_Voice, avg("Video_count") as Avg_Video by Name&lt;/P&gt;

&lt;P&gt;Which only bring up the name of my units within the time frame that I set. But I want to also view other units that haven't been use in the selected time frame. These units would exit in all time. How can I join them in my search? When I do a subsearch for all time, it only displays the name of units within the general time frame that I select. I want to bring up the name of those units that haven't been use as well.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342008#M101336</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2020-09-29T17:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342009#M101337</link>
      <description>&lt;P&gt;What's the full search that you used, which includes your all time subsearch? You should be using &lt;CODE&gt;earliest=0&lt;/CODE&gt; in the subsearch to override the timerange just for that subsearch.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 17:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342009#M101337</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-15T17:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342010#M101338</link>
      <description>&lt;P&gt;this is my full search which it only gives me the same result if I run the above search. &lt;/P&gt;

&lt;P&gt;index="monthlycdr" "Call Duration"= Name=\"**\" | eval "Call Duration"=replace('Call Duration',"\"","") | convert dur2sec("Call Duration") as "CDinsec" | eval "Name"=replace('Name',"\"","") &lt;BR /&gt;
| eval "transporttype"=replace('Transport Type',"\"","") | eval "Voice_count"=case( match(transporttype, "(?i)voice") OR match(transporttype, "(?i)pstn"), CDinsec) &lt;BR /&gt;
| eval "Video_count" =case(match(transporttype, "^(?i)h323$") OR match(transporttype, "^(?i)sip$"),CDinsec) &lt;BR /&gt;
| stats avg("Voice_count") as Avg_Voice, avg("Video_count") as Avg_Video by Name&lt;BR /&gt;
| join Name &lt;BR /&gt;
    [search index=monthlycdr earliest=0 &lt;BR /&gt;
    | eval "Name"=replace('Name',"\"","") &lt;BR /&gt;
    | table Name]&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:15:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342010#M101338</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2020-09-29T17:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342011#M101339</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="monthlycdr" "Call Duration"= Name=\"**\" | eval "Call Duration"=replace('Call Duration',"\"","") | convert dur2sec("Call Duration") as "CDinsec" | eval "Name"=replace('Name',"\"","") 
| eval "transporttype"=replace('Transport Type',"\"","") | eval "Voice_count"=case( match(transporttype, "(?i)voice") OR match(transporttype, "(?i)pstn"), CDinsec) 
| eval "Video_count" =case(match(transporttype, "^(?i)h323$") OR match(transporttype, "^(?i)sip$"),CDinsec) 
| stats avg("Voice_count") as Avg_Voice, avg("Video_count") as Avg_Video by Name
| append [search index=monthlycdr earliest=0 | eval "Name"=replace('Name',"\"","") | stats count by Name | table Name]
| stats values(*) as * by Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Dec 2017 17:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342011#M101339</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-15T17:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342012#M101340</link>
      <description>&lt;P&gt;@someoni2,&lt;BR /&gt;
Thanks for the answer. It worked but when I throw the rest of the search with it, I have error like expected AND.  Here is the search:&lt;/P&gt;

&lt;P&gt;index="monthlycdr"  $result0sec$ $result$ |  eval "Call Duration"=replace('Call Duration',"\"","") | convert dur2sec("Call Duration") as "CDinsec" |  eval "Name"=replace('Name',"\"","") &lt;BR /&gt;
| eval "Name" = upper(Name)&lt;BR /&gt;
| eval "transporttype"=replace('Transport Type',"\"","")  | eval "Voice_count"=case( match(transporttype, "(?i)voice") OR match(transporttype, "(?i)pstn"), CDinsec) &lt;BR /&gt;
|  eval "Video_count" =case(match(transporttype, "^(?i)h323$$") OR match(transporttype, "^(?i)sip$$"),CDinsec) &lt;BR /&gt;
| stats avg("Voice_count") as Avg_Voice, avg("Video_count") as Avg_Video, sum("Voice_count") as Sum_Voice, sum("Video_count") as Sum_Video by Name&lt;BR /&gt;
|  eval "Avg_Voice"=tostring($$Avg_Voice$$,"duration") |  eval Avg_Voice=if(isnull(Avg_Voice), "00:00:00", replace(Avg_Voice,"(\d+):(\d+):(\d+).(\d+)","\1:\2:\3"))&lt;BR /&gt;
|  eval "Avg_Video"=tostring($$Avg_Video$$,"duration") |  eval Avg_Video=if(isnull(Avg_Video), "00:00:00", replace(Avg_Video,"(\d+):(\d+):(\d+).(\d+)","\1:\2:\3"))&lt;BR /&gt;
|  eval "Sum_Voice"=tostring($$Sum_Voice$$,"duration") |  eval Sum_Voice=if(isnull(Sum_Voice), "00:00:00", replace(Sum_Voice,"(\d*)+&lt;EM&gt;(\d+):(\d+):(\d+)","\1D \2:\3:\4"))&lt;BR /&gt;
|  eval "Sum_Video"=tostring($$Sum_Video$$,"duration") |  eval Sum_Video=if(isnull(Sum_Video), "00:00:00", replace(Sum_Video,"(\d&lt;/EM&gt;)+&lt;EM&gt;(\d+):(\d+):(\d+)","\1D \2:\3:\4")) &lt;BR /&gt;
| append [search index=monthlycdr earliest=0 | eval "Name"=replace('Name',"\"","") | stats count by Name | table Name]&lt;BR /&gt;
 | stats values(&lt;/EM&gt;) as * by Name&lt;/P&gt;

&lt;P&gt;For simplicity, I left out the eval portion but I didn't know it would create problem. Sorry!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:15:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342012#M101340</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2020-09-29T17:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342013#M101341</link>
      <description>&lt;P&gt;please ignore $result0sec$ $result$. I left them out in the search&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 17:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342013#M101341</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2017-12-15T17:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342014#M101342</link>
      <description>&lt;P&gt;Does it work find without the subsearch?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 18:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342014#M101342</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-15T18:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342015#M101343</link>
      <description>&lt;P&gt;yes, it works before the subsearch!&lt;BR /&gt;
It also works with the subsearch if I delete all of the eval expression from the search.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 19:13:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342015#M101343</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2017-12-15T19:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342016#M101344</link>
      <description>&lt;P&gt;In the last stats command, are you missing a asterisk in values function?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 19:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342016#M101344</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-15T19:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set different timeline for my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342017#M101345</link>
      <description>&lt;P&gt;I just rerun it with the asterisk in values function but have the same result. Thanks again for helping me!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 22:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-set-different-timeline-for-my-search/m-p/342017#M101345</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2017-12-15T22:09:24Z</dc:date>
    </item>
  </channel>
</rss>

