Hi,
So I've created a drop down for start date and end date which is receiving dates from the "_time" variable from a query I'm running. Now, the _time variable holds date in the following format for instance: 30/10/2017 00:30:00. I want to be able to manipulate my graph so that whatever date is selected, the graph is updated to represent the data from a specified time period.
The issue is, the drop down panel represents the dates as 30/10/2017, the time element is missing. When passing a token containing the date to the earliest field, i get an error message saying the value passed isnt acceptable:
//Code for drop down and populating it with dates.
<input type="dropdown" token="source_tok" searchWhenChanged="true">
<label>Select Start Date</label>
<choice value=""></choice>
<default>Start Date</default>
<populatingSearch fieldForLabel="Date" fieldForValue="Date">index="test" | stats count by Date</populatingSearch>
</input>
//This is the search query, wherein the output (date) is being passed into the dropdown panel:
source=xxx host=xxx " index="test" sourcetype="csv" earliest=-1d@d latest=-0d@d | eval ReportKey="Yesterday" | append [search index="test" sourcetype="csv" earliest=$source_tok$ latest=$End_Date$ | eval ReportKey="Last Week"]|timechart span= avg("CPU") by ReportKey
Im passing my token to the "earliest" field so that data shown in that time period is shown, for
What could be the solution? I tried to create my own timestamp variable which would include the time, but its not showing up on the dropdown section.
Here's what I done:
eval newTime = strftime(Date, "%m-%d-%Y:%H:%M:%S")
But I'm not sure how to use the newTime variable
... View more