Your storage environment may not always be the most transparent part of your deployment. How is its performance, and what kind of capacity are you using? You can add monitoring tools to keep track, but if you’re an ONTAP-based system user, there’s an easier way to do that with NetApp Harvest.
NetApp Harvest is an open-source tool that you can use to get more insight into ONTAP-based and StorageGRID environments. It collects data from your system, such as capacity and performance metrics, then translates that into information that’s routed to a time-series database of your choice.
In this blog post, you’ll find all the steps needed to deploy a basic instance of NetApp Harvest, which you can use to monitor your Amazon FSx for NetApp ONTAP deployment.
Use these links to jump down to the relevant sections:
This guide will give you the steps needed to deploy a basic instance of NetApp Harvest, with the end goal of being able to monitor FSx for ONTAP.
Because we’re showing how to set up Harvest for FSx for ONTAP, the example here shows the steps using Amazon EC2 running Amazon Linux 2. There already is a guide that shows how to set this up, but this version aims to be a bit more thorough.
There are a few prerequisites you should have in place before you set up Harvest:
To be able to access Grafana via the internet, you’ll need to create a rule in the Security Group to open port 3000.
There are three components that need to be installed and configured:
Harvest collects the data (either via Zapi or Rest API) and then feeds it to Prometheus via HTTP. Grafana needs to be configured to have a data source in Prometheus to show the data in its dashboards.
Note: To edit files in Linux I use “vim”, but you can use whatever tool you prefer.
One other important message about this guide: the steps below must be followed in the order they are presented. Jump ahead at your own risk!
In this section we are going to show how to update and install all the relevant components. Of course, it’s not recommended, but since we aren’t talking about security, I assume all commands are executed as root.
dnf update -y
cd /
wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
tar -xvf go1.21.1.linux-amd64.tar.gz
sudo mv go /usr/local/
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
go version
cd /
git clone https://github.com/NetApp/harvest.git
cd /harvest/
make build
bin/harvest version
cd /
wget https://github.com/prometheus/prometheus/releases/download/v2.47.0/prometheus-2.47.0.linux-amd64.tar.gz
tar xvfz prometheus-2.47.0.linux-amd64.tar.gz prometheus-2.47.0.linux-amd64/
sudo dnf install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.1.2-1.x86_64.rpm
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
cd /harvest
bin/harvest grafana import --addr localhost:3000
#### You will be requested to 'Enter API Token'
#### Enter the token saved before
#### You will be asked to save token for later use, enter 'Y'
It will take a few seconds but in the end all dashboards will be imported.
cd /prometheus-2.47.0.linux-amd64
vim prometheus.yml
### Add the following lines, keep the indentation unchanged####
scrape_configs:
- job_name: harvest
http_sd_configs:
- url: http://localhost:8887/api/v1/sd
### Save and close
### edit Harvest configuration file
cd /harvest
vim harvest.yml
### Make the changes, save and exit
For the changes you have to make, you will need to do two things:
Admin:
httpsd:
listen: :8887
Exporters:
prometheus:
exporter: Prometheus
local_http_addr: 0.0.0.0
port: 12990
prometheus1:
exporter: Prometheus
port_range: 13000-14000
Defaults:
collectors:
- Zapi
- ZapiPerf
- Ems
- Rest
- RestPerf
use_insecure_tls: false
Pollers:
# This is an optional poller that provides stats about harvest itself.
# To remove it, simply delete the "unix" section
unix:
datacenter: local
addr: localhost
collectors:
- Unix
exporters:
- prometheus
### this below is my FSxN, I have redacted the IP for security reasons #### You have to change the IP addr. , the username and the password ####
FSXN-01:
datacenter: DC-01
addr: X.Y.Z.K
auth_style: basic_auth
username: fsxadmin
password: yourfsxadminpassword
use_insecure_tls: true # Disable TLS verification when connecting to ONTAP cluster
collectors:
- Zapi
- ZapiPerf
- Rest
- RestPerf
- Ems
exporters:
- prometheus1
Basically, for each new ONTAP system that you want to monitor, you need to add the following:
Pollers:
### Respect the indentation under Pollers or it won't work ###
FSXN-01: -> Name of the ONTAP system as visualized in Harvest/Grafana
datacenter: DC-01 -> Name of the DataCenter, you can have more datacenters but I normally leave it like this
addr: X.Y.Z.K -> Cluster Management IP Address
auth_style: basic_auth -> This means that we will use Username and Password to authenticate to ONTAP
username: fsxadmin -> Username
password: yourfsxadminpassword -> Password
use_insecure_tls: true -> Leave as it is
collectors: -> These are the 5 engines that Harvest can use to poll ONTAP. For FSxN it will mainly use RestPerf (Rest API)
- Zapi
- ZapiPerf
- Rest
- RestPerf
- Ems
exporters:
- prometheus1 -> this means that it will use the exported named 'prometheus1', defined before.
cd /harvest/conf/restperf
vim default.yaml
### Remove the comment (#) from the following lines
Workload: workload.yaml
WorkloadVolume: workload_volume.yaml
WorkloadDetail: workload_detail.yaml
WorkloadDetailVolume: workload_detail_volume.yaml
### Save and exit
cd /harvest/conf/zapiperf
vim default.yaml
### Remove the comment (#) from the following lines
Workload: workload.yaml
WorkloadVolume: workload_volume.yaml
WorkloadDetail: workload_detail.yaml
WorkloadDetailVolume: workload_detail_volume.yaml
cd /harvest
bin/harvest admin start
cd /prometheus-2.47.0.linux-amd64
./prometheus --config.file=prometheus.yml
cd /harvest
bin/harvest start
cd /harvest
bin/harvest status
cd /harvest
bin/harvest stop
cd /harvest
bin/harvest start
Finally, we can look at the performance data in the Grafana dashboards. With Amazon FSx for ONTAP there are only a few of these dashboards that can present the data.
To find them, look for the purple “fsx” tags to the right of each list item. Navigate to “Dashboards”. You should see something like this:
You can click on a dashboard, and it will open in the same tab. Once opened, you will see an empty star icon at the top. Click on that star icon to add that dashboard to the “starred” list so it will be easier to open later.
For instance, I starred the dashboards for “ONTAP:SVM” and “ONTAP:Volume”, which makes it easy for me to see these important dashboards all in one place.
And that’s it! You now have an easier way to monitor your FSx for ONTAP volumes through NetApp Harvest. Have fun!
Complementing NetApp Harvest capabilities, NetApp offers a turnkey service, NetApp Cloud Insights, for gaining a comprehensive view of your Amazon FSx for NetApp ONTAP service. Cloud Insights centralizes performance monitoring and troubleshooting, reducing complexity and enhancing operational efficiency.
Cloud Insights automates routine tasks such as performance tracking using anomaly detection with its advanced analytics abilities, freeing teams to focus on strategic initiatives. Its out-of-the-box dashboards can be tailored to answer specific needs, such as troubleshooting FSx for ONTAP, migration and capacity planning, offering a clearer understanding of FSx for ONTAP operational status.
To learn more and start your FREE service, visit the Cloud Insight Activation page.