Skip to content

Commit c961194

Browse files
committed
Refactor Usage monitoring section
1 parent 25d9169 commit c961194

File tree

5 files changed

+68
-67
lines changed

5 files changed

+68
-67
lines changed

admin/howto/monitoring/cost-attribution.md

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ The dashboard is made of several panels:
2525
:alt: A line graph showing daily cloud costs over a 1 month period.
2626
:::
2727

28-
"Cost account" refers to the associated AWS account's total costs, and "Cost attributable" refers to the costs that has successfully been attributed to 2i2c managed cloud infrastructure.
28+
*Cost account* refers to the associated AWS account's *total* costs, and *Cost attributable* refers to the costs that have been *attributed* to 2i2c managed cloud infrastructure.
2929

30-
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.
30+
There are some costs associated with 2i2c managed cloud infrastructure that can't be attributed. For example, the act of loading the Cloud Cost dashboard itself incurs a cost that isn't attributed to 2i2c managed cloud infrastructure but forms a small part of the total cost.
3131

32-
If "Cost account" is significantly larger than "Cost attributable", it should be because of activity unrelated to 2i2c managed cloud infrastructure.
32+
If *Cost account* is significantly larger than *Cost attributable*, then in principle this should be because of activity unrelated to 2i2c managed cloud infrastructure. Please contact [support](/support.md) if you have any questions about understanding your cloud costs.
3333

34-
Note:
34+
:::{note}
3535

3636
- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
37-
- All costs are pure usage costs, and doesn't consider credits etc.
37+
- All costs are pure usage costs, and doesn't account for credits etc.
38+
:::
3839

3940
### Daily costs per hub
4041

@@ -44,63 +45,32 @@ Note:
4445

4546
Costs can sometimes be attributed to a specific hub, and that can then be seen here. A typical 2i2c-managed deployment comprises of a staging hub and a production hub, although some other communities may have extra hubs such as a workshop hub.
4647

47-
"Cost shared" reflect all 2i2c cloud infrastructure attributable costs that aren't attributable to a specific hub.
48-
49-
For hub specific cost attribution, the underlying cloud infrastructure needs to setup to be hub specific. Currently compute, home storage, and object storage can be setup for specific hubs, but isn't unless explicitly requested.
50-
51-
Note:
52-
53-
- Hub refers to a deployment of a JupyterHub and related services within a Kubernetes namespace.
54-
- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
55-
- All costs are pure usage costs, and doesn't consider credits etc.
48+
*Cost support* reflects all 2i2c cloud infrastructure support costs that aren't attributable to a specific hub.
5649

5750
### Total daily costs per component
5851

5952
:::{figure} images/cost-attribution-component.png
60-
:alt: A line graph showing daily cloud costs per component over a 1 month period.
53+
:alt: A time series showing daily cloud costs per component over a 1 month period.
6154
:::
6255

63-
Components are human friendly groupings of AWS services, defined as:
56+
Components are groupings of cloud-provided services, such as
6457

65-
- backup: AWS Backup
66-
- compute: EC2 – Other, Amazon Elastic Compute Cloud
67-
- fixed: Amazon Elastic Container Service for Kubernetes
68-
- home storage: Amazon Elastic File System
69-
- networking: Amazon Elastic Load Balancing, Amazon Virtual Private Cloud
70-
- object storage: Amazon Simple Storage Service
58+
- compute
59+
- home storage
60+
- object storage
61+
- networking
62+
- support
7163

72-
Note:
73-
74-
- All costs are [unblended costs](https://aws.amazon.com/blogs/aws-cloud-financial-management/understanding-your-aws-cost-datasets-a-cheat-sheet/)
75-
- All costs are pure usage costs, and doesn't consider credits etc.
64+
For specific definitions, see [https://github.com/2i2c-org/jupyterhub-cost-monitoring/blob/2a810989bb1c1685277d2574d3b76e673bc6e5ad/src/jupyterhub_cost_monitoring/const_cost_aws.py#L11](https://github.com/2i2c-org/jupyterhub-cost-monitoring/blob/2a810989bb1c1685277d2574d3b76e673bc6e5ad/src/jupyterhub_cost_monitoring/const_cost_aws.py#L11).
7665

7766
### Daily costs per component per hub
7867

7968
:::{figure} images/cost-attribution-component-per-hub.png
80-
:alt: A line graph showing daily cloud costs per component per hub over a 1 month period.
69+
:alt: A time series showing daily cloud costs per component per hub over a 1 month period.
8170
:::
8271

83-
The same as above but broken down for each specific hub.
72+
This panel shows the same information as above, but broken down for each specific hub also.
8473

85-
## Sharing cost reports
74+
## Sharing and reporting Grafana dashboards
8675

87-
The dashboard can be shared with other community members and stakeholders so they can understand usage and cost patterns. Community Champions can export data to a CSV file, generate a snapshot of the Grafana dashboard and share a public link, or [Progamatically accessing Prometheus data](prometheus-access) themselves.
88-
89-
### Generate a CSV file
90-
91-
1. Click on the three dots {material-regular}`more_vert`, in the top-right corner of the panel you wish to generate a CSV file for.
92-
1. From the dropdown menu select *{octicon}`info` Inspect > Data*.
93-
1. Click on the {bdg-primary}`Download CSV` button to download the data as a CSV file.
94-
95-
### Share a snapshot of the dashboard or panel
96-
97-
This function is available to Grafana admins only. A snapshot is a frozen view of data that can with others without the need to login with a Grafana account.
98-
99-
1. If you wish to share the *entire dashboard*, click on the {bdg-primary}`Share` button to the left of the time-range selector.
100-
1. If you wish to share a *single panel*, click on the three dots {material-regular}`more_vert`, in the top-right corner of a panel. From the dropdown menu select *Share*.
101-
1. From the pop-up *Share Panel* dialog, select the *Snapshot* tab and fill out the details.
102-
1. Click the {bdg-primary}`Publish Snapshot` button to generate a public link that you can share with others.
103-
104-
:::{figure} images/cost-attribution-snapshot.png
105-
:alt: Snapshot of the share panel dialog, with Snapshot name, Expire and Timeout fields.
106-
:::
76+
See [Sharing and reporting Grafana dashboards](reporting) for how to share and generate reports from Grafana dashboards.

admin/howto/monitoring/cost-users.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
![Grafana dashboard with multiple panels showing stacked bar charts of user cloud costs over time.](https://raw.githubusercontent.com/2i2c-org/jupyterhub-cost-monitoring/refs/heads/main/images/dashboard.png)
44

5+
:::{note}
6+
Available for dedicated AWS clusters only. Other deployments on GCP will be supported in the future.
7+
:::
8+
59
## Navigate to the *Cloud costs per user* dashboard
610

711
From the Grafana homepage, navigate to *Home > Dashboards > Cloud cost dashboards* and then click on *Cloud costs per user*.
@@ -31,14 +35,6 @@ You can interact with the dashboard in several ways:
3135
Some interactions may re-trigger additional queries to fetch data, so there may be a slight delay while the graph is updated.
3236
:::
3337

34-
## Export data
35-
36-
You can export the data from any panel by clicking on the panel menu in the top right corner, then selecting *Inspect > Data*. From there, you can view the raw data and export it in various formats, such as CSV or JSON.
37-
38-
## Resources
39-
40-
Grafana is a powerful open source data visualization tool with many features. For more information on how to use Grafana, refer to the [Grafana documentation](https://grafana.com/docs/grafana/latest/).
41-
42-
## Feedback and support
38+
## Sharing and reporting Grafana dashboards
4339

44-
If you have any feedback or suggestions on what works well or how you would like to improve the dashboard design, [let us know](https://github.com/2i2c-org/jupyterhub-cost-monitoring/issues/new)!
40+
See [Sharing and reporting Grafana dashboards](reporting) for how to share and generate reports from Grafana dashboards.

admin/howto/monitoring/grafana-dashboards.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
Grafana dashboards are only available to communities on **dedicated** clusters. If a community is on a shared cluster and would like to discuss transitioning, please contact [[email protected]](mailto:[email protected]).
55
:::
66

7-
To discover the URL to the Grafana dashboard, use the [List of Running Hubs](https://infrastructure.2i2c.org/reference/hubs/) table. This table also shows which cluster each hub is running on.
7+
To find the URL to the Grafana dashboard for your community, use the [List of Running Hubs](https://infrastructure.2i2c.org/reference/hubs/) table.
88

99
Note that data is retained for up to 3 years on 2i2c hubs.
1010

1111
## Getting a Grafana account
1212

13-
During the hub deployment process, 2i2c engineering will send the Hub Champions an email with an invitation link to Grafana to allow them to create an account. **This invite link only lasts for seven days;** and is unique to the recipient's email address. If a new invite link is required please contact [support](support:email) to request a new invite link.
13+
During the hub deployment process, 2i2c engineering will send Hub Champions an email with an invitation link to Grafana to create an account. **This invite link expires after seven days;** and is unique to the recipient's email address. If a new invite link is required please contact [support](support:email).
1414

1515
:::{figure} images/grafana-invite.png
1616
:alt: Screenshot of a form containing fields for email, name, username and password.
17-
The Grafana website after clicking invitation link.
17+
The Grafana website after clicking the invite link.
1818
:::
1919

20-
This Grafana account is separate from the account used to log into JupyterHub. This new account has administrative privileges and will allow Hub Champions to invite others to have access to Grafana as admins or viewers for the community. See the [instructions](https://infrastructure.2i2c.org/sre-guide/support/grafana-account) for how to invite others to join Grafana.
20+
This Grafana account is *separate* from the account used to log into JupyterHub. This new account has administrative privileges and will allow Hub Champions to invite others to access Grafana with admin or viewer roles. See the [instructions](https://infrastructure.2i2c.org/sre-guide/support/grafana-account) for how to invite others to join Grafana.
2121

2222
## Using Grafana for your JupyterHub
2323

@@ -26,10 +26,14 @@ This Grafana account is separate from the account used to log into JupyterHub. T
2626
The "Activity" Grafana dashboard.
2727
:::
2828

29-
There is work-in-progress documentation available about what each dashboard or panel represents in the upstream [JupyterHub Grafana](https://jupyterhub-grafana.readthedocs.io/en/latest/) project. You can also hover over the {octicon}`info` icon in the top-right corner of each panel for more information.
29+
There is work-in-progress documentation available about what each dashboard or panel represents in the upstream [JupyterHub Grafana Dashboards](https://jupyterhub-grafana.readthedocs.io/en/latest/) project. You can also hover over the {octicon}`info` icon in the top-right corner of each panel for more information.
3030

3131
## Making changes to Grafana dashboards
3232

33-
Changes to the `JupyterHub dashboard` directory will not persist. If changes are required on a persistent basis, we encourage you to contribute to the upstream [jupyterhub/grafana-dashboards](https://github.com/jupyterhub/grafana-dashboards) project.
33+
If you make any changes to the pre-configured dashboards in the *JupyterHub Default Dashboards* and *Cloud Cost Dashboards* folders, then they will not be saved.
3434

35-
Hub Champions are welcome to create their own custom dashboards and panel in a separate directory, but the configuration will not be backed up.
35+
We encourage you to create new dashboards outside of these folders (however the configurations will not be backed up), or even contribute to the upstream [https://github.com/jupyterhub/grafana-dashboards](https://github.com/jupyterhub/grafana-dashboards) project.
36+
37+
## Resources
38+
39+
Grafana is a powerful open source data visualization tool with many features. For more information on how to use Grafana, refer to the [Grafana documentation](https://grafana.com/docs/grafana/latest/).

admin/howto/monitoring/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ This section describes how to monitor the usage of your hub. Note that not all f
55
```{toctree}
66
:maxdepth: 1
77
grafana-dashboards
8-
prometheus-access
98
cost-attribution
109
cost-users
10+
reporting
11+
prometheus-access
1112
```
13+
14+
## Feedback and support
15+
16+
If you have any feedback or suggestions on what works well or how you would like to improve the dashboards, feel free to [open a GitHub issue](https://github.com/2i2c-org/jupyterhub-cost-monitoring/issues/new) or contact [support](/support)!
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Sharing and reporting Grafana dashboards
2+
3+
Grafana dashboards can be shared with other community members and stakeholders so they can understand usage and cost patterns. Community Champions can
4+
5+
- export data to a CSV file
6+
- generate a snapshot of the Grafana dashboard and share a public link
7+
- or even [Programmatically access Prometheus data](prometheus-access) themselves.
8+
9+
## Generate a CSV file
10+
11+
1. Click on the three dots {material-regular}`more_vert`, in the top-right corner of the panel you wish to generate a CSV file for.
12+
1. From the dropdown menu select *{octicon}`info` Inspect > Data*.
13+
1. Click on the {bdg-primary}`Download CSV` button to download the data as a CSV file.
14+
15+
## Share a snapshot of the dashboard or panel
16+
17+
This function is available to Grafana admins only. A snapshot is a frozen view of data that can with others without the need to login with a Grafana account.
18+
19+
1. If you wish to share the *entire dashboard*, click on the {bdg-primary}`Share` button to the left of the time-range selector.
20+
1. If you wish to share a *single panel*, click on the three dots {material-regular}`more_vert`, in the top-right corner of a panel. From the dropdown menu select *Share*.
21+
1. From the pop-up *Share Panel* dialog, select the *Snapshot* tab and fill out the details.
22+
1. Click the {bdg-primary}`Publish Snapshot` button to generate a public link that you can share with others.
23+
24+
:::{figure} images/cost-attribution-snapshot.png
25+
:alt: Snapshot of the share panel dialog, with Snapshot name, Expire and Timeout fields.
26+
:::

0 commit comments

Comments
 (0)