Create a new RedisMemoryUsageCheck instance
The Redis connection to monitor
Define the memory threshold after which a warning should be created.
Memory threshold as bytes or string (e.g. '200mb')
Define the memory threshold after which an error should be created.
Memory threshold as bytes or string (e.g. '200mb')
Define a custom callback to compute Redis memory usage. The return value must be a number in bytes or null.
Function that returns memory usage in bytes
The RedisMemoryUsageCheck can be used to monitor the memory consumption of a redis server and report a warning or error after a certain threshold has been execeeded.
Example