With the query builder you can run queries of your data to create custom charts and other visualizations. The query builder comes with three working modes: basic query-less mode, advanced (NRQL) mode, and advanced PromQL-style mode, which takes PromQL queries as an input for accessing metrics and building charts.
Use the query builder in PromQL-style mode
You can access the query builder advanced PromQL-style mode by going to one.newrelic.com and clicking on Query your data at the top right corner. Go to the query builder tab on the left, then click PromQL-style on the right.
We support the Prometheus query language (PromQL) through our PromQL-style query mode. We do our best to automatically translate PromQL syntax queries into the closest NRQL approximation.
For more information on how this works and differences you may observe between Prometheus and New Relic, see Supported PromQL features.
Build your PromQL-style query with the following parameters:
- Account: Select the account you want to query.
- PromQL-style prompt: Write you query here. You can view the list of valid options of the metrics and functions in the account.
- Step and range: Select the step and range for the query, or click on instant.
Run the query to obtain the chart with the results. You can name the chart, change the type of chart, or add it to a dashboard.
Click NRQL to see how your PromQL-style query is translated into NRQL.
PromQL-style and the query builder
The query builder in advanced PromQL-style mode translates your PromQL query to NRQL before running the query. The results may be different from how Prometheus executes the query.
If you would like to learn more about New Relic's PromQL-style query language and how it behaves, including troubleshooting information for translated queries, see Supported PromQL features.