• Log inStart now

On August 31, 2024, we're EOLing developer.newrelic.com. All relevant content has been migrated to docs.newrelic.com.

Create a custom dashboard

15 min

lab

This procedure is part of a lab that teaches you how to get started with New Relic to monitor your application.

Each procedure in the lab builds upon the last, so make sure you've completed the last procedure, Collect custom business data, before starting this one.

With your app recording custom business data, you're now ready to get insights from your data. Particularly, you look up:

  • Orders from the past 24 hours
  • Most popular restaurants
  • Average order amount
  • Most popular items

In this procedure, you create a dashboard, query your custom data, gather it in charts, and add those charts to your dashboard to have quick view into these data points.

Create a dashboard

With New Relic dashboards, you observe and interpret the data you collect from your application. You gather the data you want to see into charts to customize the way you see it.

Step 2 of 4

Under Dashboards, click Create a dashboard in the top right corner.

Arrow pointing to Create a dashboard

Step 3 of 4

Select Create a new dashboard.

Arrow pointing to Create a new dashboard

Step 4 of 4

Name your dashboard "Relicstaurants", and click Create.

Arrow pointing to Create button

Add charts to your dashboard

Once the dashboard is in place, you can start creating charts to answer your business related questions.

Orders in past 24 hours

Hover over the dashboard, and click Add a new chart.

add a new chart

From this screen, you add charts using our query builder, or you choose to add text, images, or links using Markdown.

Step 1 of 3

Click Add a chart.

add a chart

This opens a query builder.

Query builder

Step 2 of 3

Edit the query as follows.

SELECT count(*) AS 'Orders' FROM Transaction WHERE appName='Relicstraunts' AND name LIKE '%/api/order' SINCE 1 day ago

Click Run to see the results.

orders in past 24 hours chart

Here, you see the number of orders for the past 24 hours.

Step 3 of 3

Name your chart "Orders in past 24 hours", and click save.

Add chart to dashboard

The chart is now visible on your dashboard.

You can add more charts to your dashboard following the same pattern. To do so, click + in upper right-hand corner.

Add more charts to your dashboard

This takes you to the same Add to your dashboard page.

Add another chart to your dashboard.

Run the following query to view the most popular restaurants for your Relicstaurants app.

SELECT count(*) FROM Transaction WHERE appName='Relicstraunts' AND name LIKE '%/api/order' AND restaurant IS NOT NULL FACET restaurant SINCE 1 day ago

View popular restaurants

This chart shows you the most popular restaurants. Change the chart type to Pie, name it "Most popular restaurants", and click save to add it to your dashboard.

Most popular restaurants pie chart

Average order amount

Use the following query to calculate the average order amount.

SELECT average(orderTotal) FROM Transaction WHERE appName='Relicstraunts' AND name LIKE '%/api/order'

Average order chart

Here, you see observe the average order amount.

Use the following query to view the most popular items.

SELECT sum(itemCount) FROM Transaction WHERE appName='Relicstraunts' AND name LIKE '%/api/order' FACET itemName

Most popular items

Here, you observe the most popular items for your app.

Your final dashboard looks something like this:

Final dashboard

Filter your dashboard

You now know how well your business is performing. You can filter your dashboard by restaurant, and get a closer look.

Step 1 of 2

Click ... in front of your "Most popular restaurants" chart, and select Edit.

Edit most popular restaurant chart

Step 2 of 2

Toggle Filter the current dashboard to enable the filter and save.

Enable filter

Now, you see the option to filter dashboard by most popular restaurant.

Filter this dashboard

The dashboard now shows you business data related to that restaurant.

Filtered dashboard

Summary

In this procedure, you created a dashboard and added multiple charts to it to get business insights. With New Relic, you now have full performance and business insights into your application.

Homework

Well done! Now that you've gotten a jump start with New Relic to monitor your application, here are some docs that will help you take the next steps on your journey.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.