Using metrics with Stargate
Stargate is a data gateway deployed between client applications and a database.
Metrics can be monitored using Prometheus and Grafana. A
script is available to run Apache Cassandra™, Stargate, Prometheus, and Grafana
together to explore the metrics available.
To use Stargate you need:
Docker installed and running, if using Docker
cURLto run REST queries
docker-compose YAML file contains the configuration for pulling the
required docker images and configuration required for installing.
It can be used to install:
1-3 Apache Cassandra™ 3.11 nodes as a cluster (backend-1, backend-2, backend-3)
1 Stargate node (stargate)
1 Prometheus node (prometheus)
1 Grafana node (grafana)
Two companion files are helpful: a script to run the docker-compose file with
delays between node startup that prevents timing issues, and a text file that
docker run commands for running a CQLSH Docker container to query against either one of the Cassandra nodes or the Stargate node,
The files are found at: https://github.com/stargate/docker-images/tree/master/examples/stargate-prometheus-grafana
Run the script after downloading the files:
Note that the default file
/etc/prometheus/prometheus.yml is replaced with a
mounted file from the docker-compose repository, to identify the stargate node
as the target for gathering metrics.
The default target of
localhost:9090 (the Prometheus node) has been replaced with
'stargate:8085' (the stargate node’s metrics port).
The Stargate metrics are grouped by API, and can accessed as any other metrics are accessed in Prometheus.
Once all the images are running, you can access Grafana in the browser at
You’ll need to login with the default username and password,
Grafana will require you to create a new password to proceed.
Add Prometheus as a data source by clicking the data source icon on the lefthand side editing the form with the following information:
Edit the HTTP URL field to add
Change the HTTP Access field to
Press "Save & Test" to check that the data source is added. Add a new dashboard and choose Prometheus as the data source. The Stargate metrics can be selected as a metric to display.
For more information on using Grafana, access the Grafana docs.