gatus icon indicating copy to clipboard operation
gatus copied to clipboard

[Feature request] Add Conditional on another check

Open rtz538 opened this issue 1 year ago • 1 comments

Describe the feature request

I want to have check1 and check2. If check1 fails, I don't want to be alerted by check2. Check2 needs some sort of condition to check the status of check1 before triggering. I tried a couple of things, but they don't work. Is this possible without external scripts and reloading the configuration?

I apologise if I missed this in the docs or it has been raised before. I couldn't find it.

Why do you personally want this feature to be implemented?

Imagine having a root domain and many checks for various functions on it. If the domain goes down, you will be flooded with alerts. Ideally, you want just one big bright alert to keep you focused on what's important.

How long have you been using this project?

1.5 years

Additional information

Thanks for the awesome project! :)

rtz538 avatar Jun 28 '24 16:06 rtz538

I would like to vote for this feature request too. Like rtz538 commented, I might have missed this in the docs and if it indeed already exists, a pointer to how to accomplish this would be great. If not, a quick summary of my use-case is as follows:

  1. ICMP checks for basic connectivity.
  2. HTTP checks for web server condition.
  3. Certificate checks to monitor for expiration date.

Logical decision tree:

  • If check 1 fails, there's typically no point in alerting for check 2, as the server is likely not reachable, indicating a network error.
  • If check 2 fails, the web server is probably down or the service in a bad state for some reason, generally rendering check 3 unnecessary.
  • If check 3 fails, it typically is just because a) the web server is not loading properly or b) the cert is about to expire.

I would like to be able to divide my monitoring in this way as that provides finer granularity and understanding of what the problem is. As it stands, I can sometimes get "noisy" alerts that don't truly reveal the root cause of the problem.

Love the project and its relative simplicity. It's so easy to configure and maintain through declarative files.

mlanner avatar Sep 10 '24 08:09 mlanner

I would also like to have such feature.

Use cases:

  1. Check remote gateways, if down, don't trigger another alerts. (while gatus is easy to deploy, in some cases not worth to deploy instance to check <5 icmp/http endpoints)
  2. Web server/Reverse proxy, if server down, no reason to spam alerts for applications.

woloss avatar Dec 04 '24 17:12 woloss

With suites, this is no longer needed.

TwiN avatar Oct 27 '25 20:10 TwiN