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

Add disk usage prometheus metrics to jupyterhub-home-nfs deployment #8

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

sunu
Copy link
Collaborator

@sunu sunu commented Nov 18, 2024

The disk usage prometheus metrics are exported by a sidecar container running prometheus node-exporter.

related to #7 and 2i2c-org/infrastructure#5062

Here's an example of a Grafana dashboard monitoring home directory disk usage through the exported Prometheus metrics:

image

The disk usage prometheus metrics are exported by a sidecar container
running prometheus node-exporter.
@sunu sunu changed the title Add disk usage prometheus metrics to jupyterhub-home-nfs Add disk usage prometheus metrics to jupyterhub-home-nfs deployment Nov 18, 2024
@sunu
Copy link
Collaborator Author

sunu commented Nov 19, 2024

@sgibson91 @yuvipanda Any thoughts on including the Prometheus exporter for disk space monitoring as part of jupyterhub-home-nfs deployment itself?

If this looks ok, I will tweak the configurations to make sure the reported metrics will be picked up by the relevant jupyterhub/graphana-dashboards panel.

@sgibson91
Copy link
Member

@sunu This looks fine to me, it looks like you've made it an opt-in feature too which would've been my comment!

I'm happy if @yuvipanda is happy?

args:
- --collector.disable-defaults
- --path.rootfs=/export
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why these are excluded?

@yuvipanda
Copy link
Member

Absolutely love it, this is the way to go!

@yuvipanda
Copy link
Member

I also opened #9

The dashboard definition in jupyterhub/grafana-dashboards expects
the NFS home directory disk to be mounted at /shared-volume and the
deployment to have the label `component: shared-volume-metrics`
@sunu
Copy link
Collaborator Author

sunu commented Nov 22, 2024

@yuvipanda Looking at adding dirsize-exporter as a sidecar - we need to add the label component: shared-dirsize-metrics to match the existing definition of the dashboard in jupyterhub/grafana-dashboards. This label is different from the label expected by the shared home disk reporter and we can't have multiple labels with the same key on a deployment.

Should we add a separate dashboard to jupyterhub/grafana-dashboards and not try to match the existing dashboard definitions?

@sunu sunu marked this pull request as ready for review November 22, 2024 08:28
@yuvipanda
Copy link
Member

@sunu ah, let's then leave dirsize-exporter out of this right now and deal with it separately :) I would like it to have the same component label though.

Copy link
Member

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But when we deploy this in the 2i2c-org/infrastructure repo, we should disable the prometheus exporter (https://github.com/2i2c-org/infrastructure/blob/main/helm-charts/basehub/templates/home-space-reporter.yaml) that's there for hubs that use this.

@sunu
Copy link
Collaborator Author

sunu commented Nov 27, 2024

But when we deploy this in the 2i2c-org/infrastructure repo, we should disable the prometheus exporter (https://github.com/2i2c-org/infrastructure/blob/main/helm-charts/basehub/templates/home-space-reporter.yaml) that's there for hubs that use this.

@yuvipanda, sounds good! That prometheus exporter is already disabled on the VEDA hubs (https://github.com/2i2c-org/infrastructure/blob/b897a9e57df5825055fee618f403ea0db4e71b72/config/clusters/nasa-veda/common.values.yaml#L4-L5) and all other hubs that use EFS.

@sunu sunu merged commit 75502f2 into main Nov 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants