Export Astra DB Serverless metrics
|
If you use private endpoints, exported metrics traffic doesn’t use the private connection. |
Your active databases can forward health metrics to a third-party observability service.
Use the Astra Portal or the DevOps API to manage the metrics export destinations for your databases. To export metrics for multiple databases, you must configure an export destination for each database.
Exporting metrics is a push-based configuration. For a pull-based option, see Scrape Astra DB Serverless metrics in exposition format.
Prerequisites
Exporting metrics is a premium feature that requires a paid subscription plan.
Export metrics to Amazon CloudWatch
This configuration requires Amazon CloudWatch authentication credentials in the form of an access key and secret key.
The secret key user must have the cloudwatch:PutMetricData permission:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AstraDBMetrics",
"Effect": "Allow",
"Action": "cloudwatch:PutMetricData",
"Resource": "*"
}
]
}
- Use the Astra Portal
-
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Amazon CloudWatch.
-
For Access Key and Secret Key, enter your Amazon CloudWatch authentication credentials.
-
For Region, select the region where you want to export the metrics. This doesn’t have to match your database’s region.
-
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- Use the DevOps API
-
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add an Amazon CloudWatch metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint. The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.curl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "cloudwatch": { "access_key": "AWS_ACCESS_KEY", "secret_key": "AWS_SECRET_KEY", "region": "AWS_REGION" } }'Replace the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
AWS_ACCESS_KEYandAWS_SECRET_KEY: Your Amazon CloudWatch authentication credentials. -
AWS_REGION: Enter the region where you want to export the metrics. This doesn’t have to match your database’s region.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "cloudwatch": { "access_key": "AWS_ACCESS_KEY", "secret_key": "AWS_SECRET_KEY", "region": "AWS_REGION" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-
Export metrics to Apache Kafka®
This configuration uses SASL authentication. For more information about telemetry with Kafka, see Kafka metrics overview and Kafka monitoring.
- Use the Astra Portal
-
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Kafka.
-
If required, select a Kafka Security Protocol:
-
SASL_PLAINTEXT: SASL authenticated, non-encrypted channel
-
SASL_SSL: SASL authenticated, encrypted channel
This isn’t required for most Kafka installations. If you use hosted Kafka on Confluent Cloud, you might need to use SASL_SSL. Non-Authenticated options (SSL and PLAINTEXT) aren’t supported.
-
-
For SASL Mechanism, enter the appropriate SASL mechanism property for your security protocol, such as
GSSAPI,PLAIN,SCRAM-SHA-256, orSCRAM-SHA-512.For more information, see Kafka Authentication Basics and SASL Authentication in Confluent Platform.
-
For SASL Username and SASL Password, enter your Kafka authentication credentials.
-
For Topic, enter the Kafka topic where you want Astra DB to export metrics. This topic must exist on your Kafka servers.
-
For Bootstrap Servers, add one or more Kafka Bootstrap Server entries, such as
pkc-9999e.us-east-2.aws.confluent.cloud:9092. -
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- DevOps API
-
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add a Kafka metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint. The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.curl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "kafka": { "bootstrap_servers": [ "BOOTSTRAP_SERVER_URL" ], "topic": "KAFKA_TOPIC", "sasl_mechanism": "SASL_MECHANISM_PROPERTY", "sasl_username": "KAFKA_USERNAME", "sasl_password": "KAFKA_PASSWORD", "security_protocol": "SASL_SECURITY_PROTOCOL" } }'Replace the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
BOOTSTRAP_SERVER_URL: A Kafka Bootstrap Server URL, such aspkc-9999e.us-east-2.aws.confluent.cloud:9092. You can provide a list of URLs. -
KAFKA_TOPIC: The Kafka topic where you want Astra DB to export metrics. This topic must exist on your Kafka servers. -
SASL_MECHANISM_PROPERTY: The appropriate SASL mechanism property for your security protocol, such asGSSAPI,PLAIN,SCRAM-SHA-256, orSCRAM-SHA-512. For more information, see Kafka Authentication Basics and SASL Authentication in Confluent Platform. -
KAFKA_USERNAMEandKAFKA_PASSWORD: Your Kafka authentication credentials. -
SASL_SECURITY_PROTOCOL: If required, specifySASL_PLAINTEXTorSASL_SSL. This isn’t required for most Kafka installations. If you use hosted Kafka on Confluent Cloud, you might need to useSASL_SSL. Non-Authenticated options (SSLandPLAINTEXT) aren’t supported.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "kafka": { "bootstrap_servers": [ "BOOTSTRAP_SERVER_URL" ], "topic": "astra_metrics_events", "sasl_mechanism": "PLAIN", "sasl_username": "KAFKA_USERNAME", "sasl_password": "KAFKA_PASSWORD", "security_protocol": "SASL_PLAINTEXT" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-
Export metrics to Apache Pulsar™
- Use the Astra Portal
-
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Pulsar.
-
For Endpoint, enter your Pulsar Broker URL.
-
For Topic, enter the Pulsar topic where you want to publish metrics.
-
Enter an Auth Name, select the Auth Strategy used by your Pulsar Broker, and then provide the required credentials:
-
Token: Provide a Pulsar authentication token.
-
Oauth2: Provide your OAuth2 Credentials URL and OAuth2 Issuer URL. Optionally, you can provide your OAuth2 Audience and OAuth2 Scope. For more information, see Authentication using OAuth 2.0 access tokens.
-
-
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- Use the DevOps API
-
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add a Pulsar metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint. The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.Pulsar token authenticationcurl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "pulsar": { "endpoint": "PULSAR_ENDPOINT", "topic": "PULSAR_TOPIC", "auth_strategy": "token", "token": "PULSAR_TOKEN", "auth_name": "PULSAR_AUTH_NAME" } }'Pulsar OAuth2 authenticationcurl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "pulsar": { "endpoint": "PULSAR_ENDPOINT", "topic": "PULSAR_TOPIC", "auth_strategy": "oauth2", "oauth2_credentials_url": "CREDENTIALS_URL", "oauth2_issuer_url": "ISSUER_URL" } }'Replace the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
PULSAR_ENDPOINT: Your Pulsar Broker URL. -
PULSAR_TOPIC: The Pulsar topic where you want to publish metrics. -
auth_strategy: Eithertokenoroauth2, depending on your Pulsar authentication method. -
PULSAR_TOKENandPULSAR_AUTH_NAME: A Pulsar authentication token and name, ifauth_strategyistoken. -
CREDENTIALS_URLandISSUER_URL: Your Pulsar OAuth2 credentials and issuer URLs, ifauth_strategyisoauth2. Optionally, you can provideoauth_audienceandoauth2_scope. For more information, see Authentication using OAuth 2.0 access tokens.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "pulsar": { "endpoint": "PULSAR_ENDPOINT_URL", "topic": "PULSAR_TOPIC", "auth_strategy": "token", "token": "PULSAR_TOKEN", "auth_name": "PULSAR_AUTH_NAME" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-
Export metrics to Datadog
- Use the Astra Portal
-
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Datadog.
-
For API Key, enter your Datadog API key.
-
Optional: For Site, enter the Datadog site parameter for the site where you want to export metrics. The site parameter format depends on your site URL, for example:
-
If your site URL begins with
https://app., remove this entire clause from your site URL to form the site parameter. -
If your site URL begins with a different subdomain, such as
https://us5orhttps://ap1, remove onlyhttps://from your site URL to form the site parameter.
-
-
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- Use the DevOps API
-
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add a Datadog metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint. The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.curl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "datadog": { "api_key": "DATADOG_API_KEY", "site": "DATADOG_SITE" } }'Replace the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
DATADOG_API_KEY: Your Datadog API key. -
DATADOG_SITE: The Datadog site parameter for the site where you want to export metrics. The site parameter format depends on your site URL, for example: -
If your site URL begins with
https://app., remove this entire clause from your site URL to form the site parameter. -
If your site URL begins with a different subdomain, such as
https://us5orhttps://ap1, remove onlyhttps://from your site URL to form the site parameter.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "datadog": { "api_key": "DATADOG_API_KEY", "site": "DATADOG_SITE" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-
Export metrics to Prometheus
This configuration requires Prometheus version 2.33 or later, if you aren’t already on an LTS or later version.
- Use the Astra Portal
-
-
Enable the remote write receiver in the destination app. For more information, see Remote storage integrations.
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Prometheus.
-
For Prometheus Strategy, select your authentication method, and then provide the required credentials:
-
Bearer: Provide a Prometheus Token and Prometheus Endpoint.
-
Basic: Provide a Prometheus Username, Prometheus Password, and Prometheus Endpoint.
-
-
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- Use the DevOps API
-
-
Enable the remote write receiver in the destination app. For more information, see Remote storage integrations.
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add a Prometheus metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint.The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.
Prometheus token authenticationcurl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "prometheus_remote": { "endpoint": "PROMETHEUS_ENDPOINT", "auth_strategy": "bearer", "token": PROMETHEUS_TOKEN } }'Prometheus username and password authenticationcurl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "prometheus_remote": { "endpoint": "PROMETHEUS_ENDPOINT", "auth_strategy": "basic", "password": PROMETHEUS_PASSWORD, "user": PROMETHEUS_USERNAME } }'Replace or set the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
PROMETHEUS_ENDPOINT: Your Prometheus endpoint URL. -
auth_strategy: Eitherbearerorbasic, depending on your Prometheus authentication method. -
PROMETHEUS_TOKEN: Your Prometheus authentication token, ifauth_strategyisbearer. -
PROMETHEUS_PASSWORDandPROMETHEUS_USERNAME: Your Prometheus authentication credentials, ifauth_strategyisbasic.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "prometheus_remote": { "endpoint": "https://prometheus.example.com/api/prom/push", "auth_strategy": "basic", "user": "PROMETHEUS_USERNAME", "password": "PROMETHEUS_PASSWORD" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-
Export metrics to Splunk
- Use the Astra Portal
-
-
In the Astra Portal, click the name of the database that you want to modify.
-
Click the Settings tab.
-
In the Export Metrics section, click Add Destination.
-
Select Splunk.
-
For Endpoint, enter the full HTTP address and path for the Splunk HTTP Event Collector (HEC) endpoint.
-
For Index, enter the Splunk index where you want to export metrics.
-
For Token, enter the Splunk HTTP Event Collector (HEC) token for Splunk authentication. This token must have permission to write to the specified index.
-
For Source, enter the source for the events sent to the sink. If you don’t specify a source, the default is
astradb. -
For Source Type, enter the type of events sent to the sink. If you don’t specify a source type, the default is
astradb-metrics. -
Click Add Destination.
The new destination appears in the Export Metrics section. To edit or delete this configuration, click More, and then select Edit or Delete.
-
- Use the DevOps API
-
-
Generate an application token that has Manage Metrics permission for the database that you want export metrics.
If you plan to export metrics for multiple databases, you can customize each token’s scope. For example, you can create separate tokens for each database or create one token with the Organization Administrator role.
-
Get the database ID. In the Astra Portal, copy the Database ID for the relevant database. Alternatively, you can use the DevOps API List databases endpoint to get multiple database IDs at once:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases" \ --header "Authorization: Bearer APPLICATION_TOKEN"The provided application token must have the Organization Administrator role.
-
Use the DevOps API Get Telemetry Configuration endpoint to get the database’s existing metrics export configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A database’s telemetry configuration is a desired state list. You must always send the list of all export destinations when you add, remove, or change any destinations for a database. For example, if a database has five destinations, but your
POSTbody contains only one destination, then all destinations are removed except the one included in your request. -
To add a Splunk metrics export destination to a database, send a
POSTrequest to the DevOps API Configure Telemetry endpoint. The request body must contain the database’s entire telemetry configuration, including all existing destinations, as returned by the Get Telemetry Configuration endpoint.curl -sS -L -X POST "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN" \ --data '{ "splunk": { "endpoint": "SPLUNK_HEC_ENDPOINT", "index": "SPLUNK_INDEX", "token": "SPLUNK_TOKEN", "source": "SPLUNK_SOURCE", "sourcetype": "SPLUNK_SOURCETYPE" } }'Replace the following:
-
DATABASE_ID: The database ID. -
APPLICATION_TOKEN: Your Astra application token. -
SPLUNK_HEC_ENDPOINT: The full HTTP address and path for the Splunk HTTP Event Collector (HEC) endpoint. You can get this from your Splunk Administrator. -
SPLUNK_INDEX: The Splunk index where you want to export metrics. -
SPLUNK_TOKEN: The Splunk HEC token for Splunk authentication. This token must have permission to write to the specifiedindex. -
SPLUNK_SOURCE: The source for the events sent to the sink. If unset, the default isastradb. -
SPLUNK_SOURCETYPE: The type of events sent to the sink. If unset, the default isastradb-metrics.
-
-
Use the Get Telemetry Configuration endpoint to review the updated configuration:
curl -sS -L -X GET "https://api.astra.datastax.com/v2/databases/DATABASE_ID/telemetry/metrics" \ --header "Authorization: Bearer APPLICATION_TOKEN"A successful response includes information about all metrics export destinations for the specified database:
Result{ "splunk": { "endpoint": "https://http-inputs-COMPANY.splunkcloud.com", "index": "astra_db_metrics", "token": "SPLUNK_TOKEN", "source": "astradb", "sourcetype": "astradb-metrics" } } -
To edit or delete a telemetry configuration, do the following:
-
Use the Get Telemetry Configuration endpoint to get the database’s existing telemetry configuration.
-
Send a
POSTrequest to the Configure Telemetry endpoint with the entire updated configuration. This is a desired state list; thePOSTrequest body replaces the database’s telemetry configuration.
-
-