DEV Community

Cover image for Catch before it burst.
Rohith Kunnath
Rohith Kunnath

Posted on • Edited on

Catch before it burst.

Redis TTL monitoring and alerting Service

The Service to monitor Redis keys created without any Time To Live (TTL) and alerts based on different configurations provided by different teams.

Note:
NOT FOR PRODUCTION ENVIRONMENTS. Preferred only on Testing/Staging environments.

Motivation

To stop or try to alert developers before persisting keys to Redis with no TTL.

Most of the time, the reason will be keys with no Time to live(TTL). That means, the data exists forever until we delete it explicitly.

How to use

  1. Duplicate env.sample file and fill with values.
  2. Move this file to services folder.
  3. Run sh run_from_bash.sh

How it works

  1. Crontab runs once a day. Can be configured in the file called crontab.
  2. Each file in services folder is picked.
  3. Evaluate TTL missing keys based on configuration.
  4. Notify teams about the TTL missing keys.

Run Using Docker

  1. docker build --build-arg env_host=hostname --build-arg env_port=30363 -t redis-ttl-missing-alert-service.
  2. docker run redis-ttl-missing-alert-service:latest

Start Container Using Docker

  1. docker build --build-arg env_host=hostname --build-arg env_port=30363 -t redis-ttl-missing-alert-service.

  2. docker container create redis-ttl-missing-alert-service:latest

  3. docker start #container_name

Example Alert

Screenshot 2021-02-18 at 17.50.44

Developed with :love

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more