Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage report breakdown by user does not properly group users #46

Open
choldgraf opened this issue Aug 31, 2022 · 1 comment
Open

Usage report breakdown by user does not properly group users #46

choldgraf opened this issue Aug 31, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@choldgraf
Copy link
Member

Bug description

The Grafana report that breaks down RAM by user does not properly group all of the users.

We think that this is because of the following dashboard code:

// Computes sum of pod memory requests, grouped by username, for notebook pods
prometheus.target(
|||
kube_pod_labels{
label_app="jupyterhub",
label_component="singleuser-server",
namespace=~"$hub"
}
* on (namespace, pod) group_left()
sum(
container_memory_working_set_bytes{
namespace=~"$hub",
container="notebook",
hub_jupyter_org_node_purpose="user",
name!="",
}
) by (namespace, pod)
|||,
legendFormat='{{label_hub_jupyter_org_username}} ({{namespace}})',

From a conversation @GeorgianaElena noted:

Notice the group_left in the query which generated some duplicated entries in the graph, even though we were up to get the sum over each pod.
I've changed the group_left to a group_right and that generated the graph I shared in the previous message which looked like it produced a single value for the mem used by each notebook pod.

Expected behaviour

There should be a single plot per user, not multiple plots per user.

Actual behaviour

image

How to reproduce

  • Go to the Usage report dashboard in the Grafana
  • This should show multiple plots per user
@choldgraf choldgraf added the bug Something isn't working label Aug 31, 2022
@welcome
Copy link

welcome bot commented Aug 31, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant