Repository navigation
deck: host metrics and per-VM dashboards (Prometheus, cAdvisor, Grafana) - #118
Closed
Nihalsaeed wants to merge 2 commits into
Closed
Nihalsaeed wants to merge 2 commits into
Nihalsaeed wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds white-box monitoring as a deck service, alongside the Uptime Kuma black-box monitor that is already enabled.
services.prometheus(15d retention) with two scrape jobs: node and cgroups.services.prometheus.exporters.nodewith the systemd collector (unit state).services.cadvisorwith--docker_only=falseso all cgroups are reported. Each microVM and virtiofsd is a systemd service with its own cgroup, so this is where per-VM CPU/RAM comes from. The dashboard uses theidlabel because raw cgroups have an emptynamelabel.services.grafanawith Prometheus provisioned as the default datasource and a checked-in dashboard (host CPU idle, memory available, load, top cgroups by CPU and memory).127.0.0.1. No new public or mesh port; Grafana is reached withssh -L 3000:127.0.0.1:3000 mothership. No credentials or secrets are added.Wiring is minimal: one import in
modules/deck/default.nixand oneenable = trueinhosts/mothership/default.nix.Why
Uptime Kuma answers "is it up?". These numbers answer "why is it slow?", including which member VM is using the CPU. See
docs/monitoring.md(new page, linked from the docs index).Checks
.nixfiles.nix flake checkcould not be run locally — CI evaluates both hosts and runs the flake checks. Option names were verified against the pinned nixpkgs (rev241313f4e8e508cb9b13278c2b0fa25b9ca27163):services.prometheus.retentionTime,services.cadvisor.extraOptions,services.grafana.provision.*.Note: another thread has a parallel PR implementing a similar stack under
modules/monitoring/; this one follows the existingmodules/deck/convention instead. Maintainers should pick one.