File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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' )
You can’t perform that action at this time.
0 commit comments