Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
5893c690
Commit
5893c690
authored
Jan 11, 2018
by
Joseph Mulloy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent reconfiguring alarms OPS-2545
parent
15cf6656
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
util/jenkins/check-celery-queues.py
+8
-3
No files found.
util/jenkins/check-celery-queues.py
View file @
5893c690
...
...
@@ -129,9 +129,14 @@ def check_queues(host, port, environment, deploy, max_metrics, threshold,
treat_missing_data
=
"missing"
statistic
=
"Maximum"
actions
=
[
sns_arn
]
alarm_name
=
"{} queue length over threshold"
.
format
(
queue
)
# Always create/configure alert to keep config up to date
alarm_name
=
"{}-{} {} queue length over threshold"
.
format
(
environment
,
deploy
,
queue
)
if
len
(
cloudwatch
.
describe_alarms_for_metric
(
Namespace
=
namespace
,
MetricName
=
metric_name
,
Dimensions
=
dimensions
)
[
'MetricAlarms'
])
<
1
:
print
(
'Creating new alarm "{}"'
.
format
(
alarm_name
))
cloudwatch
.
put_metric_alarm
(
AlarmName
=
alarm_name
,
AlarmDescription
=
alarm_name
,
Namespace
=
namespace
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment