Fix HighMemoryUsage alert ratio expression - #36
Open
louiss72 wants to merge 2 commits into
Open
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.
Summary
Fixes #1.
The recommended
HighMemoryUsagealert no longer dividesprocess_resident_memory_bytesby itself. It now compares process resident memory againstmachine_memory_bytes, matching the existing memory usage recording rule denominator and making the alert reflect actual memory pressure.Changes
HighMemoryUsagefromprocess_resident_memory_bytes / process_resident_memory_bytes > 0.9toprocess_resident_memory_bytes / machine_memory_bytes > 0.9.find_self_dividing_metrics()/validate_alert_rule_expressions()to catch self-dividing alert expressions before upload/dry-run output.--validate-rulesso the built-in alert rules can be checked without a live Prometheus or Alertmanager instance.diagnostic/build-bbea7080.jsondiagnostic/build-bbea7080-part001.logddiagnostic/build-bbea7080-part002.logddiagnostic/build-bbea7080-part003.logddiagnostic/build-bbea7080-part004.logddiagnostic/build-bbea7080-part005.logdTesting
python3 -m py_compile tools/monitoring_setup.pypassed.python3 tools/monitoring_setup.py --validate-rulespassed.python3 tools/monitoring_setup.py --alerts --dry-runconfirmedHighMemoryUsagerenders asprocess_resident_memory_bytes / machine_memory_bytes > 0.9.git diff --checkpassed before committing.python3 build.pywas run as required and generated the committed diagnostic artifacts.python3 build.pyresult: exited 1 in this local macOS runner because required cross-language build tools are unavailable or incompatible here. The diagnostic metadata records the details: missingcargo,go,cmake,luac,ghc, missing Java runtime, and the C build hitting Linux-specificMAP_HUGETLBon macOS. Frontend andv2-market-streampassed.Diagnostic decrypt note from
build.py:Checklist
Payout: I can receive XMR or common EVM-chain stablecoins. Preferred XMR address:
4DSQMNzzq46N1z2pZWAVdeA6JvUL9TCB2bnBiA3ZzoqEdYJnMydt5akCa3vtmapeDsbVKGPFdNkzqTcJS8M8oyK7WGjNk99k1B6CoKjvH5EVM/BSC/ERC-20 address if the bounty is paid that way:
0x2f8081562ac67467d1cbd40ab3120849c1f587da