Filter a Real-Time Metrics dashboard
Narrow every chart of a Real-Time Metrics dashboard to the requests you need, and apply the same filters to a GraphQL query.
You can narrow the charts of a Real-Time Metrics dashboard in Azion Console, or apply the same filters to a query with the GraphQL API. For every field, operator, and value type a filter accepts, refer to Filters and time range.
With no filter, a dashboard counts the data of your whole account. A filter keeps only the data whose field matches a value, such as the host, the status code, the request method, or the country. In the GraphQL API, these fields are host, status, requestMethod, and geolocCountryName.
Prerequisites
Console
- An application with requests in the time range you read.
- A host your workload answers on, such as
www.example.com, to combine filters. - Access to Azion Console. To sign in, refer to How to access Azion Console.
Add a filter
This task keeps the requests that returned an error, with a status code of 400 or higher. Every chart of the dashboard then counts only those requests.
Console
To filter the dashboard by status code in Azion Console:
Access Azion Console > Real-Time Metrics.
The page opens on Build › Applications › Data Transferred.
In the filter row, select the filter icon, whose tooltip reads Add filter.
In Filter, select Status.
In Operator, select Greater Than or Equal.
Enter 400 as the value.
A chip under the filter row reads Status greater than or equal: 400. Every chart of the dashboard now counts only the requests with a status code of 400 or higher.
Combine filters
Each filter you add narrows the data again, so the charts keep only the data that matches every filter. This task adds a host to the status filter from Add a filter, to read the errors of one host. Replace www.example.com with a host your workload answers on.
Console
To add a second filter in Azion Console:
In the filter row, select the filter icon, whose tooltip reads Add filter.
In Filter, select Host.
In Operator, select Equals.
Enter www.example.com as the value.
A second chip reads Host equals: www.example.com, next to the status chip. Every chart now counts only the requests to that host with a status code of 400 or higher.
The Filter popover states Each combination of operator can only be used once. To keep any of several values of one field, use the in form of the query input, described in Filter with the query input.
Filter with the query input
The query input in the filter row takes filters as one typed expression in Azion Query Language. It also keeps several values of one field at once, which a single Equals filter cannot do. This task keeps the requests that returned 404 or 502.
To filter with the query input in Azion Console:
Access Azion Console > Real-Time Metrics.
In the filter row, select the query input, whose placeholder reads Filter using Azion Query Language syntax....
Enter status in (404, 502).
While you type, the input suggests fields, then operators, then values. Ctrl + Space, or Cmd + Space, opens the suggestions.
Press Enter.
Every chart of the dashboard now counts only the requests that returned 404 or 502.
To keep a range of values instead, use between with exactly two values: status between (400, 499) keeps the status codes from 400 to 499. For the syntax of each operator in the query input, refer to Filters and time range. When the input shows a validation message and Refresh stays disabled, refer to Troubleshoot Real-Time Metrics.
Edit or remove a filter
Each applied filter shows as a chip under the filter row. Selecting a chip reopens that filter, and its remove icon deletes it.
To edit a filter in Azion Console:
Under the filter row, select the chip of the filter.
The Filter popover opens with the values of that filter. A lock icon replaces the arrow of the field, because the field cannot change.
The chip shows the new operator or value, and every chart of the dashboard follows the changed filter.
To remove a filter, select the remove icon on its chip, and repeat for each filter you want to remove. The chip disappears, and the charts stop applying that filter.
Switching to a dashboard that reads another dataset clears every filter and keeps the time range.