Skip to content

Commit 0530cb1

Browse files
update harvest files
1 parent 6c9794d commit 0530cb1

File tree

3 files changed

+447
-1
lines changed

3 files changed

+447
-1
lines changed

.github/linters/.yaml-lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ rules:
1515
document-start: disable
1616
new-line-at-end-of-file: disable
1717
ignore:
18-
- '**/templates/**'
18+
- '**/templates/**'
19+
- '**/eks/harvest/values.yaml'
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Harvest and Grafana Deployment using AWS CloudFormation
2+
3+
This guide provides instructions to deploy the Harvest and Grafana environment to monitor your Amazon FSx for NetApp ONTAP resources. The deployment process takes about five minutes.
4+
5+
## Prerequisites
6+
7+
Before you start, ensure you have the following:
8+
- An FSx for ONTAP file system running in an Amazon Virtual Private Cloud (Amazon VPC) in your AWS account.
9+
- The parameter information for the template.
10+
11+
## Yet Another CloudWatch Exporter (YACE)
12+
13+
YACE, or Yet Another CloudWatch Exporter, is a Prometheus exporter for AWS CloudWatch metrics. It is written in Go and uses the official AWS SDK. YACE supports auto-discovery of resources via tags, structured logging, filtering monitored resources via regex, and more[1](https://github.com/prometheus-community/yet-another-cloudwatch-exporter). This deployment includes YACE to enhance monitoring capabilities for your FSx for ONTAP resources.
14+
15+
## Overview
16+
17+
This deployment includes:
18+
- **Yet Another CloudWatch Exporter (YACE)**: Collects FSxN CloudWatch metrics.
19+
- **Harvest**: Collects ONTAP metrics.
20+
21+
## Deployment Steps
22+
23+
1. **Download the Template**
24+
- Download the `fsx-ontap-harvest-grafana.template` AWS CloudFormation template.
25+
26+
2. **Create the Stack**
27+
- Open the AWS CloudFormation console.
28+
- Choose **Create stack** and upload the `fsx-ontap-harvest-grafana.template` file.
29+
30+
3. **Specify Stack Details**
31+
- **Parameters**: Review and modify the parameters as needed for your file system. The default values are:
32+
- **InstanceType**: `t3.micro` (Other options: `t3.small`, `t3.medium`, `t3.large`, `t3.xlarge`, `t3.2xlarge`, etc.)
33+
- **KeyPair**: No default value. Specify the key pair to access the EC2 instance.
34+
- **SecurityGroup**: No default value. Ensure inbound ports 3000 and 9090 are open.
35+
- **SubnetType**: No default value. Choose `public` or `private`.
36+
- **Subnet**: No default value. Specify the same subnet as your FSx for ONTAP file system's preferred subnet.
37+
- **LatestLinuxAmiId**: `/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2`
38+
- **FSxEndPoint**: No default value. Specify the management endpoint IP address of your FSx file system.
39+
- **SecretName**: No default value. Specify the AWS Secrets Manager secret name containing the password for the `fsxadmin` user.
40+
41+
4. **Configure Stack Options**
42+
- Choose **Next** for stack options.
43+
44+
5. **Review and Create**
45+
- Review the stack details and confirm the settings.
46+
- Select the check box to acknowledge that the template creates IAM resources.
47+
- Choose **Create stack**.
48+
49+
6. **Monitor Stack Creation**
50+
- Monitor the status of the stack in the AWS CloudFormation console. The status should change to `CREATE_COMPLETE` in about five minutes.
51+
52+
## Accessing Grafana
53+
54+
- After the deployment is complete, log in to the Grafana dashboard using your browser:
55+
- URL: `http://<EC2_instance_IP>:3000`
56+
- Default credentials:
57+
- Username: `admin`
58+
- Password: `admin`
59+
- **Note**: Change your password immediately after logging in.
60+
61+
## Supported Harvest Dashboards
62+
63+
Amazon FSx for NetApp ONTAP exposes a different set of metrics than on-premises NetApp ONTAP. Therefore, only the following out-of-the-box Harvest dashboards tagged with `fsx` are currently supported for use with FSx for ONTAP. Some panels in these dashboards may be missing information that is not supported:
64+
65+
- **FSxN_Clusters**
66+
- **FSxN_CW_Utilization**
67+
- **FSxN_Data_protection**
68+
- **FSxN_LUN**
69+
- **FSxN_SVM**
70+
- **FSxN_Volume**
71+
72+
---
73+
74+
## Monitor More FSxN
75+
76+
To monitor additional FSxN resources, follow these steps:
77+
78+
1. **Move to the Harvest Directory**
79+
- Navigate to the Harvest directory:
80+
```bash
81+
cd /opt/harvest
82+
```
83+
84+
2. **Configure Additional FSxN in `harvest.yml`**
85+
- Edit the `harvest.yml` file to add the new FSxN configuration. For example:
86+
```yaml
87+
fsx02:
88+
datacenter: fsx
89+
addr: <FSxN_ip_2>
90+
collectors:
91+
- Rest
92+
- RestPerf
93+
- Ems
94+
exporters:
95+
- prometheus1
96+
credentials_script:
97+
path: /opt/fetch-credentials
98+
schedule: 3h
99+
timeout: 10s
100+
```
101+
102+
3. **Update `harvest-compose` with the Additional FSxN**
103+
- Edit the `harvest-compose.yml` file to include the new FSxN configuration:
104+
```yaml
105+
fsx02:
106+
image: ghcr.io/tlvdevops/harvest-fsx:latest
107+
container_name: poller-fsx02
108+
restart: unless-stopped
109+
ports:
110+
- "12991:12991"
111+
command: '--poller fsx02 --promPort 12991 --config /opt/harvest.yml'
112+
volumes:
113+
- ./cert:/opt/harvest/cert
114+
- ./harvest.yml:/opt/harvest.yml
115+
- ./conf:/opt/harvest/conf
116+
environment:
117+
- SECRET_NAME=<your_secret_2>
118+
- AWS_REGION=<your_region>
119+
```
120+
- **Note**: Change the `container_name`, `ports`, `promPort`, and `SECRET_NAME` as needed.
121+
122+
4. **Add FSxN to Prometheus Targets**
123+
- Edit the `harvest_targets.yml` file to add the new FSxN target:
124+
```yaml
125+
- targets: ['<container_name>:<container-port>']
126+
```
127+
128+
5. **Restart Docker Compose**
129+
- Bring down the Docker Compose stack:
130+
```bash
131+
docker compose -f prom-stack.yml -f harvest-compose.yml down ```
132+
- Bring the Docker Compose stack back up:
133+
```bash
134+
docker compose -f prom-stack.yml -f harvest-compose.yml up -d --remove-orphans
135+
```
136+
137+
---
138+
139+
Feel free to adjust the placeholders (`<FSxN_ip_2>`, `<your_secret_2>`, `<your_region>`, `<container_name>`, `<container-port>`) with your specific details.
140+
## Additional Information
141+
142+
143+
---
144+
145+
[1](https://github.com/prometheus-community/yet-another-cloudwatch-exporter): [Yet Another CloudWatch Exporter on GitHub](https://github.com/prometheus-community/yet-another-cloudwatch-exporter)

0 commit comments

Comments
 (0)