With the query builder, you can run queries of your data to create custom charts and other visualizations. You can also build custom dashboards containing multiple charts.
Are you a New Relic Insights user? See our transition guide.
Why it matters
Modern business systems are a complex maze of data-generating elements. You need an easy, solid way to fetch, analyze, and visualize the never-ending stream of data flowing from your daily working activities.
Use the query builder to:
- Quickly access your data and build customized charts to learn and understand the health of your infrastructure, applications, and other services.
- Add charts to your dashboards to obtain a complete real-time view of the state of your system.
- Share your charts with colleagues or users in just two clicks.
- Get acquainted with querying by using basic mode, then switch to advanced mode to refine your charts using NRQL.
Use the query builder: basic and advanced modes
The query builder offers three methods for specifying the data you want to see in a chart:
You can also switch to the Data explorer tab at any time to browse your data and create charts visually, without performing queries.
- Basic mode
Basic mode doesn't require a query language, and so it's useful if you aren't familiar with NRQL or SQL. It's also a quick way to answer one-off questions, such as how many cities outside of the United States are accessing the shopping site for your company.
With basic mode you can:
- Choose your data source. In basic mode, you start by selecting an event and then picking the attribute that corresponds to the information to show in your chart.
- Specify (filter) the data for your chart. You can narrow the results and choose an attribute to facet by.
- Select the time range to present in the chart. You can select a time range from the menu or use the custom option to create your own time range.
See Use basic mode for more information about this feature.
- Advanced (NRQL) mode
With the advanced (NRQL) mode you can create your own queries using the NRQL query language. NRQL queries may be simple or complex, depending on what data you want to use and how to display it in your chart. This example of the advanced mode shows the NRQL query with the same data as used in basic mode.
With APM's real time streaming, you can query and visualize your data for transactions, errors, and custom events in dashboards.
See Use advanced (NRQL) mode for more information about using this feature.
- Advanced (PromQL-style) mode
With the advanced (PromQL-style) mode you can run basic PromQL-style queries.
You can switch between basic and advanced modes while defining your query in order to:
- customize some of the values.
- learn how NRQL queries are structured using the data you specified in basic mode.
If you build your query in basic mode and update it using advanced mode, you cannot return to basic mode to edit that query. You must make any additional changes in advanced (NRQL) mode.
Once you specify the data you want, your chart is ready to view. Your query automatically runs in basic mode as you make changes to the inputs. If using advanced (NRQL or PromQL-style) mode, run your query.
Use your charts
Once you have built your chart you can:
- Change the type of chart. Based on the data you specified, the query builder selects the chart type that displays your results most effectively. However, you can choose from other available chart types to present your data in the visual format that you want to use.
- Share your chart.
- Add your chart to a dashboard.