CREATE METRICS INTEGRATION

Syntax

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 [, …​ ])

This clause specifies Metrics Integration parameters; see Metrics Integration Parameters below for more information.

Metrics Integration Parameters

Parameter NameDescription

access_region

Region the Metrics Integration will be valid for. Required: Yes

Type: String Valid values: See LIST REGIONS

Examples

Create a metrics integration

The following creates a new Metrics Integration with name my-integration and is valid for AWS us-east-1:

demodb.public/demostore# CREATE METRICS INTEGRATION "my-integration"
WITH ( 
    'access_region' = "AWS us-east-1" 
);
URI: https://api-atyo2.deltastream.io/metrics # note the URI might be different depending on access_region
Token: [my access token]

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):

curl https://api-atyo2.deltastream.io/metrics -H "Accept: text/plain" -H "Authorization: Bearer [my access token]"

If there is a running query the output of the above curl should look like:

# TYPE deltastream_query_consumerRecordsLagMax untyped
deltastream_query_consumerRecordsLagMax{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSource:pageviews_all"} 0 1715802519327
# TYPE deltastream_query_numBytesInPerSecond untyped
deltastream_query_numBytesInPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSource:pageviews_all"} 90 1715802519327
deltastream_query_numBytesInPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSink:pageviews_all_metrics"} 0 1715802519327
# TYPE deltastream_query_numBytesOutPerSecond untyped
deltastream_query_numBytesOutPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSource:pageviews_all"} 0 1715802519327
deltastream_query_numBytesOutPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSink:pageviews_all_metrics"} 202 1715802519327
# TYPE deltastream_query_numRecordsInPerSecond untyped
deltastream_query_numRecordsInPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSource:pageviews_all"} 1 1715802519327
deltastream_query_numRecordsInPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSink:pageviews_all_metrics"} 1 1715802519327
# TYPE deltastream_query_numRecordsOutPerSecond untyped
deltastream_query_numRecordsOutPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSource:pageviews_all"} 1 1715802519327
deltastream_query_numRecordsOutPerSecond{organization_id="<org-UUID>",query_id="<query-UUID>",relation="KafkaSink:pageviews_all_metrics"} 1 1715802519327

Guide to add metrics Integration to Prometheus

https://docs.deltastream.io/reference/metrics/integrations/prometheus-integration

Last updated