Harvest2 is out now and to help celebrate we have a super easy way for you to set it up. While you can still setup your own Prometheus, Grafana, and install Harvest on your own, you don’t have to.
Let me show you how (here) That Git repo has everything you need to have Harvest up and running with just a couple steps, no Prometheus, Grafana, or Harvest knowledge necessary.
Before we get going you need a few things on whatever system you want to run Harvest on.
- Python >= 3.6
- community.docker collection
- This collection needs the python library ‘docker’
- community.docker collection
- Inbound ports 3000 and 9090 open
Start by cloning the Git repo to the machine you will put Harvest on and change the directory to the new location.
$ git clone https://www.github.com/netapp-automation/harvest_install
$ cd harvest_install
Edit the harvest/harvest.yml file and add your ONTAP cluster(s). Here is an example from my lab.
Where my example says ‘Cluster-1’ and ‘Cluster-2’ this is the name of the cluster. This doesn’t have to match the cluster hostname – it can be anything. The ‘datacenter:’ section is how you can group clusters together via region or purpose. Finally for each cluster you add be sure you increment the value of ‘ansible_port:’.
Once you have entered your clusters in the harvest.yml file, you can start the services with the command
$ ansible-playbook manage_harvest.yml
This will pull the three image files you need from docker hub, update the Prometheus.yml file with the systems and ports you included in harvest.yml and deploy Prometheus, Grafana, and one (1) Harvest container per cluster. So if you have just one cluster to monitor, 3 containers will deploy. Two clusters will deploy 4 containers and so on. Since the containers are all from the same image, they don’t take up extra space.
Now that the containers are all running, run the playbook again with an ‘api’ tag to setup the Prometheus datasource and Harvest dashboards in Grafana.
$ ansible-playbook manage_harvest.yml --tags api
You now have Harvest setup and running. Point your browser at the IP or hostname of the machine where you did the installation.
You can navigate to the Dashboards section using the left side menu and the four squares icon. Choose ‘Manage’ from that menu and you will see a Harvest folder on that page. Clicking on that will open and show you the added Dashboards for viewing your ONTAP cluster(s).
Prometheus will create a local Docker volume when deployed. This is where the persistant data for metrics is stored. To find your volume after deploy follow these steps.
$ docker volume ls
DRIVER VOLUME NAME
Here my volume is 81cb4c41ebbb8c9e6cba510d1b86b91c6af732508c7184c4ad72dbdda08abf2c a unique ID auto generated by Docker.
To find where this is on my host you need to ‘inspect’ that unique ID
$ docker volume inspect 81cb4c41ebbb8c9e6cba510d1b86b91c6af732508c7184c4ad72dbdda08abf2c
So my persistant data is currently in /var/lib/docker/volumes/81cb4c41ebbb8c9e6cba510d1b86b91c6af732508c7184c4ad72dbdda08abf2c/_data
I hope you enjoy using Harvest, and if you have questions or want to give feedback there is a #harvest channel on thePub’s Slack workspace. Not on thePub Slack? Join at www.netapp.io/slack.