Skip to content

Commit 797dc5e

Browse files
authored
Handle new ES production 90% CPU alarms in Airflow's alarm toggle (#5245)
1 parent 4a67722 commit 797dc5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

catalog/dags/common/cloudwatch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ def enable_or_disable_alarms(enable):
7070
resource_type="cloudwatch",
7171
)
7272
cw_wrapper = CloudWatchWrapper(cloudwatch.get_conn())
73-
cw_wrapper.enable_alarm_actions("ES Production CPU utilization above 50%", enable)
74-
cw_wrapper.enable_alarm_actions("ES Prod CPU utilization above 90%", enable)
73+
for percentage in [50, 90]:
74+
cw_wrapper.enable_alarm_actions(
75+
f"ES Production CPU utilization above {percentage}%", enable
76+
)

0 commit comments

Comments
 (0)