feat: Add cache size to DedupTTLCache and log cache stats#36
feat: Add cache size to DedupTTLCache and log cache stats#36t29-cristian wants to merge 3 commits intoCheckmk:mainfrom
Conversation
… cache statistics in the API.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA. |
|
I would argue that it is best not to have a cache limit at all in the first place by default since in kubernetes we have memory limits anyway which can take care of situations where a pod might use way more than needed. But since I am not entirely sure about the intention of the developers, I am just adding something to help me right-size for our environments and tell me when I run the risk of having values temporarily missing. |
- needed so that we can have these log lines exposed externally
|
When we would set the logger to debug now, we would see: The best approach would be to expose a metric that we can scrape in the cluster so that we can alert on it, but at least this way we have something to go on. |
Add cache monitoring and alerting for container metrics
Added cache size monitoring to the cluster collector to detect and alert when the container metrics cache approaches capacity, preventing silent metric data loss.
Changes:
This makes cache exhaustion visible at default log levels (previously silent) and helps operators identify when cache capacity needs to be increased.