Repository navigation
feat(vindex/metrics): add OS memory pressure, paging, disk I/O, and host capacity metrics - #206
Merged
mhutchinson merged 1 commit intoDec 1, 2026
Conversation
…ost capacity metrics
patflynn
approved these changes
Nov 30, 2026
Closed
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.
Summary
Adds a lightweight, read-only scrape-time Prometheus
Collectorinvindex/internal/metrics(auto-registered onprometheus.DefaultRegisterer, zero new dependencies) so operators can immediately diagnose undersized VMs, memory paging/swap thrashing, disk I/O saturation, and CPU starvation from a single/metricsscrape or Grafana dashboard.New Metrics
vindex_process_major_page_faults_totalgetrusage(RUSAGE_SELF).Majfltvindex_process_swap_bytes/proc/self/status(VmSwap)vindex_process_rss_anon_bytes/proc/self/status(RssAnon)vindex_process_rss_file_bytes/proc/self/status(RssFile)vindex_process_io_read_bytes_total/proc/self/io(read_bytes)vindex_process_io_write_bytes_total/proc/self/io(write_bytes)vindex_memory_psi_some_seconds_total/proc/pressure/memory(some)vindex_memory_psi_full_seconds_total/proc/pressure/memory(full)vindex_io_psi_some_seconds_total/proc/pressure/io(some)vindex_io_psi_full_seconds_total/proc/pressure/io(full)vindex_cpu_psi_some_seconds_total/proc/pressure/cpu(some)vindex_host_memory_total_bytes/proc/meminfo(MemTotal)vindex_host_memory_available_bytes/proc/meminfo(MemAvailable)vindex_host_cpusruntime.NumCPU()Grafana Dashboard
deploy/sumdb/grafana/dashboards/sumdb_overview.jsonwith panels for Memory/Swap vs Host RAM Headroom, Linux PSI Stall Fraction (Memory/I/O/CPU), Process Physical Disk I/O, Major Page Fault Rate, and CPU Utilization (% of Host CPUs).Verification
go test -race -v ./vindex/internal/metrics/...(includesprometheus.NewPedanticRegistry(),testutil.GatherAndCompare,testutil.GatherAndLint, missing-/procfallback, and live default-registry smoke test)go vet ./vindex/internal/metrics/...GOOS=darwin GOARCH=arm64andGOOS=windows GOARCH=amd64deploy/sumdb/grafana/dashboards/sumdb_overview.jsonwithpython3 -m json.tool