<?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 Creating a base search for dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547436#M37643</link>
    <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to create a basesearch for my dashboard. I have included all the fields that both queries have in common, labeled the first basesearch as id and the second as a base. I keep getting a "Error in 'eval' command: Failed to parse the provided arguments. Usage: eval dest_key=expression". I also have a question on the tokens are they only supposed to be on the first query under id basesearch?&amp;nbsp; What is wrong here with my basesearches here? thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;

  &amp;lt;label&amp;gt;Cloned Dashboard &amp;lt;/label&amp;gt;

  &amp;lt;search id="basesearch"&amp;gt; &amp;lt;----(This is the start of my base search)

    &amp;lt;query&amp;gt;

      (index=dmx_rapper.xmn  $tok_eco_alias$  (team=dev staging="Test" )    OR ( team=Pro  ))

 

| eval HRofstage=case(stage="SentStatus", HRStamp),

| eval ProPriority=case(team="Pro", lookupService),

sentToProHR=case(Type="sentToPro", HRLogged)

 

| stats earliest(sentToProHR) as sentToProHR latest(HRofstage) as HRofstage values(Duration) as Duration values(lookupService) as lookupService  dc(Identifier) as TotalDocs values(Total) as Total values(ProPriority) as Pro_Priority by Identifier

 

| where Pro_Priority="$tok_rate$"

 

| eval startTime = strptime(sentToProHR,"%Y-%m-%d %H:%M:%S.%q"), endTime=strptime(HRofstage,"%Y-%m-%d %H:%M:%S.%6N")

| where isNotNull(sentToProHR)  AND isNotNull(HRofstage)

| eval Duration = ((endTime-startTime)/60) 

| eval ServiceValue=case(lookupService="Low", 3600, lookupService="Medium", 2880,  lookupService="High", 1440)

 

    &amp;lt;/query&amp;gt;

    &amp;lt;earliest&amp;gt;$time_range.earliest$&amp;lt;/earliest&amp;gt;

    &amp;lt;latest&amp;gt;$time_range.latest$&amp;lt;/latest&amp;gt;

   

     &amp;lt;title&amp;gt;Service Value Success Count and Percentage &amp;lt;/title&amp;gt;

        &amp;lt;search base="basesearch"&amp;gt; &amp;lt;----(2nd query for baseserach)

          &amp;lt;query&amp;gt; search | eval ServiceValue=if(Duration&amp;amp;lt;=ServiceValue, "Success", "Failure")

         

| eval Total=case(ServiceValue="Success", Identifier)

 

| stats  dc(Total) as ServiceValue dc(Identifier) as Totals_Received

| eval Percentage=round((ServiceValue/Total_Received)*100)

| eval ServiceValue=tostring(ServiceValue,"commas") . " (" .Percentage."%" . ")"

| table ServiceValue

&amp;lt;/query&amp;gt;

        

        &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 20:34:09 GMT</pubDate>
    <dc:creator>MeMilo09</dc:creator>
    <dc:date>2021-04-09T20:34:09Z</dc:date>
    <item>
      <title>Creating a base search for dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547436#M37643</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to create a basesearch for my dashboard. I have included all the fields that both queries have in common, labeled the first basesearch as id and the second as a base. I keep getting a "Error in 'eval' command: Failed to parse the provided arguments. Usage: eval dest_key=expression". I also have a question on the tokens are they only supposed to be on the first query under id basesearch?&amp;nbsp; What is wrong here with my basesearches here? thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;

  &amp;lt;label&amp;gt;Cloned Dashboard &amp;lt;/label&amp;gt;

  &amp;lt;search id="basesearch"&amp;gt; &amp;lt;----(This is the start of my base search)

    &amp;lt;query&amp;gt;

      (index=dmx_rapper.xmn  $tok_eco_alias$  (team=dev staging="Test" )    OR ( team=Pro  ))

 

| eval HRofstage=case(stage="SentStatus", HRStamp),

| eval ProPriority=case(team="Pro", lookupService),

sentToProHR=case(Type="sentToPro", HRLogged)

 

| stats earliest(sentToProHR) as sentToProHR latest(HRofstage) as HRofstage values(Duration) as Duration values(lookupService) as lookupService  dc(Identifier) as TotalDocs values(Total) as Total values(ProPriority) as Pro_Priority by Identifier

 

| where Pro_Priority="$tok_rate$"

 

| eval startTime = strptime(sentToProHR,"%Y-%m-%d %H:%M:%S.%q"), endTime=strptime(HRofstage,"%Y-%m-%d %H:%M:%S.%6N")

| where isNotNull(sentToProHR)  AND isNotNull(HRofstage)

| eval Duration = ((endTime-startTime)/60) 

| eval ServiceValue=case(lookupService="Low", 3600, lookupService="Medium", 2880,  lookupService="High", 1440)

 

    &amp;lt;/query&amp;gt;

    &amp;lt;earliest&amp;gt;$time_range.earliest$&amp;lt;/earliest&amp;gt;

    &amp;lt;latest&amp;gt;$time_range.latest$&amp;lt;/latest&amp;gt;

   

     &amp;lt;title&amp;gt;Service Value Success Count and Percentage &amp;lt;/title&amp;gt;

        &amp;lt;search base="basesearch"&amp;gt; &amp;lt;----(2nd query for baseserach)

          &amp;lt;query&amp;gt; search | eval ServiceValue=if(Duration&amp;amp;lt;=ServiceValue, "Success", "Failure")

         

| eval Total=case(ServiceValue="Success", Identifier)

 

| stats  dc(Total) as ServiceValue dc(Identifier) as Totals_Received

| eval Percentage=round((ServiceValue/Total_Received)*100)

| eval ServiceValue=tostring(ServiceValue,"commas") . " (" .Percentage."%" . ")"

| table ServiceValue

&amp;lt;/query&amp;gt;

        

        &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 20:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547436#M37643</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-04-09T20:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a base search for dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547440#M37645</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233122"&gt;@MeMilo09&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;about the first problem there's a comma at the end of an eval command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval HRofstage=case(stage="SentStatus", HRStamp),&lt;/LI-CODE&gt;&lt;P&gt;About the second question, you can put the token in the part of search where you need to insert, it's better in the main search so you have less results.&lt;/P&gt;&lt;P&gt;In addition it isn't correct to have in the secondary search&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;query&amp;gt; search | eval ...&lt;/LI-CODE&gt;&lt;P&gt;you cannot have search without arguments.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 20:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547440#M37645</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-04-09T20:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a base search for dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547719#M37671</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233122"&gt;@MeMilo09&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you and see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 06:41:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-a-base-search-for-dashboard/m-p/547719#M37671</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-04-13T06:41:00Z</dc:date>
    </item>
  </channel>
</rss>

