You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Monitoring/monitor-ontap-services/README.md
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,20 +54,18 @@ To install the program using the CloudFormation template, you will need to do th
54
54
|Parameter Name | Notes|
55
55
|---|---|
56
56
|Stackname|The name you want to assign to the CloudFormation stack. Note that this name is used as a base name for the resources it creates, so please keep it under 25 characters.|
57
-
|BucketRegion|The region where you want the S3 bucket, that is used to store event information and the matching conditions file, to reside.|
58
57
|OntapAdminServer|The DNS name, or IP address, of the management endpoint of the FSxN file system you wish to monitor.|
59
-
|VpcId|The VPC ID that the Lambda function will run in. Note that since the Lambda function has to communicate with the FSxN file server, it has to run in a VPC that can communicate with FSxN file server you want to monitor.|
60
-
|SubnetIds|The subnet IDs that the Lambda function will be attached to. These must be in the VPC specified above.|
61
-
|SecurityGroupIds|The security group IDs that the Lambda function will be attached to. These must be in the VPC specified above.|
58
+
|SubnetIds|The subnet IDs that the Lambda function will be attached to. Must have connectivity to the FSxN file system you wish to monitor.|
59
+
|SecurityGroupIds|The security group IDs that the Lambda function will be attached to.|
62
60
|SnsTopicArn|The ARN of the SNS topic you want the program to publish alert messages to.|
63
-
|SnsRegion|The region where the SNS topic resides.|
64
-
|SecretArn|The ARN of the secret within the AWS Secrets Manager that holds the FSxN file system credentials.|
65
-
|SecretRegion|The region where the secret is stored.|
61
+
|SecretArn|The ARN of the secret within the AWS Secrets Manager that holds the FSxN file system credentials. **NOTE:** The secret must be in the same region as the FSxN file system.|
66
62
|SecretUsernameKey|The key name within the secret that holds the username portion of the FSxN file system credentials.|
67
63
|SecretPasswordKey|The key name within the secret that holds the password portion of the FSxN file system credentials.|
68
64
|CreateSNSEndpoint|Set to "true" if you want to create an SNS endpoint. Since the Lambda function will be running within your VPC it will most likely not have access to the Internet, therefore a endpoint will need to be created if you don't already have one. Please read the [Endpoints for AWS services](#endpoints-for-aws-services) for more information.|
69
65
|CreateSecretsManagerEndpoint|Set to "true" if you want create a Secrets Manager endpoint. Please read the [Endpoints for AWS services](#endpoints-for-aws-services) for more information.|
70
66
|CreateS3Endpoint|Set to "true" if you want create an S3 endpoint. Note that this will be a "Gateway" type endpoint, since they are free to use. Please read the [Endpoints for AWS services](#endpoints-for-aws-services) for more information.|
67
+
|RoutetableIds|The route table IDs to update to use the S3 endpoint. Since the S3 endpoint is of type 'Gateway' route tables have to be updated to use it. This parameter is only needed if createS3Endpoint is set to 'true'.|
68
+
|VpcId|The VPC ID where the FSxN file system is located. This is only needed if you are creating an endpoint.|
71
69
|CheckInterval|The interval, in minutes, that the EventBridge schedule will trigger the Lambda function. The default is 15 minutes.|
72
70
73
71
The remaining parameters are used to create the matching conditions file, which specify when the program will send an SNS alert.
@@ -76,24 +74,24 @@ so you don't have to set them if you don't want to. Note that if you enable EMS
76
74
send all EMS messages that have a severity of `Error`, `Alert` or `Emergency`. You can change the
77
75
matching conditions at any time by updating the matching conditions file that is created in the S3 bucket.
78
76
The name of the file will be \<OntapAdminServer\>-conditions where "\<OntapAdminServer\>" is the value you
79
-
set for the OntapAdminServer parameter.
80
-
81
-
To find the name of the bucket, or any of the resources that were created, you can go to the CloudFormation service
82
-
in the AWS console, click on the stack you created (based on the name you provided as the first parameter above),
83
-
and then click on the "Resources" tab.
77
+
set for the OntapAdminServer parameter. To find the name of the S3 bucket, or any of the resources that were
78
+
created, you can go to the CloudFormation service in the AWS console, click on the stack you created
79
+
(based on the name you provided as the first parameter above), and then click on the "Resources" tab.
84
80
81
+
### Post Installation Checks
85
82
After the stack has been created, I would recommend checking the status of the Lambda function to make sure it is
86
-
not in an error state. To find the Lambda function, as mentioned above, go to the Resources tab of the CloudFormation
83
+
not in an error state. To find the Lambda function go to the Resources tab of the CloudFormation
87
84
stack and click on the "Physical ID" of the Lambda function. This should bring you to the Lambda service in the AWS
88
85
console. Once there, you can click on the "Monitoring" tab to see if the function has been invoked. Locate the
89
-
"Error count and success rate(%)" chart, which is usually found at the top right corner of the dashboard. Within the "CheckInterval" number
90
-
of minutes there should be at least one dot on that chart. Note that sometimes the chart is initially slow to reflect any
91
-
status so you might have to be patient, and continue to press the "refresh" button (the icon with
92
-
a circle on it) to see an status. Once you see a dot on the chart, when you hover you mouse over it, you should see the "success
93
-
rate" and "number of errors." The success rate should be 100% and the number of errors should be 0. If it is not,
94
-
then scroll down to the CloudWatch Logs section and click on the most recent log stream. This will show you the
95
-
output of the Lambda function. If there are any errors, they will be displayed there. If you can't figure out
96
-
what the error is, then please create an issue in this repository and someone will help you.
86
+
"Error count and success rate(%)" chart, which is usually found at the top right corner of the monitoring dashboard.
87
+
Within the "CheckInterval" number of minutes there should be at least one dot on that chart. Note that sometimes
88
+
the chart is initially slow to reflect any status so you might have to be patient, and continue to press the "refresh"
89
+
button (the icon with a circle on it) to see an status. Once you see a dot on the chart, when you hover you mouse
90
+
over it, you should see the "success rate" and "number of errors." The success rate should be 100% and the number
91
+
of errors should be 0. If it is not, then scroll down to the CloudWatch Logs section and click on the most recent
92
+
log stream. This will show you the output of the Lambda function. If there are any errors, they will be displayed
93
+
there. If you can't figure out what the error is, then please create an issue in this repository and someone will
94
+
help you.
97
95
98
96
### Manual Installation
99
97
If you want more control over the installation then you can install it manually by following the steps below. Note that these
@@ -133,10 +131,14 @@ overwrite the event files of another instance.
133
131
134
132
This bucket is also used to store the Matching Condition file. You can read more about it in the [Matching Conditions File](#matching-conditions-file) below.
135
133
134
+
**Note:** This bucket must be in the same region as the FSxN file system.
135
+
136
136
#### Create an SNS Topic
137
137
Since the way this program sends alerts is via an SNS topic, you need to either create SNS topic, or use an
138
138
existing one.
139
139
140
+
**Note:** This SNS topic must be in the same region as the FSxN file system.
141
+
140
142
#### Endpoints for AWS Services
141
143
If you deploy this as a Lambda function, you will have to attach it to the VPC that your FSx file system resides
142
144
in so it can run ONTAP APIs against it. When you do that, it is likely that Lambda function will not have access the
@@ -163,8 +165,8 @@ them to the "local" DNS name of the respective endpoints.
163
165
#### Lambda Function
164
166
There are a few things you need to do to properly configure the Lambda function.
165
167
- Give it the permissions listed above.
166
-
- Put it in a VPC and subnet that has access to the FSxN file system management endpoint.
167
-
- Increase the total run time to at least 10 seconds. You might have to raise that if you have a lot of components in your FSxN file system. However, if you have to raise it to more than a minute, it could be an issue with the endpoint causing the calls to the AWS services to hang. See the [Endpoints for AWS Services](#endpoints-for-aws-services) section above for more information.
168
+
- Put it in a VPC and subnet that has access to the FSxN file system management endpoint.**NOTE:** It must be in the same region as the FSxN file system.
169
+
- Increase the total run time to at least 20 seconds. You might have to raise that if you have a lot of components in your FSxN file system. However, if you have to raise it to more than a minute, it could be an issue with the endpoint causing the calls to the AWS services to hang. See the [Endpoints for AWS Services](#endpoints-for-aws-services) section above for more information.
168
170
- Provide for the base configuration via environment variables and/or a configuration file. See the [Configuration Parameters](#configuration-parameters) section below for more information.
169
171
- Create the "Matching Conditions" file, that specifies when the Lambda function should send alerts. See the [Matching Conditions File](#matching-conditions-file) section below for more information.
170
172
- Set up an EventBridge Schedule rule to trigger the function on a regular basis.
Copy file name to clipboardExpand all lines: Monitoring/monitor-ontap-services/cloudformation.yaml
+22-35Lines changed: 22 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,18 @@ Metadata:
7
7
- Label:
8
8
default: "Configuration Parameters"
9
9
Parameters:
10
-
- s3BucketRegion
11
10
- OntapAdminSever
12
-
- vpcId
13
11
- subNetIds
14
12
- securityGroupIds
15
13
- snsTopicArn
16
-
- snsTopicRegion
17
14
- secretArn
18
-
- secretRegion
19
15
- secretUsernameKey
20
16
- secretPasswordKey
21
17
- createSecretManagerEndpoint
22
18
- createSNSEndpoint
23
19
- createS3Endpoint
20
+
- routeTableIds
21
+
- vpcId
24
22
- checkInterval
25
23
- Label:
26
24
default: "Alert Parameters"
@@ -40,21 +38,11 @@ Metadata:
40
38
- inodeQuotaUtilizationAlert
41
39
42
40
Parameters:
43
-
s3BucketRegion:
44
-
Description: "The region where you want the S3 bucket to be created."
45
-
Type: String
46
-
Default: ""
47
-
48
41
OntapAdminSever:
49
42
Description: "The DNS name, or IP address, of the management endpoint of the FSxN file system to be monitored."
50
43
Type: String
51
44
Default: ""
52
45
53
-
vpcId:
54
-
Description: "The VPC ID where the FSxN file system is located."
55
-
Type: "AWS::EC2::VPC::Id"
56
-
Default: ""
57
-
58
46
subNetIds:
59
47
Description: "The subnet IDs where the FSxN file system is located."
60
48
Type: "List<AWS::EC2::Subnet::Id>"
@@ -70,21 +58,11 @@ Parameters:
70
58
Type: String
71
59
Default: ""
72
60
73
-
snsTopicRegion:
74
-
Description: "The region where SNS topic resides."
75
-
Type: String
76
-
Default: ""
77
-
78
61
secretArn:
79
62
Description: "The ARN of the secret that holds the FSxN credentials to use."
80
63
Type: String
81
64
Default: ""
82
65
83
-
secretRegion:
84
-
Description: "The region where the secret resides."
85
-
Type: String
86
-
Default: ""
87
-
88
66
secretUsernameKey:
89
67
Description: "The key in the secret that holds the username."
90
68
Type: String
@@ -113,6 +91,16 @@ Parameters:
113
91
Default: "false"
114
92
AllowedValues: ["true", "false"]
115
93
94
+
routeTableIds:
95
+
Description: "The route table IDs to update to use the S3 endpoint. Since the S3 endpoint is of type 'Gateway' route tables have to be updated to use it. This parameter is only needed if createS3Endpoint is set to 'true'."
96
+
Type: CommaDelimitedList
97
+
Default: ""
98
+
99
+
vpcId:
100
+
Description: "The VPC ID where the FSxN file system is located. This is only needed if you are creating an endpoint."
101
+
Type: "AWS::EC2::VPC::Id"
102
+
Default: ""
103
+
116
104
checkInterval:
117
105
Description: "The interval, in minutes, between checks."
0 commit comments