Timeframes for tiles
The timeframe of a tile defines the period of time data is returned for, for example "show me data for the last 24 hours".
There are two aspects that influence the timeframe of a tile:
The timeframe configuration in the tile.
How is the timeframe in tiles configured?How a tile's timeframe is configured depends on the type of tile:
Some tiles, like the Azure Log Analytics tile, have a panel in the tile's configuration where you can set the timeframe. How the timeframe is configured is described in the individual tile's article.
Other tiles, like the Splunk tile, don't have a dedicated timeframe panel but you can specify a timeframe in the query or script the tile uses to return data. How to use timeframe in the tile's query or script is described in the individual tile's article.
Other tiles, like the Image tile, don't use any timeframe since the data for those tiles doesn't need a timeframe.
The current page timeframe of the dashboard
or perspective you are looking at. This only affects tiles that use the page timeframe in their configuration.What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.
Fixed and dynamic timeframes for tiles
You have two different options for configuring the timeframe in a tile:
Set the tile to use a fixed timeframe.
A fixed timeframe is set in the tile configuration panel, query or script and can't be changed by users.
Set the tile to use the dynamic page timeframe.
The dynamic page timeframe
The page timeframe is the timeframe setting a dashboard
Default page timeframe
The default page timeframe affects two areas:
Within Dashboard Server, it decides which timeframe a dashboard
or perspective uses when a user goes to the dashboardor perspective . Tiles that use the page timeframe according to their settings (not a fixed, specific timeframe) will use the default page timeframe every time the dashboard or perspective is opened. Users can change the page timeframe temporarily while they are on the dashboardor perspective , but their setting will only last until they leave the page. Their setting will only affect their view of the dashboardor perspective , not other users' views.On Open Access dashboards, tiles that use the page timeframe according to their settings always use the default page timeframe.
Settings for the default page timeframe
Since Dashboard Server 5.3 you can change the default page timeframe for dashboards. Changing the default page timeframe of a dashboard will affect this individual dashboard and it's Open Access representation.
Note: The system-wide default page timeframe is "last 12 hours" for any Dashboard Server installation, but you can change this setting since Dashboard Server 5.3. This will affect all dashboards (including Open Access dashboards) that don't have an individual default page timeframe setting.
Note: If you are sharing the dashboard
Note: You can't change the individual default page timeframe of a perspective.
Go to the dashboard
or pinned perspective you want to change the individual default page timeframe for.On the dashboard, click the edit button
Click the settings button.
Choose the new default timeframe under Default timeframe.
Click on the publish button to make the changes go live.
The dashboard will now by default use the page timeframe you chose. Users can still temporary change the page timeframe while looking at the dashboard.
Tip: If you want to undo the individual page timeframe setting to let the dashboard use the system-wide default timeframe again, you need to switch to the JSON view of the dashboard and delete the parameter that defines the dashboard's page
timeframe
(for example "timeframe": "last7days
").
Note: This setting affects all dashboards
On the SquaredUp server, run Notepad as administrator (Start, Run, type
notepad
, and then right-click and select Run as administrator).In your Dashboard Server folder, go to
\User\Configuration
and find theextensionpacks.json
file.Where to find the Dashboard Server folderName of the Dashboard Server folder
The name of the Dashboard Server folder is
SquaredUpv
followed by theproduct version number
.Location of the Dashboard Server folder
If you deployed Dashboard Server via the Azure Marketplace :The default location for the Dashboard Server folder is
F:\
.SquaredUpv[Version Number]
For example, for Dashboard Server Azure Edition v5 the default location isF:\SquaredUpv5
and for v4 .F:\SquaredUpv4
If you installed Dashboard Server using the installer:
The default location for the Dashboard Server folder is
C:\inetpub\wwwroot\SquaredUpv[Version Number]
, but a custom location may have been chosen during the installation.
For example, for Dashboard Server v5 the default folder location isC:\inetpub\wwwroot\SquaredUpv5
and for v4 C:\inetpub\wwwroot\SquaredUpv4
Open the
extensionpacks.json
file and add the propertydefault-timeframe
with the value for your new default page timeframe for all your dashboards and perspectives.Example for a default timeframe of 24 hours:
Copy{
"default-timeframe": "last24hours"
}Possible values for the
default-timeframe
property:last1hour
,last12hours
,last24hours
,last7days
,last30days
,last3months
,all
Save the json file.
Recycle the Dashboard Server application pool.
Variables for timeframes
Whenever you can insert timeframe variables in a query, script or field, you'll see a mustache picker that lets you choose different variables.
Dynamic page timeframe formats
When you use page timeframe variables, the dynamic page timeframe will be inserted as a string
in your search query, script, field, or wherever you use the variable.
timeframe.isoDuration | Use this format when you want to insert the page timeframe according to the ISO standard for time ranges (period of time). Example: When them page timeframe is set to "last 12 hours" the string |
timeframe.isoStart | Use this format to insert a "from" time when you want the starting point to be "now minus page timeframe". The page timeframe will be inserted as a starting time according to the ISO 8601 standard. Example: When the page timeframe is set to "last 12 hours" the starting time is "now minus 12 hours". |
timeframe.isoEnd | Use this format to insert a "to" time when you need to specify the end time. The end time is always "now". The current time will be inserted according to the ISO 8601 standard. |
timeframe.unixStart | Use this format to insert a "from" time when you want the starting point to be "now minus page timeframe". The page timeframe will be inserted as a starting time in milliseconds according to the UNIX standard. Example: When the page timeframe is set to "last 12 hours", the starting time is "now minus 12 hours". |
timeframe.unixEnd | Use this format to insert a "to" time when you need to specify the end time. The end time is always "now". The current time will be inserted in milliseconds according to the Unix standard. |
Math.floor(timeframe.UnixStart / 1000) | Use this format when you want to use the |
Math.floor(timeframe.UnixEnd / 1000) | Use this format when you want to use the unixEnd time but need to convert it from milliseconds to seconds. |
Fixed timeframe formats (without using the dynamic page timeframe)
Date.now() - 86400 * 1000 *14 | This is a template format to express the fixed timeframe "14 days ago" (now minus 14 days in milliseconds). You can use this template to create your own fixed timeframe. How to read the parameters of the template:
If you want to use a fixed timeframe in seconds, you need to convert the Date.now() into seconds, for example "4 days ago in seconds": |
new Date().toISOString() | A text based representation of "now". Use this format if you want to insert the date as a string in ISO 8601 format, rather than leaving it as a date object. |