Add the Gnocchi data source

Add the Gnocchi data sourceΒΆ

Once you perform the steps described in Prerequisites, perform the steps below to add the Gnocchi data source to Grafana.

To add the Gnocchi data source:

  1. Open your Git project repository with Reclass model on the cluster level.

  2. In the stacklight/client.yml file, add the following class:

    - system.grafana.client.datasource.gnocchi
  3. In the stacklight/server.yml file, specify the following parameters, where is the vhost FQDN:

  4. Log in to the Salt Master node.

  5. Apply the following states:

    salt 'mon*' state.sls docker.client
    salt 'mon*' state.sls grafana.client
  6. If the HTTP vhost name is not resolvable from the Docker container, run the following command from the host that runs the container to add a record in /etc/hosts of Grafana containers:

    GRAFANA_CONTAINER_ID=`docker ps | grep grafana | cut -d" " -f1`
    HOST_IP=`hostname -I | cut -d " " -f1`
    docker exec -u root -it $GRAFANA_CONTAINER_ID bash -c "echo \"$HOST_IP\" >> /etc/hosts"
  7. In the Grafana web UI, navigate to Configuration > Data Sources.

  8. Open the Gnocchi data source and click Save & Test.