Skip to content

Commit

Permalink
Change documentation for cost dashboard creation
Browse files Browse the repository at this point in the history
Close #17
  • Loading branch information
mhuguesaws committed May 22, 2024
1 parent 8ce291e commit eff112d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Amazon Managed Grafana since version 9.4 comes with Prometheus and Cloudwatch pl
1. On the **Default Region** menu, choose your **AWS Region**.
1. Choose **Save & test**.

#### 3. Add Amazon Athena Data source
#### 3. Add Amazon Athena Data source for Job metrics

Before starting, you will retrieve the S3 bucket name created to store the AWS Batch jobs data through Amazon Athena.

Expand Down Expand Up @@ -206,7 +206,39 @@ In the Amazon Managed Grafana dashboard:
1. On the **Output Location** menu, copy paste the bucket value **s3://DOC-EXAMPLE-BUCKET**.
1. Choose **Save & test**.

#### 4. Create AWS Batch job metrics dashboard

#### 4. Add Amazon Athena Data source for Cost

Before starting, you will retrieve the S3 bucket name created to store the AWS Batch jobs data through Amazon Athena.

In a terminal:

```bash
sam list stack-outputs --stack-name ${BATCH_DASHBOARD_NAME} \
--output json | \
jq -r '.[] | select(.OutputKey=="AthenaSpillBucket") | .OutputValue'
```

Copy the output that you will use in the setup of Amazon Athena data source in Amazon Managed Grafana.

In the Amazon Managed Grafana dashboard:

1. Select the **hamburger** menu on the left pane.<br/>
1. Expand **Administration**<br/>
<img alt="Grafana Data sources" src="docs/images/grafana-data-sources.png" width="30%" height="30%"> <br />
1. Choose **Data sources**.
1. Choose **Add new data source**.
1. Choose **Amazon Athena**.<br />
<img alt="Grafana athena" src="docs/images/grafana-athena-cost.png" width="50%" height="50%"> <br />
1. For **Name**, enter your **Amazon Athena Cost Data**.
1. On the **Default Region** menu, choose your **AWS Region**.
1. On the **Data source** menu, choose **AwsDataCatalog**.
1. On the **Database** menu, choose **athenacurcfn_a_w_s_batch_cost_report**.
1. On the **Workgroup** menu, choose **primary**.
1. On the **Output Location** menu, copy paste the bucket value **s3://DOC-EXAMPLE-BUCKET**.
1. Choose **Save & test**.

#### 5. Create AWS Batch job metrics dashboard

To create a dashboard in Amazon Managed Grafana for AWS Batch, you will start from the template provided in this repository to generate dashboard for your environment.

Expand Down Expand Up @@ -240,7 +272,7 @@ You will be redirected to the dashboard you imported.
Once you will have your first AWS Batch jobs running.
You will be able to see the data associated with it in the dashboard.

#### 5. Create AWS Batch compute cost dashboard
#### 6. Create AWS Batch compute cost dashboard

Similar to step 3, you will import an template dashboard in Amazon Managed Grafana for AWS Batch that covers Amazon EC2 compute cost.
You can see an example below.
Expand All @@ -253,7 +285,7 @@ To import the dashboard in Amazon Managed Grafana:
1. Choose **Upload JSON file**, select the `batch-grafana-cost-dashboard.json` file.
1. Choose **Load**.
1. Select the **Athena** and **CloudWatch** data sources your created previously.
<img alt="Grafana import dashboard" src="docs/images/grafana-dashboard-import.png" width="60%" height="60%"> <br />
<img alt="Grafana import dashboard" src="docs/images/grafana-dashboard-import-cost.png" width="60%" height="60%"> <br />
1. Choose **Import**.

You will be redirected to the dashboard you imported.
Expand Down
Binary file added docs/images/grafana-athena-cost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/grafana-dashboard-import-cost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eff112d

Please sign in to comment.