Skip to content

fix: replace self-dividing HighMemoryUsage alert expression - #29

Open
lwq19850429 wants to merge 1 commit into
weilixiong:mainfrom
lwq19850429:fix/high-memory-alert
Open

fix: replace self-dividing HighMemoryUsage alert expression#29
lwq19850429 wants to merge 1 commit into
weilixiong:mainfrom
lwq19850429:fix/high-memory-alert

Conversation

@lwq19850429

Copy link
Copy Markdown

Summary

Fixes the HighMemoryUsage Prometheus alert expression which incorrectly divided process_resident_memory_bytes by itself, always evaluating to 1.

Changes

  • File: tools/monitoring_setup.py
  • Changed: process_resident_memory_bytes / process_resident_memory_bytes > 0.9process_resident_memory_bytes / node_memory_MemTotal_bytes > 0.9
  • Impact: Alert now correctly compares process resident memory against total system memory

Testing

  • Verified the new expression is valid PromQL syntax
  • Expression correctly identifies high memory usage (> 90% of total RAM)
  • No other monitoring setup behavior changed

Bounty

Addresses the [$30 BOUNTY] issue: Fix HighMemoryUsage alert ratio expression

The original expression divided process_resident_memory_bytes by itself,
which always evaluates to 1 and makes the alert unreliable.

Replaced with: process_resident_memory_bytes / node_memory_MemTotal_bytes > 0.9
This correctly compares process memory against total system memory.
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.

1 participant