Monitoring Reference
This reference covers the clauses, fields, and variables used to create a Monitoring query.On the left navigation bar, you will find a list of example queries to get started:
Query Name | Description |
---|---|
Requests by Hostname | The total number of requests grouped by host |
Requests by Project | The total number of requests grouped by project_id |
Requests by IP Address | The total number of requests grouped by public_ip |
Requests by Bot/Crawler | The total number of requests grouped by bot_name |
Requests by User Agent | The total number of requests grouped by user_agent |
Requests by Region | The total number of requests grouped by region |
Bandwidth by Project, Hostname | The outgoing bandwidth grouped by host and project_id |
Bandwidth by Path, Hostname | The outgoing bandwidth grouped by host and source_path |
Request Cache Hits | The total number of request cache hits grouped by host |
Request Cache Misses | The total number of request cache misses grouped by host |
429 Status Codes by Host, Path | The total 429 (Too Many Requests) status code requests grouped by host and source_path |
5XX Status Codes by Host, Path | The total 5XX (server-related HTTPS error) status code requests grouped by host and source_path |
Execution by Host, Path | The total billed Serverless Function usage grouped by host and source_path |
The Visualize
clause selects which field you will calculate within your query. It allows you to select one of the following at a time:
Field Name | Description | |
---|---|---|
requests | The HTTP requests | |
bandwidth_incoming | Bandwidth sent from the client to Vercel | |
bandwidth_outgoing | Bandwidth sent from Vercel to the client | |
bandwidth_total | Sum of bandwidth_incoming and bandwidth_outgoing | |
serverless_function_execution | The billed Serverless Function usage in GB-Hrs | |
serverless_function_duration | The time spent executing Serverless Functions | |
memory_size | The size of memory provisioned for the Serverless Functions | |
blocked_connections | All connections blocked by either the system or user |
The Where
clause defines the conditions to filter your query data. It only fetches data that meets a specified condition. It allows you to filter results based on several fields, variables, and operators, as listed in the table:
Field/Variable Name | Description | |
---|---|---|
requests | Number of requests | |
bandwidth_total | Sum of the incoming and outgoing bandwidth for the request | |
bandwidth_incoming | Bandwidth sent from the client to your Vercel account for the request | |
bandwidth_outgoing | Bandwidth sent from your Vercel account to the client for the request | |
host | Domain or subdomain for the request | |
serverless_function_execution | The billed Serverless Function usage in GB-Hrs | |
serverless_function_duration | The time spent executing Serverless Functions | |
memory_size | The size of memory provisioned for the Serverless Functions | |
path_type | The path type for the request. Learn more about Path Types. | |
project_id | The project ID for the request | |
status | The HTTP response code for the request | |
source_path | The mapped path used by the request. For example, if you have a dynamic route like /blog/[slug] and a blog post is /blog/my-blog-post , the source_path is /blog/[slug] | |
request_path | The path used by the request. For example, if you have a dynamic route like /blog/[slug] and a blog post is /blog/my-blog-post , the request_path is /blog/my-blog-post | |
cache | The cache status for the request | |
error_details | The errors that were thrown on Vercel | |
deployment_id | The deployment ID of the request | |
environment | The environment type of the request | |
request_method | The HTTP method for the request (GET, POST, PUT, etc.) | |
public_ip | The IP address for the request. | |
user_agent | The user agent for the request | |
http_referer | The HTTP referer for the request | |
asn | The autonomous system number (ASN) for the request. This is related to what network the request came from (either a home network or a cloud provider) | |
region | The region the request was routed to | |
bot_name | The bot crawler name for the request. This field will contain the name of a known crawler (e.g. Google, Bing) | |
waf_action | The action taken by the Vercel Firewall (system-blocked or customer-blocked ) |
Operator | Description | |
---|---|---|
in | The operator that allows you to specify multiple values | |
and | The operator that displays a query result if all the filter conditions are TRUE | |
or | The operator that displays a query result if at least one of the filter conditions are TRUE | |
not | The operator that displays a query result if the filter condition(s) is NOT TRUE | |
like | The operator used to search a specified pattern. This is case-sensitive. For example, host like 'acme.com' . You can also use _ to match any single character and % to match any substrings. For example, host like 'acme_.com' will match with acme1.com , acme2.com , and acme3.com . host like 'acme%' will also have the same matches. To do a case-insensitive search, use ilike | |
startsWith | Filter data values that begin with some specific characters | |
match | The operator used to search for patterns based on a regular expression (Re2 syntax). For example, match(user_agent, 'Chrome/97.*') |
All your project's resources like pages, functions, and images have a path type.
Path Type | Description |
---|---|
static | A static asset (.js , .css , .png , etc.) |
func | A Serverless Function |
external | A resource that is outside of Vercel. This is usually caused when you have rewrite rules |
edge | An Edge Function |
prerender | A pre-rendered page built using Incremental Static Regeneration |
streaming_func | A streaming Serverless Function |
background_func | The Incremental Static Regeneration Render Function used to create or update a static page |
The Group By
clause groups the data based on the selected attributes. The available grouping attributes are:
Group Name | Description | |
---|---|---|
host | Group by the request's domains and subdomains | |
path_type | Group by the request's resource type | |
project_id | Group by the request's project ID | |
status | Group by the request's HTTP response code | |
source_path | Group by the mapped path used by the request | |
request_path | Group by the path used by the request | |
cache | Group by the cache hit status (HIT or MISS ) | |
error_details | Group by the errors that were thrown on Vercel | |
deployment_id | Group by the request's deployment ID | |
environment | Group by the environment (production or preview ) | |
request_method | Group by the HTTP request method (GET , POST , PUT , etc.) | |
http_referer | Group by the HTTP referer | |
public_ip | Group by the request's IP address | |
user_agent | Group by the request's user agent | |
asn | The autonomous system number (ASN) for the request. This is related to what network the request came from (either a home network or a cloud provider) | |
bot_name | Group by the request's bot crawler name | |
region | Group by the region the request was routed to | |
waf_action | Group by the action taken by the Vercel Firewall (system-blocked or customer-blocked ) |
The Limit
clause defines the maximum number of results displayed. If the number of query results is greater than the Limit
value, then the remaining results are compiled as Other(s).
In the chart view (vertical bar or line), Limit
is applied at the level of each day or hour (based the value of the Data Granularity dropdown). When you hover over each step of the horizontal axis, you can see a list of the results returned and associated colors.
In the table view (below the chart), Limit
is applied to the sum of requests for the selected time period so that the number of rows in the table does not exceed the value of Limit
.
Was this helpful?