The dashboards discussed here are classic dashboards created using the dashboarding functionality integrated with previous Dynatrace.
If you use Custom charts in your dashboards, you need to read the following text.
What:
If you depend on custom charts, you need to upgrade them now.
When you upgrade your custom charts to Data Explorer charts, you can edit your charts benefit from fixes and enhancements to Data Explorer features, and be ready to upgrade to the new platform.
When:
How:
You can upgrade tile by tile, dashboard by dashboard, or, using the API, all at once.
For details, see below.
This does not apply to visualizations and dashboards created using Data Explorer. This applies only to our old Custom charts functionality, which predated Data Explorer and is now fully deprecated.
To see if you have any old-style custom charts to upgrade, filter the Dashboards table by Custom charts: Yes
and see if any dashboards are listed.
Go to Dashboards or Dashboards Classic (latest Dynatrace).
optional To list only the dashboards that you own, add a filter for Ownership: Mine
.
If you want to check all dashboards to which you have access, regardless of ownership, skip this step.
Add a filter for Custom charts: Yes
.
Check the table
If no dashboards are listed after you filter by Custom charts: Yes
, you have nothing to upgrade. You can stop here.
If you don't filter by dashboard ownership, you may see some preset dashboards with owner Dynatrace
listed. You can ignore them.
If any other dashboards are listed, they should each display the Custom charts
label because you have set the Custom charts: Yes
filter in the previous step.
In the example below, you would have two dashboards to upgrade.
When you find a dashboard that has custom charts, open it and look for the following indicators that it has old-style custom charts that should be upgraded:
If a tile needs to be upgraded, it displays a warning icon and tooltip.
If the currently displayed dashboard still has at least one tile that needs to be upgraded, the dashboard menu in the upper-right corner of the dashboard has an Upgrade option.
Before you do anything else, we recommend that you make backups of your most important dashboards. Then try to upgrade the backups so you get comfortable with the upgrading process before upgrading all of your remaining dashboards.
For example, pick any popular dashboard in your environment that you depend on, maybe one that has several advanced and complex Custom chart tiles (multiple metrics are used, and there are configurations for a unit, rates, etc.), and clone it. Then you can safely work on the clone and check whether everything upgrades correctly.
You can upgrade:
In all cases, make backups before starting, and try it out first to familiarize yourself with the process.
In the web UI, you can upgrade one tile at a time or one dashboard at a time.
To upgrade a single tile
Go to Dashboards or Dashboards Classic (latest Dynatrace).
Display a dashboard that has a tile that needs to be upgraded.
In the tile's menu, select Preview upgraded chart. The converted chart opens in Data Explorer in a new browser tab, so you can compare the old charts with the new visualizations.
Inspect the visualization to verify that it converted properly. Make changes as needed.
When you are satisfied with the conversion, select Pin to dashboard and pin the upgraded visualization to another dashboard or the same dashboard.
You can run the following procedures with or without creating clones (backups).
To upgrade an entire dashboard (all tiles on the dashboard at once) without creating a clone (backup copy).
Go to Dashboards or Dashboards Classic (latest Dynatrace).
Find the dashboard in the table of dashboards.
In that dashboard's row, select > Upgrade. If no upgrade errors are encountered, the entire dashboard is upgraded.
To create a clone (backup copy) of the dashboard and then upgrade the entire cloned dashboard (all tiles on the dashboard at once)
Go to Dashboards or Dashboards Classic (latest Dynatrace).
Find the dashboard in the table of dashboards.
In that dashboard's row, select > Clone. This creates a clone (copy) of the dashboard and opens it in edit mode. The original dashboard remains unchanged.
Select Done to leave edit mode and display the clone.
In the upper-right corner of the dashboard, select > Upgrade.
Inspect the upgraded dashboard.
To compare two dashboards side by side
After you are satisfied with the upgraded dashboard, you can delete the original.
You can run this procedure with or without creating a backup (see step 3).
Go to Dashboards or Dashboards Classic (latest Dynatrace).
Select the dashboard name to display the dashboard.
recommended If you haven't already made a backup, you can do so now: in the upper-right corner of the dashboard, select > Clone to create and display a copy of the dashboard. When you clone the dashboard, the clone is displayed and the original dashboard remains unchanged.
In the upper-right corner of the dashboard, select > Upgrade.
When a dashboard upgrade is complete:
To check for more dashboards to upgrade
Custom charts: Yes
.Custom charts
label need to be upgraded.For details on identifying dashboards and charts that still need to be upgraded, see the Does this apply to me? section above.
Dynatrace version 1.251+
Using the Dynatrace API, you can upgrade one dashboard at a time or all dashboards at once. In any case, the API will always conveniently skip dashboards that don't have any Custom charts on them, which removes the need to first filter out dashboards without Custom charts.
To upgrade one dashboard via API, use the migrate endpoint.
https://{your-environment-id}/rest-api-doc/index.jsp?urls.primaryName=Configuration%20API#/Dashboards/migrateDashboard
Make sure to replace {your-environment-id}
with your actual environment ID.
To upgrade all dashboards via API
Use the GET endpoint to retrieve all dashboard IDs.
https://{your-environment-id}/rest-api-doc/index.jsp?urls.primaryName=Configuration%20API#/Dashboards/getDashboardStubsList
Make sure to replace {your-environment-id}
with your actual environment ID.
Loop over all IDs as described in Upgrade one dashboard above.
To get you started quickly, feel free to adapt and use the following example Node.js script. We used it to bulk update all dashboards of our own development environment.
Before using the script, make sure you update both lines marked with // TODO
with your own information:
{your-environment-id}
with your actual environment ID.{your-api-token}
with a valid API token with the proper scope.import fs from "fs";import fetch from "node-fetch";async function migrateAllDashboards() {// create a backup directoryif (!fs.existsSync("./BACKUPS")) {fs.mkdirSync("./BACKUPS");}export const ENV_URL = "{your-environment-id}"; // TODO replace thisexport const AUTH_HEADERS = {Authorization: `Api-token {your-api-token}`, // TODO replace this};const dirName = `./BACKUPS/${new URL(ENV_URL).hostname.replace(".","_")}-${Date.now()}`;fs.mkdirSync(dirName);console.log("Fetching all the dashboards");const fetchAllUrl = `${ENV_URL}/api/config/v1/dashboards`;const response = await fetch(fetchAllUrl, { headers: AUTH_HEADERS });const dashboardsMetadata = await response.json();fs.writeFileSync(`${dirName}/_ALL_DASHBOARDS_METADATA.json`,JSON.stringify(dashboardsMetadata));const allDashboards = dashboardsMetadata.dashboards;console.log(`Saved the metadata of ${allDashboards.length} dashboards`);for (let index = 0; index < allDashboards.length; index++) {const db = allDashboards[index];const dbId = db.id;const fetchDB = `${ENV_URL}/api/config/v1/dashboards/${dbId}`;const response = await fetch(fetchDB, { headers: AUTH_HEADERS });const dbContent = await response.json();// save dashboard content to backup directoryfs.writeFileSync(`${dirName}/${dbId}.json`, JSON.stringify(dbContent));try {// attempt migrationconst migrateResponse = await fetch(`${ENV_URL}/api/config/v1/dashboards/${dbId}/migrate`,{method: "PUT",headers: {"Content-Type": "application/json",...AUTH_HEADERS,},body: dbId,});if (migrateResponse.status === 200) {if (migrateResponse.errors) {console.log(`X ${dbId} updated failed!);console.error(migrateResponse.errors);}} else {console.error(`X ${dbId} update failed!`);console.error(migrateResponse);}} catch (error) {console.error(`X ${dbId} update failed!`);console.error(updateResponse);}}}console.log("### Backup and Migrate\n");await migrateAllDashboards();console.log(`### Migration completed\n\n`);
To check for more dashboards to upgrade
Custom charts: Yes
.Custom charts
label still need to be upgraded.For details on identifying dashboards and charts that still need to be upgraded, see the Does this apply to me? section above.
Depending on the complexity of the tiles involved, a dashboard upgrade could fail partially (some tiles on the dashboard upgrade successfully and others don't) or completely (no tiles on the dashboard upgrade successfully).
In any case, don't worry about losing data. Dashboards and tiles are visualizations of your data, not the data itself. Your data is never at risk during an upgrade.
There's an ongoing Dynatrace Community thread you are welcome to participate in.
To start a conversation with a Dynatrace product expert, use live chat within your Dynatrace environment.