-
Notifications
You must be signed in to change notification settings - Fork 31
DataStax Astra
This document explains how to use the datasource to work with the data stored in DataStax Astra, a managed Cassandra as a Service DB.
At first, you need to have an account at astra.datastax.com and a database instance.
Download SecureConnectBundle using the Connect page of your Astra instance, it's available to download on any Connect using a driver subpage. Unpack it and save the files in the folder accessible to Grafana. Notice the path, you will need them later. If you run Grafana in a docker container, you will need to mount the folder or copy files there with docker cp command.
Create a new application token at the https://astra.datastax.com/settings/tokens. We recommend using RO User role, in this case, Grafana will have solely read-only access. Store token details as you will need them later.
-
Host specify the
hostandcql_portvalues of theconfig.jsonfile from the SecureConnectBundle (see p.1). It should look like1234567890qwerty-eu-central-1.db.astra.datastax.com:29402IMPORTANT Notice, it has to be thecql_portvalue, not justport(common mistake) -
User
client IDof the API Token -
Password
client secretof the API Token -
Certificate Path
/path/to/cert(usecertfile from SecureConnectBundle) -
Root Certificate Path
/path/to/key(usekeyfile from SecureConnectBundle) -
RootCA Certificate Path
/path/to/ca.crt(useca.crtfile from SecureConnectBundle)
Hit save and test button, if you did everything right, you will have a green info notice "Database Connection OK"
If you aren't lucky enough, check grafana logs for more details. At this moment, you are good to go, the datasource is operational and you can use Astra as it would be your local installation.
Sometimes users specify the wrong port and a connection cannot be established. If you can't connect to your Astra instance, please check if the correct port specified in the datasource config (See step 3 above)
if you have an error message like [ERROR] cassandra-backend-datasource: Unable create tls config, open /cert: permission denied, it means that Grafana cannot open TLS certificate files. Set the proper permission f.e. using chown command. If you copied the files using docker cp command, they'll be copied by a root user and grafana will have no access to them.
To contact the developers, ask questions, or provide any feedback, please use Github discussions.