Skip to content

Commit

Permalink
Add readme to grafana-dashboards dir
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 21, 2024
1 parent 3623159 commit f87b3d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions grafana-dashboards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# About these grafana dashboard files

These are dashboard definitions as jsonnet templates. They are deployed using a
Python script from https://github.com/jupyterhub/grafana-dashboard, which can be
done via the deployer command:

```bash
deployer grafana deploy-dashboards $CLUSTER_NAME
```

Running this command has a pre-requisite that you have jsonnet installed,
specifically the jsonnet binary built using golang called go-jsonnet.

To just render the jsonnet templates, which is relevant during development, you
can:

1. Clone https://github.com/jupyterhub/grafana-dashboard somewhere
2. Go to that folder, and then run something like:
```bash
jsonnet -J vendor /some/path/2i2c-org/infrastructure/grafana-dashboards/cloud-cost-aws.jsonnet
```
5 changes: 5 additions & 0 deletions grafana-dashboards/cloud-cost-aws.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ local totalDailyCostsPerComponentAndHub =


// grafonnet ref: https://grafana.github.io/grafonnet/API/dashboard/index.html
//
// A dashboard description can be provided, but isn't used much it seems, due to
// that we aren't providing one atm.
// See https://community.grafana.com/t/dashboard-description-is-it-used-anywhere/53273.
//
dashboard.new("Cloud cost attribution")
+ dashboard.withUid("cloud-cost-aws")
+ dashboard.withTimezone("utc")
Expand Down

0 comments on commit f87b3d4

Please sign in to comment.