Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the time range of my aws cloudwatch dashboard permanently?

I want to set the time range of my dashboard permanently to 1 day. Unfortunately it will jump back to 3 hours when doing a browser refresh. Also each dashboard should have its own time range. So for example dashboard 1 should have 1 day time range and dashboard 2 should have 1 month time range by default. How can I achieve that?

Time range selection

like image 373
skymedium Avatar asked Apr 10 '19 11:04

skymedium


People also ask

How do I change my AWS time zone?

On the AWS Elemental Server web interface, go to the Settings page and choose General. In Timezone, choose your required time zone. Choose Update.

How do I change timezone in CloudWatch?

Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ . In the navigation pane, choose Dashboards, and then choose a dashboard. In the upper-right corner of the dashboard screen, choose Custom. In the upper-right corner of the box that appears, select UTC or Local time from the dropdown.

What is the default CloudWatch metrics interval?

By default, metrics are stored at one-minute resolution in CloudWatch.


1 Answers

Set the dashboard range to what you want, then click Actions -> Set default time range. In the popup, select the first option: Always load this dashboard using the current time range setting. Save the dashboard after that.

If you want to do it through code or CloudFormation, set the start parameter in the dashboard source. Like this:

{
  "start": "-P1D",
  "widgets": [
   ...
   ]
}
like image 197
Dejan Peretin Avatar answered Oct 08 '22 10:10

Dejan Peretin