Last active
November 17, 2022 08:26
-
-
Save louisleungk/0161eb4cb52fae4aabc7e5ce403698d7 to your computer and use it in GitHub Desktop.
New Relic Chart Customizations Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Dashboard Customization Template (DataByte)", | |
"description": null, | |
"permissions": "PUBLIC_READ_WRITE", | |
"pages": [ | |
{ | |
"name": "Sample Charts", | |
"description": null, | |
"widgets": [ | |
{ | |
"title": "", | |
"layout": { | |
"column": 1, | |
"row": 1, | |
"width": 2, | |
"height": 2 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "![New Relic logo](https://newrelic.com/sites/default/files/2022-05/MediaAsset_Tiles_RGB_POS_VERT.svg \"new relic logo\")\n" | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 3, | |
"row": 1, | |
"width": 5, | |
"height": 2 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "# Chart Customization Samples\n---\n#### Explore new features to enhance your visualizations!\nCustomization options explained in this dashboard template:\n- Color per series\n- Null Value customization\n- Units\n- Ignore time picker" | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 8, | |
"row": 1, | |
"width": 5, | |
"height": 2 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "## How to use this dashboard\n1) Ensure you have application data in your account. If you haven’t done this before, go to **[Add data](https://one.newrelic.com/marketplace)** and select **guided install**, or choose an **application monitoring data source** and follow the installation instructions.\n2) Edit the charts below to explore the settings.\n3) For a guided walkthrough, read this [blog post](https://newrelic.com/blog/how-to-relic/dashboard-chart-customizations)" | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 1, | |
"row": 3, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "## 🌈 🎨 Custom Colors for Dedicated Facet or Values →\n---\nIf you like to have fixed colors for certain values you can select a color for dedicated values. \nIn this example, the chart on the left has custom colors.\n`httpResponseCode` between `400` and `500` are yellow, and `httpResponseCode`>=`500` are red.\n\n**To customize series colors in a chart:** \n1. Edit the widget using the options button.\n2. Open the Colors menu in the chart settings.\n4. Select the series you want to change the color. Use the + icon to edit a new series.\n5. Select the desired color. You can select colors graphically, or enter a custom RGB, HEX, or HSL code.\n\n> **Note**: You can use dedicated facets or self defined names in facet cases queries" | |
} | |
}, | |
{ | |
"title": "Response Code (Custom Colors)", | |
"layout": { | |
"column": 5, | |
"row": 3, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.stacked-bar" | |
}, | |
"rawConfiguration": { | |
"colors": { | |
"seriesOverrides": [ | |
{ | |
"color": "#329a3e", | |
"seriesName": "Good Responses" | |
}, | |
{ | |
"color": "#ebe52d", | |
"seriesName": "Errors as Function" | |
}, | |
{ | |
"color": "#c04d30", | |
"seriesName": "Server Errors" | |
} | |
] | |
}, | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select count(*) facet cases (where httpResponseCode >= '400' and httpResponseCode < '500' as 'Errors as Function', where httpResponseCode >= '500' as 'Server Errors') timeseries since 1 hour ago" | |
} | |
], | |
"platformOptions": { | |
"ignoreTimeRange": false | |
} | |
} | |
}, | |
{ | |
"title": "Response Code (No Custom Colors)", | |
"layout": { | |
"column": 9, | |
"row": 3, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.stacked-bar" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select count(*) facet cases (where httpResponseCode >= '400' and httpResponseCode < '500' as 'Errors as Function', where httpResponseCode >= '500' as 'Server Errors') timeseries since 1 hour ago" | |
} | |
], | |
"platformOptions": { | |
"ignoreTimeRange": false | |
} | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 1, | |
"row": 6, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "## 0️⃣❓ Null Value Customization →\n---\nSometimes line charts or area charts can look broken when there is a zero in the event attribute you are querying. However, a null value might not represent the situation correctly, so now you have various options for displaying them.\n\n**Options for handling null values include:**\n1. **Leave as null (default)**: Null values show as gaps in the chart, which can result in disconnected lines\n2. **Remove the value**: Null points won’t exist in the chart. For example, a chart that displays a data point per hour in a day would show fewer than 24 points. \n3. **Preserve the last value**: Null values will keep the value from the previous period. For example: if a chart reports cumulative sales each hour, but is missing an hour’s data, the missing hour would reflect the same number of sales as the previous hour.\n4. **Transform the value to 0**: The missing data shows up as a zero.\n\n> **Note:** This example uses an event that happens rarely, so you might have to use the time picker to see null values. \n\nTo customize null values, edit the chart and open the Null values menu." | |
} | |
}, | |
{ | |
"title": "Leave as Null (Default)", | |
"layout": { | |
"column": 5, | |
"row": 6, | |
"width": 2, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select max(duration) where httpResponseCode ='504' timeseries since 5 minutes ago" | |
} | |
], | |
"nullValues": { | |
"nullValue": "default" | |
}, | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "Remove Null Values", | |
"layout": { | |
"column": 7, | |
"row": 6, | |
"width": 2, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select max(duration) where httpResponseCode ='504' timeseries since 5 minutes ago" | |
} | |
], | |
"nullValues": { | |
"nullValue": "remove" | |
}, | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "Preserve Last Value on Null", | |
"layout": { | |
"column": 9, | |
"row": 6, | |
"width": 2, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select max(duration) where httpResponseCode ='504' timeseries since 5 minutes ago" | |
} | |
], | |
"nullValues": { | |
"nullValue": "preserve" | |
}, | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "Transform Null to Zero", | |
"layout": { | |
"column": 11, | |
"row": 6, | |
"width": 2, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction select max(duration) where httpResponseCode ='504' timeseries since 5 minutes ago" | |
} | |
], | |
"nullValues": { | |
"nullValue": "zero" | |
}, | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 1, | |
"row": 9, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "## 📏 ⚖ Units Customization️ →\n---\nTo provide more clarity on your charts, you can now customize the unit on your Y axis and in each of your series. \n\n**To customize the unit on your Y axis:** \n1. Edit the chart and run a query.\n2. Open the units menu in the customizations UI.\n3. Select the unit that you’d like to use. This will be shown in the Y axis.\n\n> **Note**: Optionally, you can use the + icon to add customization per series. Select the series that needs a custom unit, and assign one with the dropdown. These units will be shown when you hover over the values in the chart." | |
} | |
}, | |
{ | |
"title": "95th Percentile Duration (ms)", | |
"layout": { | |
"column": 5, | |
"row": 9, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"colors": { | |
"seriesOverrides": [ | |
{ | |
"color": "#4782e1", | |
"seriesName": "Duration (95%)" | |
} | |
] | |
}, | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction SELECT percentile(duration,95) TIMESERIES max" | |
} | |
], | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"units": { | |
"unit": "MS" | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "95th Percentile Duration (seconds)", | |
"layout": { | |
"column": 9, | |
"row": 9, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.line" | |
}, | |
"rawConfiguration": { | |
"colors": { | |
"seriesOverrides": [ | |
{ | |
"color": "#4782e1", | |
"seriesName": "Duration (95%)" | |
} | |
] | |
}, | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction SELECT percentile(duration,95) TIMESERIES max" | |
} | |
], | |
"platformOptions": { | |
"ignoreTimeRange": false | |
}, | |
"units": { | |
"unit": "SECONDS" | |
}, | |
"yAxisLeft": { | |
"zero": true | |
} | |
} | |
}, | |
{ | |
"title": "", | |
"layout": { | |
"column": 1, | |
"row": 12, | |
"width": 4, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.markdown" | |
}, | |
"rawConfiguration": { | |
"text": "## 🕰 ❎ Ignore Time Picker →\n---\nSometimes you want a widget with a fixed time window, disjointed from your change in the time picker or when you drag your time window in a time series chart.\n\n**To make a chart ignore the time picker:**\n1. Select Edit chart or run a query.\n2. Open the Dashboard Options menu in the customizations UI\n3. Turn the toggle on for “Ignore time picker”.\n\n> Try using the time picker or dragging across the timeseries charts above, and see what happens with the widget on the right\n" | |
} | |
}, | |
{ | |
"title": "Count Transaction Name - ignoring the time picker", | |
"layout": { | |
"column": 5, | |
"row": 12, | |
"width": 8, | |
"height": 3 | |
}, | |
"linkedEntityGuids": null, | |
"visualization": { | |
"id": "viz.area" | |
}, | |
"rawConfiguration": { | |
"facet": { | |
"showOtherSeries": false | |
}, | |
"legend": { | |
"enabled": true | |
}, | |
"nrqlQueries": [ | |
{ | |
"accountId": <INSERT-ACCOUNT-ID>, | |
"query": "FROM Transaction SELECT count(*) SINCE 1 day AGO TIMESERIES MAX" | |
} | |
], | |
"platformOptions": { | |
"ignoreTimeRange": true | |
} | |
} | |
} | |
] | |
} | |
], | |
"variables": [] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment