CREATE METRICS INTEGRATION
Syntax
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. Tokens are valid for 90 days.
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.
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";
+---------------------+----------------+----------+------------------------------------------+-------------------+------------------------+
| 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 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:
curl https://api-atyo2.deltastream.io/metrics -H "Accept: text/plain" -H "Authorization: Bearer [my access token]"
If there's a query running 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