27 Sep 2024 06:58 AM - last edited on 27 Sep 2024 08:03 AM by MaciejNeumann
Hello All,
I want to restrict my output to last 7 days everytime the dashboard refreshes. I have a tile which bring me all the failed job list. I want to restrict it programatically to get only last 7 days. My tile code looks like this.
cloud.aws.amazonmwaa.dagDurationFailedByAccountIdDAGEnvironmentRegion:filter(eq("environment","sandbox-test"))
I tried adding filter at the end of it, but it doesn't accept. Also the fetch command doesn't seem to work on this as well.
I'm pretty new to this, so this could be a very basic question.
Solved! Go to Solution.
27 Sep 2024 07:06 AM
Have you tried the below?
https://docs.dynatrace.com/docs/shortlink/dql-use-queries#specifytimeframe
29 Sep 2024 10:01 PM
Hi @p_devulapalli ,
I tried all these possible options, but the issue seems to be that I can't combine fetch command with my command. I thought it would have easier to implement. "cloud.aws.amazonmwaa.dagDurationFailedByAccountIdDAGEnvironmentRegion:filter(eq("environment","sandbox-test"))"
30 Sep 2024 05:23 AM
Hi @sandytheSeeker , from the screenshot you seem to be running the query in Data explorer , if you are after DQL queries you need to use something like Notebooks
https://docs.dynatrace.com/docs/observe-and-explore/dashboards-and-notebooks/notebooks
https://www.youtube.com/watch?v=RAtId3P8C6I
30 Sep 2024 05:55 AM
Hey Sandy,
As p_devulapalli mentioned it looks like you're trying to use our new query language on classic dashboards which unfortunately is not supported. If you are using Dynatrace SaaS you could try the new dashboards app. Within the new dashboards app you will be able to query logs, metrics, events and other data using DQL allowing for things such as the fetch command.
On new dashboards to set a timeframe on a specific tile edit the tile and custom timeframes can be found under the query or you can set it in the query as well:
For dashboard wide defaults you can set it in the dashboard settings by selecting the settings cog to the right of the timeframe selector:
Alternatively on old dashboards you can set the default timeframe for a dashboard or a specific tile. For the whole dashboard edit the dashboard and then instead of the tiles tab, select the settings tab on the right as seen below:
For a specific tile select the tile and edit it and then you can find it on the right as seen below:
Hope the above helps!
30 Sep 2024 09:48 PM
Thanks @Fin_Ubels & @p_devulapalli for your prompt responses.
I have found above useful and didn't know if we have that timeframe configure option at edit tile level. I was trying to implement it at metric logic level.
Thanks again.