Skip to content

Commit ccca4ea

Browse files
committed
pass monitorapp to clean_dashboard
1 parent 5dac94b commit ccca4ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ def create_dashboard(requestInfo):
471471
print (response['DashboardValidationMessages'])
472472

473473

474-
def clean_dashboard():
474+
def clean_dashboard(monitorapp):
475475
cloudwatch = boto3.client("cloudwatch")
476476
dashboard_list = cloudwatch.list_dashboards()
477477
for entry in dashboard_list["DashboardEntries"]:
478-
if APP_NAME in entry["DashboardName"]:
478+
if monitorapp in entry["DashboardName"]:
479479
cloudwatch.delete_dashboards(DashboardNames=[entry["DashboardName"]])
480480

481481
#################################
@@ -757,7 +757,7 @@ def monitor(cheapest=False):
757757
removeClusterIfUnused(monitorcluster, ecs)
758758
# Remove Cloudwatch dashboard if created and cleanup desired
759759
if CREATE_DASHBOARD and CLEAN_DASHBOARD:
760-
clean_dashboard()
760+
clean_dashboard(monitorapp)
761761

762762
#Step 6: Export the logs to S3
763763
logs=boto3.client('logs')

0 commit comments

Comments
 (0)