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/auto-add-cw-alarms/README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,11 @@ There are two ways you can invoke this script (Python program). Either from a co
18
18
as a Lambda function.
19
19
20
20
### Configuring the program
21
-
Before you can run the program you will need to configure it. You can configure it two ways. Either by editing the top part of the program itself,
22
-
where there are the following variable definitions, or if you are running it as a standalone program, via some command line options.
21
+
Before you can run the program you will need to configure it. You can configure it a few ways:
22
+
* By editing the top part of the program itself where there are the following variable definitions.
23
+
* By setting environment variables.
24
+
* If running it as a standalone program, via some command line options.
25
+
23
26
Here is the list of variables, and what they define:
24
27
25
28
| Variable | Description |Command Line Option|
@@ -34,14 +37,21 @@ Here is the list of variables, and what they define:
34
37
|alarmPrefixSSD | This defines the string that will be put in front of the name of every SSD utilization CloudWatch alarm that the program creates. Having a known prefix is how it knows it is the one maintaining the alarm.|N/A|
35
38
|alarmPrefixVolume | This defines the string that will be put in front of the name of every volume utilization CloudWatch alarm that the program creates. Having a known prefix is how it knows it is the one maintaining the alarm.|N/A|
36
39
40
+
There are a few command line options that don't have a corresponding variables:
41
+
|Option|Description|
42
+
|:-----|:----------|
43
+
|-r region| This option can be specified multiple times to limit the regions that the program will act on. If not specified, the program will act on all regions.|
44
+
|-d| This option will cause the program to run in "Dry Run" mode. In this mode, the program will only display messages showing what it would have done, and not really create or delete any CloudWatch alarms.|
45
+
|-F filesystem\_ID| This option will cause the program to only add or remove alarms that are associated with the filesystem\_ID.|
46
+
37
47
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
48
variable. Here is the list of tags and where they should be located:
39
49
40
50
|Tag|Description|Location|
41
51
|:---|:------|:---|
42
-
|alarm_threshold| Sets the volume utilization threshold. | Volume |
43
-
|cpu_alarm_threshold| Sets the CPU utilization threshold. | File System |
44
-
|ssd_alarm_threshold| Sets the SSD utilization threshold. | File System |
52
+
|alarm\_threshold| Sets the volume utilization threshold. | Volume |
53
+
|cpu\_alarm\_threshold| Sets the CPU utilization threshold. | File System |
54
+
|ssd\_alarm\_threshold| Sets the SSD utilization threshold. | File System |
45
55
46
56
: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.
0 commit comments