[GH-ISSUE #396] Email subject filter for Failure state #298

Closed
opened 2026-02-25 23:41:57 +03:00 by kerem · 11 comments
Owner

Originally created by @revilo951 on GitHub (Jul 7, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/396

Is there any way to specify a subject word to trigger a notification?

At the moment, I'm receiving emails from some software with 3 possible outcomes: Success, Warning, and Failed.

If the task fails, I still get the email, therefore healthchecks thinks the task succeeded.

It'd be nice if we could specify that an email with the words "Warning" or "Failed" (for example) meant that the task failed, and a notification needs to be sent (or did I miss something, and this is possible already somehow?).

Originally created by @revilo951 on GitHub (Jul 7, 2020). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/396 Is there any way to specify a subject word to trigger a notification? At the moment, I'm receiving emails from some software with 3 possible outcomes: Success, Warning, and Failed. If the task fails, I still get the email, therefore healthchecks thinks the task succeeded. It'd be nice if we could specify that an email with the words "Warning" or "Failed" (for example) meant that the task failed, and a notification needs to be sent (or did I miss something, and this is possible already somehow?).
kerem closed this issue 2026-02-25 23:41:57 +03:00
Author
Owner

@revilo951 commented on GitHub (Jul 8, 2020):

Edit: in this case, there isn't a specific timing for the emails, so the "ignore" filter can't really help with this.

<!-- gh-comment-id:655224375 --> @revilo951 commented on GitHub (Jul 8, 2020): Edit: in this case, there isn't a specific timing for the emails, so the "ignore" filter can't really help with this.
Author
Owner

@cuu508 commented on GitHub (Jul 10, 2020):

Currently we cannot signal failure to Healthchecks via an email, but I'm open to implementing it.

I want to run an UI mockup past you and ask a few questions to see if it's any good:

image

  • Looking at this UI, do you think it would your solve your use case?
  • What do you expect to happen if both keyword text boxes are empty?
  • What do you expect to happen if only the "Success Keyword" is filled?
  • What do you expect to happen if only the "Failure Keyword" is filled?

In this case, there isn't a specific timing for the emails, so the "ignore" filter can't really help with this.

Are the emails coming in at random intervals, and you want any "success" email to flip a check to green, and any "failure" email to flip it to red?

<!-- gh-comment-id:656700973 --> @cuu508 commented on GitHub (Jul 10, 2020): Currently we cannot signal failure to Healthchecks via an email, but I'm open to implementing it. I want to run an UI mockup past you and ask a few questions to see if it's any good: ![image](https://user-images.githubusercontent.com/661859/87163921-b8f0db00-c2d0-11ea-9f00-4955d5548eb0.png) * Looking at this UI, do you think it would your solve your use case? * What do you expect to happen if both keyword text boxes are empty? * What do you expect to happen if only the "Success Keyword" is filled? * What do you expect to happen if only the "Failure Keyword" is filled? > In this case, there isn't a specific timing for the emails, so the "ignore" filter can't really help with this. Are the emails coming in at random intervals, and you want any "success" email to flip a check to green, and any "failure" email to flip it to red?
Author
Owner

@revilo951 commented on GitHub (Jul 13, 2020):

  • Looking at this UI, do you think it would solve your use case?
    • Pretty much, I think the option to have multiple words, maybe comma-separated would be good, eg if I want to be notified/trigger red for both "Warning" and "Failed" keywords
  • What do you expect to happen if both keyword text boxes are empty?
    • Behave the same as the current configuration, expect emails within the specified timeframe.
  • What do you expect to happen if only the "Success Keyword" is filled?
    • Perhaps any email received that doesn't have a success word would trigger failed/missed? Otherwise behave the same as currently, like the filter system.
  • What do you expect to happen if only the "Failure Keyword" is filled?
    • That is a tricky one - maybe make it so that a "Success keyword" must also be specified? Otherwise, perhaps the system can re-notify whenever a new email with a failure keyword is received.
  • Are the emails coming in at random intervals, and you want any "success" email to flip a check to green, and any "failure" email to flip it to red?
    • Yes, exactly.
<!-- gh-comment-id:657457927 --> @revilo951 commented on GitHub (Jul 13, 2020): - Looking at this UI, do you think it would solve your use case? - Pretty much, I think the option to have multiple words, maybe comma-separated would be good, eg if I want to be notified/trigger red for both "Warning" and "Failed" keywords - What do you expect to happen if both keyword text boxes are empty? - Behave the same as the current configuration, expect emails within the specified timeframe. - What do you expect to happen if only the "Success Keyword" is filled? - Perhaps any email received that _doesn't_ have a success word would trigger failed/missed? Otherwise behave the same as currently, like the filter system. - What do you expect to happen if only the "Failure Keyword" is filled? - That is a tricky one - maybe make it so that a "Success keyword" must also be specified? Otherwise, perhaps the system can re-notify whenever a new email with a failure keyword is received. - Are the emails coming in at random intervals, and you want any "success" email to flip a check to green, and any "failure" email to flip it to red? - Yes, exactly.
Author
Owner

@revilo951 commented on GitHub (Jul 13, 2020):

Another scenario that has come up, is a piece of software that handles multiple backups that need monitoring (software runs from a single piece of equipment) doesn't have the ability to send to a unique email address per job, however, I can put the unique identifier in the subject. A way to handle this would be nice, not sure how hard that would be though. I'm currently running the emails through a postfix smtp relay, and filtering/running rules to forward the emails to a different address, per the ID in the subject.
Apologies for not noticing your reply sooner!

<!-- gh-comment-id:657460622 --> @revilo951 commented on GitHub (Jul 13, 2020): Another scenario that has come up, is a piece of software that handles multiple backups that need monitoring (software runs from a single piece of equipment) doesn't have the ability to send to a unique email address per job, however, I can put the unique identifier in the subject. A way to handle this would be nice, not sure how hard that would be though. I'm currently running the emails through a postfix smtp relay, and filtering/running rules to forward the emails to a different address, per the ID in the subject. Apologies for not noticing your reply sooner!
Author
Owner

@cuu508 commented on GitHub (Jul 17, 2020):

Thanks for the feedback @revilo951, that's very useful. And looks like the different options (and their combinations) are not as clear as they should be.

Here's a new attempt:

image

<!-- gh-comment-id:660090756 --> @cuu508 commented on GitHub (Jul 17, 2020): Thanks for the feedback @revilo951, that's very useful. And looks like the different options (and their combinations) are not as clear as they should be. Here's a new attempt: ![image](https://user-images.githubusercontent.com/661859/87787520-71c09800-c844-11ea-8b93-79090831fd58.png)
Author
Owner

@revilo951 commented on GitHub (Jul 19, 2020):

@cuu508 That looks excellent! Only question I have is - do these Keyword fields have any provision for more than one keyword, eg comma-separated keywords?

<!-- gh-comment-id:660580735 --> @revilo951 commented on GitHub (Jul 19, 2020): @cuu508 That looks excellent! Only question I have is - do these Keyword fields have any provision for more than one keyword, eg comma-separated keywords?
Author
Owner

@cuu508 commented on GitHub (Jul 21, 2020):

@revilo951 I see the value of comma-separated keywords. They would add a bit of complexity but are doable.

I think I'll start with implementing the above single-keyword version and once that's working, look at adding support for comma-separated keywords.

<!-- gh-comment-id:661757055 --> @cuu508 commented on GitHub (Jul 21, 2020): @revilo951 I see the value of comma-separated keywords. They would add a bit of complexity but are doable. I think I'll start with implementing the above single-keyword version and once that's working, look at adding support for comma-separated keywords.
Author
Owner

@revilo951 commented on GitHub (Jul 21, 2020):

Awesome, thanks for that.

<!-- gh-comment-id:661768815 --> @revilo951 commented on GitHub (Jul 21, 2020): Awesome, thanks for that.
Author
Owner

@cuu508 commented on GitHub (Jul 21, 2020):

FYI – the initial, single-keyword version is deployed on https://healthchecks.io and is ready for testing.

<!-- gh-comment-id:661854798 --> @cuu508 commented on GitHub (Jul 21, 2020): FYI – the initial, single-keyword version is deployed on https://healthchecks.io and is ready for testing.
Author
Owner

@cuu508 commented on GitHub (Jul 23, 2020):

The multiple, comma-separated keywords are now implemented and deployed as well:

image

<!-- gh-comment-id:663044381 --> @cuu508 commented on GitHub (Jul 23, 2020): The multiple, comma-separated keywords are now implemented and deployed as well: ![image](https://user-images.githubusercontent.com/661859/88299487-16dae500-cd0b-11ea-81d0-00f9fcfb23f6.png)
Author
Owner

@revilo951 commented on GitHub (Jul 23, 2020):

I've tested the single keyword version yesterday, it's working well.

Many thanks for this awesome change, and very useful software. :)

<!-- gh-comment-id:663269916 --> @revilo951 commented on GitHub (Jul 23, 2020): I've tested the single keyword version yesterday, it's working well. Many thanks for this awesome change, and very useful software. :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#298
No description provided.