<?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 Query for multi time fields in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482831#M31644</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;We have three time fields&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Time - Indexed time( CSV file uploaded time)&lt;/LI&gt;
&lt;LI&gt;Last_uploaded - Microservices latest deployed time &lt;/LI&gt;
&lt;LI&gt;Running_since - Microservices start time&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;All time fields are in "%+" (Fri Apr 24 05:00:20 +08 2020) format and are in the same timezone&lt;/P&gt;

&lt;P&gt;Below fields are getting pushed to splunk through csv file &lt;/P&gt;

&lt;P&gt;Time,Org,Space,Microservices,State,Stack,Buildpacks,Last_uploaded,Total_instance,Running_instance,Instance_state,Running_since,Used_CPU,Used_memory_bytes,Total_memory_bytes,Used_disk_bytes,Total_disk_bytes&lt;/P&gt;

&lt;P&gt;Please help in how to create input panel for Last_uploaded, Running_since &amp;amp; what would be the query for the below requirement&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;How to query all  microservices deployed between particular dates example ( 14th April to 16th April )&lt;/LI&gt;
&lt;LI&gt;How many microservices were started between particular days example ( 17th April to 20th April )&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Tired few options but no luck luck&lt;/P&gt;

&lt;P&gt;| eval _time=strptime(Time,"%+") | eval Latest_deployment_time=strptime(Last_uploaded,"%+") |  eval Instance_start_time=strptime(Running_since,"%+")&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Thomas Mathias&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:08:24 GMT</pubDate>
    <dc:creator>thomas6m</dc:creator>
    <dc:date>2020-09-30T05:08:24Z</dc:date>
    <item>
      <title>Query for multi time fields</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482831#M31644</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;We have three time fields&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Time - Indexed time( CSV file uploaded time)&lt;/LI&gt;
&lt;LI&gt;Last_uploaded - Microservices latest deployed time &lt;/LI&gt;
&lt;LI&gt;Running_since - Microservices start time&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;All time fields are in "%+" (Fri Apr 24 05:00:20 +08 2020) format and are in the same timezone&lt;/P&gt;

&lt;P&gt;Below fields are getting pushed to splunk through csv file &lt;/P&gt;

&lt;P&gt;Time,Org,Space,Microservices,State,Stack,Buildpacks,Last_uploaded,Total_instance,Running_instance,Instance_state,Running_since,Used_CPU,Used_memory_bytes,Total_memory_bytes,Used_disk_bytes,Total_disk_bytes&lt;/P&gt;

&lt;P&gt;Please help in how to create input panel for Last_uploaded, Running_since &amp;amp; what would be the query for the below requirement&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;How to query all  microservices deployed between particular dates example ( 14th April to 16th April )&lt;/LI&gt;
&lt;LI&gt;How many microservices were started between particular days example ( 17th April to 20th April )&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Tired few options but no luck luck&lt;/P&gt;

&lt;P&gt;| eval _time=strptime(Time,"%+") | eval Latest_deployment_time=strptime(Last_uploaded,"%+") |  eval Instance_start_time=strptime(Running_since,"%+")&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Thomas Mathias&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482831#M31644</guid>
      <dc:creator>thomas6m</dc:creator>
      <dc:date>2020-09-30T05:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query for multi time fields</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482832#M31645</link>
      <description>&lt;OL&gt;
&lt;LI&gt;use &lt;CODE&gt;stats count&lt;/CODE&gt;  with &lt;EM&gt;time picker&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;use &lt;CODE&gt;timechart&lt;/CODE&gt;  with &lt;CODE&gt;rename Running_since as _time&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 24 Apr 2020 23:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482832#M31645</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-24T23:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Query for multi time fields</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482833#M31646</link>
      <description>&lt;P&gt;Thanks for your response. I am trying with single static table panel. Based on input panel selection, it should display the result. I will have the below input panels and they are interconnected. Based on user selection, it will display the result &lt;/P&gt;

&lt;P&gt;Time,Org,Space,Microservices,State,Buildpacks,Last_uploaded,Total_instance,Running_instance,Instance_state,Running_since&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482833#M31646</guid>
      <dc:creator>thomas6m</dc:creator>
      <dc:date>2020-09-30T05:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Query for multi time fields</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482834#M31647</link>
      <description>&lt;P&gt;What's your query?&lt;BR /&gt;
I can't make query with no log.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 00:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482834#M31647</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-25T00:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query for multi time fields</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482835#M31648</link>
      <description>&lt;P&gt;Basically, you need to turn those nasty time formats into internal formats, which if I've decoded this correctly will look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval time_Uploaded = strptime(Last_uploaded,"%a %b %d %H:%M:%S %:::z %Y")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then compare to your datestamps, which you will have calculated in your dash but I'll put in hard code here.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where time_Uploaded &amp;gt;= strptime("2020-04-14","%Y-%m-%d") 
    AND   time_Uploaded &amp;lt; strptime("2020-04-17","%Y-%m-%d") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since these aren't the event &lt;CODE&gt;_time&lt;/CODE&gt; or &lt;CODE&gt;_indextime&lt;/CODE&gt;, which splunk can search on using its special time references, it may be easier, dash-wise, to have a time picker kick off a null search that returns the start and end times you want in tokens, so you don't have to deal with "now" or "-1d" or any other funky time formats.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 18:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-for-multi-time-fields/m-p/482835#M31648</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-04-28T18:03:25Z</dc:date>
    </item>
  </channel>
</rss>

