Skip to content

Commit

Permalink
Add back publish events (sonic-net#20306)
Browse files Browse the repository at this point in the history
### Why I did it

sonic-net#19179 removed call to publish_events when memory usage container exceeds threshold, causing test_events to fail.

### How I did it

Add back call to publish_events

#### How to verify it

Manual test
  • Loading branch information
zbud-msft authored Sep 23, 2024
1 parent 561479e commit 265a79f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/image_config/monit/memory_checker
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def check_memory_usage(container_name, threshold_value):
if total_memory_usage > threshold_value:
print("[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!"
.format(container_name, total_memory_usage, threshold_value))
publish_events(container_name, "{:.2f}".format(total_memory_usage), str(threshold_value))
sys.exit(EXCEED_THRESHOLD)

def is_service_active(service_name):
Expand Down

0 comments on commit 265a79f

Please sign in to comment.