Skip to content

Commit ead6695

Browse files
kcantrelgithub-actions[bot]
authored andcommitted
Apply automatic changes
1 parent f45504d commit ead6695

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Monitoring/monitor-ontap-services/cloudformation.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ Resources:
474474
# "matching conditions." It is intended to be run as a Lambda function, but
475475
# can be run as a standalone program.
476476
#
477-
# Version: v2.9
478-
# Date: 2025-04-18-14:59:39
477+
# Version: v2.1
478+
# Date: 2025-04-18-22:22:36
479479
################################################################################
480480
481481
import json
@@ -664,7 +664,7 @@ Resources:
664664
message = f'CRITICAL: Received a non 200 HTTP status code ({response.status}) when trying to access {clusterName}.'
665665
else:
666666
message = f'CRITICAL: Failed to issue API against {clusterName}. Cluster could be down.'
667-
sendAert(message, "CRITICAL")
667+
sendAlert(message, "CRITICAL")
668668
fsxStatus["systemHealth"] = False
669669
changedEvents = True
670670
@@ -877,19 +877,19 @@ Resources:
877877
minutes = seconds // 60
878878
seconds = seconds - (minutes * 60)
879879
880-
str=""
880+
timeStr=""
881881
if days > 0:
882882
plural = "s" if days != 1 else ""
883-
str = f'{days} day{plural} '
883+
timeStr = f'{days} day{plural} '
884884
if hours > 0 or days > 0:
885885
plural = "s" if hours != 1 else ""
886-
str += f'{hours} hour{plural} '
886+
timeStr += f'{hours} hour{plural} '
887887
if minutes > 0 or days > 0 or hours > 0:
888888
plural = "s" if minutes != 1 else ""
889-
str += f'{minutes} minute{plural} and '
889+
timeStr += f'{minutes} minute{plural} and '
890890
plural = "s" if seconds != 1 else ""
891-
str += f'{seconds} second{plural}'
892-
return str
891+
timeStr += f'{seconds} second{plural}'
892+
return timeStr
893893
894894
################################################################################
895895
# This function is used to check SnapMirror relationships.
@@ -960,8 +960,8 @@ Resources:
960960
if lagSeconds > rule["maxLagTime"]:
961961
uniqueIdentifier = record["uuid"] + "_" + key
962962
if not eventExist(events, uniqueIdentifier): # This resets the "refresh" field if found.
963-
str = lagTimeStr(lagSeconds)
964-
message = f'Snapmirror Lag Alert: {sourceClusterName}::{record["source"]["path"]} -> {clusterName}::{record["destination"]["path"]} has a lag time of {lagSeconds} seconds or {str}.'
963+
timStr = lagTimeStr(lagSeconds)
964+
message = f'Snapmirror Lag Alert: {sourceClusterName}::{record["source"]["path"]} -> {clusterName}::{record["destination"]["path"]} has a lag time of {lagSeconds} seconds or {timStr}.'
965965
sendAlert(message, "WARNING")
966966
changedEvents=True
967967
event = {

0 commit comments

Comments
 (0)