CREATE METRICS INTEGRATION metrics_integration_name WITH (metrics_integration_parameter =value [, ... ]);
Description
Metrics Integrations allow organizations to configure an integration that enables scraping of query metrics. Tokens can be used with the specified access.region and are valid for 90 days
Arguments
metrics_integration_name
Specifies the name of the new Metrics Integration. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.
WITH (metrics_integration_parameter = value [, … ])
The following creates a new Metrics Integration with name my-integration and is valid for AWS us-east-1:
demodb.public/demostore#CREATEMETRICSINTEGRATION"my-integration"WITH ('access_region'="AWS us-east-1");+---------------------+----------------+----------+------------------------------------------+-------------------+------------------------+
| Type | Name | Command | Summary | Token | Uri |
+=====================+================+==========+==========================================+===================+========================+
| metrics integration | my-integration | CREATE | metrics integration my-integration was | <my access token> | https://uri/to/metrics |
| | | | successfully created | | |
+---------------------+----------------+----------+------------------------------------------+-------------------+------------------------+
The command will output a URI and Token which can be added as an 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 (NOTE use the URI from CREATE METRICS INTEGRATION output):