Monitor metrics with Prometheus and Grafana

Contributors netapp-mwallis

You can monitor Astra Data Store preview metrics with Prometheus and Grafana. You can configure Prometheus to gather metrics from the Astra Data Store preview Kubernetes cluster metrics endpoint, and you can use Grafana to visualize the metrics data.

What you’ll need
  • Make sure that you have downloaded and installed the Prometheus and Grafana packages on the Astra Data Store preview cluster or a different cluster that can communicate with the Astra Data Store preview cluster. Follow the instructions in the official documentation to install each tool:

  • Prometheus and Grafana need to be able to communicate with the Astra Data Store preview Kubernetes cluster. If Prometheus and Grafana are not installed on the Astra Data Store preview cluster, you need to make sure they can communicate with the metrics service running on the Astra Data Store preview cluster.

Configure Prometheus

Astra Data Store preview exposes a metrics service on TCP port 9341 in the Kubernetes cluster. You need to configure Prometheus to collect metrics from this service.

Steps
  1. Edit the prometheus.yml configuration file for your Prometheus installation.

  2. Add a service target that points to the Astra Data Store preview service name and its port. For example:

    scrape_configs:
    static_configs:
    - targets: ['astrads-metrics-service.astrads-system:9341']
  3. Start the Prometheus service.

Configure Grafana

You can configure Grafana to display the metrics collected by Prometheus.

Steps
  1. Edit the datasources.yaml configuration file for your Grafana installation.

  2. Add Prometheus as a data source. For example:

    apiVersion: 1
    
    datasources:
      - name: astradatastore-prometheus
        type: prometheus
        access: proxy
        url: http://localhost:9090
        jsonData:
          manageAlerts: false
  3. Start the Grafana service.

  4. Follow the instructions in the Grafana documentation to get started.

Import Grafana dashboard templates

The bundle file you downloaded to install Astra Data Store preview includes Grafana dashboard template files that you can import from within Grafana. These dashboard templates can help you see the types of metrics that are available from Astra Data Store preview and how you can view them.

Steps
  1. Open the Astra Data Store preview .tar.gz bundle.

  2. Open the manifests directory.

  3. Extract the grafana_cluster.json and grafana_volume.json files.

  4. Using the Grafana web UI, import the dashboard template files in to Grafana.