System redundancy and dependency monitor
With latest AppBeat release you can now access unique and powerful new feature which allows you to define custom monitoring expression for any workflow.
Possible use cases:
- Reduce number of notifications for your DevOps team when you have enough redundant and healthy servers / services.
- Generate better uptime reports for redundant (load-balanced) services. This means that if one of your servers is down, overall uptime on our status page will still be 100% if you have healthy redundant servers.
Expression examples:
- Let’s say you have two redundant web servers in different regions. You want to create periodic monitor which reports healthy status if at least one of your web servers is healthy (because in our hypothetical example servers are accessed via highly available load balancer which automatically redirects traffic to healthy server). You would then create expression with .any() method as shown in example below:
isHealthy(
services["Web, production"].checks["AWS, US East (Northern Virginia)"],
services["Web, production"].checks["Azure, Germany West Central, Frankfurt"]
).any()
- If you replace .any() with .all() then all web servers must be healthy:
isHealthy(
services["Web, production"].checks["AWS, US East (Northern Virginia)"],
services["Web, production"].checks["Azure, Germany West Central, Frankfurt"]
).all()
- You can also use .minPercentage(percentage) method to specify percentage of healthy web servers:
isHealthy(
services["Web, production"].checks["AWS, US East (Northern Virginia)"],
services["Web, production"].checks["Azure, Germany West Central, Frankfurt"]
).minPercentage(50.0)
- You can also use .minCount(absoluteValue) method to specify absolute number of healthy web servers:
isHealthy(
services["Web, production"].checks["AWS, US East (Northern Virginia)"],
services["Web, production"].checks["Azure, Germany West Central, Frankfurt"]
).minCount(1)
- You can combine expressions with logical AND / OR operators and parentheses to make more complex logic:
isHealthy(
services["Web, production"].checks["AWS, US East (Northern Virginia)"],
services["Web, production"].checks["Azure, Germany West Central, Frankfurt"]
).any()
AND
(
isHealthy(
services["Backend, production"].checks["AWS, US East (Northern Virginia)"],
services["Backend, production"].checks["Azure, Germany West Central, Frankfurt"]
).minPercentage(50.0)
OR
isHealthy(
services["Backend, production"].checks["AWS, US East (Ohio)"],
services["Backend, production"].checks["Azure, North Europe, Ireland"]
).minCount(1)
)
As you can see this framework is very flexible and allows you endless new monitoring options which were previously not possible.
If you have any questions you can contact us at: https://www.appbeat.io/contact
Happy monitoring!
Read other posts