mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Option to send notification when a Health Check warning occurs
This commit is contained in:
@@ -70,6 +70,23 @@ namespace NzbDrone.Core.Notifications.Slack
|
||||
_proxy.SendPayload(payload, Settings);
|
||||
}
|
||||
|
||||
public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
||||
{
|
||||
var attachments = new List<Attachment>
|
||||
{
|
||||
new Attachment
|
||||
{
|
||||
Title = healthCheck.Source.Name,
|
||||
Text = healthCheck.Message,
|
||||
Color = healthCheck.Type == HealthCheck.HealthCheckResult.Warning ? "warning" : "danger"
|
||||
}
|
||||
};
|
||||
|
||||
var payload = CreatePayload("Health Issue", attachments);
|
||||
|
||||
_proxy.SendPayload(payload, Settings);
|
||||
}
|
||||
|
||||
public override ValidationResult Test()
|
||||
{
|
||||
var failures = new List<ValidationFailure>();
|
||||
|
Reference in New Issue
Block a user