Skip to content

Commit

Permalink
Update size of mongodb large index size to 2GB
Browse files Browse the repository at this point in the history
  • Loading branch information
shloka-bhalgat-unskript committed May 29, 2024
1 parent 8a8bbe8 commit cf09619
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class InputSchema(BaseModel):
index_threshold: Optional[float] = Field(
512000, # 500MB in KB
2048000, # 2GB in KB
description='The threshold for total index size. Default is 512000KB.',
title='Index threshold(in KB)',
)
Expand All @@ -26,7 +26,7 @@ def mongodb_check_large_index_size_printer(output):
print(f"Alert! Index size of {alert['indexSizeKB']} KB for database '{alert['db']}' in collection '{alert['collection']}' exceeds threshold !")


def mongodb_check_large_index_size(handle, threshold: float = 512000) -> Tuple:
def mongodb_check_large_index_size(handle, threshold: float = 2048000) -> Tuple:
"""
mongodb_check_large_index_size checks the index sizes for all databases and collections.
It compares the size of each index with a given threshold and returns any indexes that exceed the threshold.
Expand Down

0 comments on commit cf09619

Please sign in to comment.