Skip to content

Commit eff112d

Browse files
committed
Change documentation for cost dashboard creation
Close #17
1 parent 8ce291e commit eff112d

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Amazon Managed Grafana since version 9.4 comes with Prometheus and Cloudwatch pl
176176
1. On the **Default Region** menu, choose your **AWS Region**.
177177
1. Choose **Save & test**.
178178

179-
#### 3. Add Amazon Athena Data source
179+
#### 3. Add Amazon Athena Data source for Job metrics
180180

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

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

209-
#### 4. Create AWS Batch job metrics dashboard
209+
210+
#### 4. Add Amazon Athena Data source for Cost
211+
212+
Before starting, you will retrieve the S3 bucket name created to store the AWS Batch jobs data through Amazon Athena.
213+
214+
In a terminal:
215+
216+
```bash
217+
sam list stack-outputs --stack-name ${BATCH_DASHBOARD_NAME} \
218+
--output json | \
219+
jq -r '.[] | select(.OutputKey=="AthenaSpillBucket") | .OutputValue'
220+
```
221+
222+
Copy the output that you will use in the setup of Amazon Athena data source in Amazon Managed Grafana.
223+
224+
In the Amazon Managed Grafana dashboard:
225+
226+
1. Select the **hamburger** menu on the left pane.<br/>
227+
1. Expand **Administration**<br/>
228+
<img alt="Grafana Data sources" src="docs/images/grafana-data-sources.png" width="30%" height="30%"> <br />
229+
1. Choose **Data sources**.
230+
1. Choose **Add new data source**.
231+
1. Choose **Amazon Athena**.<br />
232+
<img alt="Grafana athena" src="docs/images/grafana-athena-cost.png" width="50%" height="50%"> <br />
233+
1. For **Name**, enter your **Amazon Athena Cost Data**.
234+
1. On the **Default Region** menu, choose your **AWS Region**.
235+
1. On the **Data source** menu, choose **AwsDataCatalog**.
236+
1. On the **Database** menu, choose **athenacurcfn_a_w_s_batch_cost_report**.
237+
1. On the **Workgroup** menu, choose **primary**.
238+
1. On the **Output Location** menu, copy paste the bucket value **s3://DOC-EXAMPLE-BUCKET**.
239+
1. Choose **Save & test**.
240+
241+
#### 5. Create AWS Batch job metrics dashboard
210242

211243
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.
212244

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

243-
#### 5. Create AWS Batch compute cost dashboard
275+
#### 6. Create AWS Batch compute cost dashboard
244276

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

259291
You will be redirected to the dashboard you imported.
238 KB
Loading
162 KB
Loading

0 commit comments

Comments
 (0)