From 89d7a246be15f47b375a9329d4a323605484ee35 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 7 Oct 2024 12:11:20 +0200 Subject: [PATCH] cloud cost dashboard: fix quote in folder name and ensure ensure uid mentions aws --- deployer/commands/grafana/deploy_dashboards.py | 6 +++--- .../{cost-attribution.jsonnet => cloud-cost-aws.jsonnet} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename grafana-dashboards/{cost-attribution.jsonnet => cloud-cost-aws.jsonnet} (98%) diff --git a/deployer/commands/grafana/deploy_dashboards.py b/deployer/commands/grafana/deploy_dashboards.py index 8ceb31ed25..6f5614fb09 100644 --- a/deployer/commands/grafana/deploy_dashboards.py +++ b/deployer/commands/grafana/deploy_dashboards.py @@ -56,14 +56,14 @@ def deploy_dashboards( ) if cluster_provider == "aws": - print_colour("Deploying cost attribution dashboards to an AWS cluster...") + print_colour("Deploying cloud cost dashboards to an AWS cluster...") subprocess.check_call( [ "./deploy.py", grafana_url, "--dashboards-dir=../grafana-dashboards", - "--folder-name='Cost Attribution Dashboards'", - "--folder-uid=aws-ce-grafana-backend", + "--folder-name=Cloud cost dashboards", + "--folder-uid=cloud-cost", ], env=deploy_script_env, cwd="jupyterhub-grafana-dashboards", diff --git a/grafana-dashboards/cost-attribution.jsonnet b/grafana-dashboards/cloud-cost-aws.jsonnet similarity index 98% rename from grafana-dashboards/cost-attribution.jsonnet rename to grafana-dashboards/cloud-cost-aws.jsonnet index a7bb61a17f..0b23e84454 100644 --- a/grafana-dashboards/cost-attribution.jsonnet +++ b/grafana-dashboards/cloud-cost-aws.jsonnet @@ -94,7 +94,7 @@ local totalDailyCostsPerComponentAndHub = // grafonnet ref: https://grafana.github.io/grafonnet/API/dashboard/index.html dashboard.new("Cloud cost attribution") -+ dashboard.withUid("cloud-cost-attribution") ++ dashboard.withUid("cloud-cost-aws") + dashboard.withTimezone("utc") + dashboard.withEditable(true) + dashboard.time.withFrom("now-30d")