Skip to content

Commit

Permalink
cloud cost dashboard: add panel descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 22, 2024
1 parent 1d0dbe4 commit 47b5081
Showing 1 changed file with 55 additions and 17 deletions.
72 changes: 55 additions & 17 deletions grafana-dashboards/cloud-cost-aws.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,31 @@ local var = grafonnet.dashboard.variable;
local common = import "./common.libsonnet";


local totalDailyCosts =
local dailyCosts =
common.tsOptions
+ ts.new("Total daily costs")
+ ts.new("Daily costs")
+ ts.panelOptions.withDescription(
|||
Total daily costs
"Costs account" refers to the associated AWS account's total costs, and
"Costs attributable" refers to the costs that has successfully been
attributed to 2i2c managed cloud infrastructure.
There are some costs associated with 2i2c managed cloud infrastructure
that can't be attributed to it, but they are expected to be small. As an
example, this panel is presenting data that incurred a small cost to ask
for, and that cost is an example of what we fail to attribute and is only
captured in the AWS account's cost.
If "Costs account" is significantly larger than "Cost attributable", it
_should_ be because of activity unrelated to 2i2c managed cloud
infrastructure.
---
**Note**
- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
- All costs are tied to usage and isn't a sum of usage and credits etc.
|||
)
+ ts.queryOptions.withTargets([
Expand All @@ -23,13 +42,18 @@ local totalDailyCosts =
]);


local totalDailyCostsPerHub =
local dailyCostsPerHub =
common.tsOptions
+ ts.new("Total daily costs per hub")
+ ts.new("Daily costs per hub")
+ ts.panelOptions.withDescription(
|||
Total daily costs per hub
|||


---

**Note**

- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
- All costs are tied to usage and isn't a sum of usage and credits etc.
)
+ ts.queryOptions.withTargets([
common.queryTarget
Expand All @@ -39,12 +63,19 @@ local totalDailyCostsPerHub =
]);
local totalDailyCostsPerComponent =
local dailyCostsPerComponent =
common.tsOptions
+ ts.new("Total daily costs per component")
+ ts.panelOptions.withDescription(
|||
Total daily costs per component
---
**Note**
- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
- All costs are tied to usage and isn't a sum of usage and credits etc.
|||
)
+ ts.queryOptions.withTargets([
Expand All @@ -55,12 +86,19 @@ local totalDailyCostsPerComponent =
]);
local totalDailyCostsPerComponentAndHub =
local dailyCostsPerComponentAndHub =
common.tsOptions
+ ts.new("Total daily costs per component, for ${hub}")
+ ts.new("Daily costs per component, for ${hub}")
+ ts.panelOptions.withDescription(
|||
Total daily costs per component, for ${hub}


---

**Note**

- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
- All costs are tied to usage and isn't a sum of usage and credits etc.
|||
)
+ ts.panelOptions.withRepeat("hub")
Expand Down Expand Up @@ -91,10 +129,10 @@ dashboard.new("Cloud cost attribution")
+ dashboard.withPanels(
grafonnet.util.grid.makeGrid(
[
totalDailyCosts,
totalDailyCostsPerHub,
totalDailyCostsPerComponent,
totalDailyCostsPerComponentAndHub
dailyCosts,
dailyCostsPerHub,
dailyCostsPerComponent,
dailyCostsPerComponentAndHub
],
panelWidth=24,
panelHeight=12,
Expand Down

0 comments on commit 47b5081

Please sign in to comment.