CREATE METRICS INTEGRATION metrics_integration_name WITH (metrics_integration_parameter =value [, ... ]);
Description
Metrics integrations make it possible for organizations to configure an integration that enables scraping of query metrics.
Arguments
metrics_integration_name
Specifies the name of the new metrics integration. If the name is case sensitive you must wrap it in double quotes; otherwise the system uses the lower case name.
token.expires_in_days
Number of days that this token is valid for. Default: 90 days.
Examples
Create a metrics integration
The following creates a new metrics integration with name my-integration and is valid for AWS us-east-1:
The command will output a URI and token you can add as a metric endpoint in Prometheus in Grafana. See Guide to Add Metrics Integration to Prometheus for more information.
If you have an active query you can test the URI and token with the following curl command. Use the URI from CREATE METRICS INTEGRATION output:
If there's a query running the output of the above curl should look like: