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
|SNStopic | The SNS Topic name where CloudWatch will send alerts to. Note that it is assumed that the SNS topic, with the same name, will exist in all the regions where where alarms are to be created.|-s SNS_Topic_Name|
27
+
|SNStopic | The SNS Topic name where CloudWatch will send alerts to. Note that it is assumed that the SNS topic, with the same name, will exist in all the regions where alarms are to be created.|-s SNS_Topic_Name|
28
28
|accountId | The AWS account ID associated with the SNStopic. This is only used to compute the ARN to the SNS Topic.|-a Account_number|
29
29
|customerId| This is really just a comment that will be added to the alarm description.|-c Customer_String|
30
30
|defaultCPUThreshold | This will define the default CPU utilization threshold. You can override the default by having a specific tag associated with the file system. See below for more information.|-C number|
@@ -37,7 +37,7 @@ Here is the list of variables, and what they define:
37
37
As mentioned with the threshold variables, you can create a tag on the specific resource to override the default value set by the associated threshold
38
38
variable. Here is the list of tags and where they should be located:
39
39
40
-
|Tag|Descrption|location|
40
+
|Tag|Description|Location|
41
41
|:---|:------|:---|
42
42
|alarm_threshold | Sets the volume utilization threshold. | Volume |
43
43
|cpu_alarm_threshold| Sets the CPU utilization threshold. | File System |
@@ -46,7 +46,7 @@ variable. Here is the list of tags and where they should be located:
46
46
:bulb:**NOTE:** When the alarm threshold is set to 100, the alarm will not be created. So, if you set the default to 100, then you can selectively add alarms by setting the appropriate tag.
47
47
48
48
### Running on a computer
49
-
To run the program on a computer, you will must have Python installed. You will also need to install the boto3 library.
49
+
To run the program on a computer, you must have Python installed. You will also need to install the boto3 library.
50
50
You can do that by running the following command:
51
51
52
52
```bash
@@ -62,22 +62,22 @@ having to edit the program, you can use the Command Line Option specified in the
62
62
option and the program will display a list of all the available options.
63
63
64
64
You can limit the regions that the program will act on by using the `-r region` option. You can specify that option
65
-
mulitple times to act on multiple regions.
65
+
multiple times to act on multiple regions.
66
66
67
-
You can run the program in "Dry Run" mode by speficying the `-d` (or `--dryRun`) option. This will cause the program to only display
67
+
You can run the program in "Dry Run" mode by specifying the `-d` (or `--dryRun`) option. This will cause the program to only display
68
68
messages showing what it would have done, and not really create or delete any CloudWatch alarms.
69
69
70
70
### Running as a Lambda function
71
71
If you run the program as a Lambda function, you will want to set the timeout to at least two minutes since some of the API calls
72
-
can take a sigificant amount of "clock time" to run, especially in distant regions.
72
+
can take a significant amount of "clock time" to run, especially in distant regions.
73
73
74
74
Once you have installed the Lambda function it is recommended to set up a scheduled type EventBridge rule so the function will run on a regular basis.
75
75
76
76
The appropriate permissions will need to be assigned to the Lambda function in order for it to run correctly.
77
77
It doesn't need many permissions. It just needs to be able to:
78
78
* List the FSx for ONTAP file systems
79
79
* List the FSx volume names
80
-
* List the CloudWatch Alarms
80
+
* List the CloudWatch alarms
81
81
* Create CloudWatch alarms
82
82
* Delete CloudWatch alarms
83
83
* Create CloudWatch Log Groups and Log Streams in case you need to diagnose an issue
@@ -125,10 +125,10 @@ The following permissions are required to run the script (although you could nar
125
125
Once the script has been configured and invoked, it will:
126
126
* Scan for every FSx for ONTAP file systems in every region. For every file system it finds it will:
127
127
* Create a CPU utilization CloudWatch alarm, unless the threshold value is set to 100 for the specific alarm.
128
-
* Create a SSD utilization CloudWatch alarm, unless the threshold value is set to 100 for the specific alarm.
128
+
* Create a SSD utilization CloudWatch alarm, unless the threshold value is set to 100 for the specific alarm.
129
129
* Scan for every FSx for ONTAP volume in every region. For every volume it finds it will:
130
-
* Create a Volume Utilization CloudWatch alarms, unless the threshold value is set to 100 for the specific alarm.
131
-
* Scan for the CloudWatch alarms, and remove any alarms that the associated resource doens't exist anymore.
130
+
* Create a Volume Utilization CloudWatch alarm, unless the threshold value is set to 100 for the specific alarm.
131
+
* Scan for the CloudWatch alarms and remove any alarms that the associated resource doesn't exist anymore.
alarmDescription=f"Volume utilization alarm for volumeId {volumeId}{customerId}, File System Name: {fsName}, Volume Name: {volumeName} in region {region}."
329
329
if(notcontains_alarm(alarmName, alarms)):
330
-
print(f'Adding volume utilization alarm for {volume["Name"]} in region {region}.')
330
+
print(f'Adding volume utilization alarm for {volumeName} in region {region}.')
0 commit comments