Skip to content

Commit

Permalink
Healthchecks notifications (NethermindEth#3260)
Browse files Browse the repository at this point in the history
* changed healthchecks notifications

* changed constructor

* change in config

* Default healthchecks config changed

Co-authored-by: AnnaJ <anna.jablonowska@nethermind.io>
  • Loading branch information
aajj999 and AnnaJ authored Jul 29, 2021
1 parent d7a0dc0 commit 4931a59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class HealthChecksConfig : IHealthChecksConfig
public string Slug { get; set; } = "/health";
public int PollingInterval { get; set; } = 5;
public string WebhooksUri { get; set; } = null;
public string WebhooksPayload { get; set; } = "{\"attachments\":[{\"color\":\"#FFCC00\",\"pretext\":\"Health Check Status :warning:\",\"fields\":[{\"title\":\"Details\",\"value\":\"More details available at `/healthchecks-ui`\",\"short\":false},{\"title\":\"Description\",\"value\":\"`[[DESCRIPTIONS]]`\",\"short\":false}]}]}";
public string WebhooksPayload { get; set; } = "{\"attachments\":[{\"color\":\"#FFCC00\",\"pretext\":\"Health Check Status :warning:\",\"fields\":[{\"title\":\"Details\",\"value\":\"More details available at `/healthchecks-ui`\",\"short\":false},{\"title\":\"Description\",\"value\":\"[[DESCRIPTIONS]]\",\"short\":false}]}]}";
public string WebhooksRestorePayload { get; set; } = "{\"attachments\":[{\"color\":\"#36a64f\",\"pretext\":\"Health Check Status :+1:\",\"fields\":[{\"title\":\"Details\",\"value\":\"`More details available at /healthchecks-ui`\",\"short\":false},{\"title\":\"description\",\"value\":\"The HealthCheck `[[LIVENESS]]` is recovered. All is up and running\",\"short\":false}]}]}";
public bool UIEnabled { get; set; } = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface IHealthChecksConfig : IConfig
[ConfigItem(Description = "The Webhooks endpoint e.g. Slack WebHooks", DefaultValue = "null")]
public string WebhooksUri { get; set; }

[ConfigItem(Description = "Payload is the json payload that will be send on Failure and must be escaped.", DefaultValue = "{\"attachments\":[{\"color\":\"#FFCC00\",\"pretext\":\"Health Check Status :warning:\",\"fields\":[{\"title\":\"Details\",\"value\":\"More details available at `/healthchecks-ui`\",\"short\":false},{\"title\":\"Description\",\"value\":\"`[[DESCRIPTIONS]]`\",\"short\":false}]}]}")]
[ConfigItem(Description = "Payload is the json payload that will be send on Failure and must be escaped.", DefaultValue = "{\"attachments\":[{\"color\":\"#FFCC00\",\"pretext\":\"Health Check Status :warning:\",\"fields\":[{\"title\":\"Details\",\"value\":\"More details available at `/healthchecks-ui`\",\"short\":false},{\"title\":\"Description\",\"value\":\"[[DESCRIPTIONS]]\",\"short\":false}]}]}")]
public string WebhooksPayload { get; set; }

[ConfigItem(Description = "RestorePayload is the json payload that will be send on Recovery and must be escaped.", DefaultValue = "{\"attachments\":[{\"color\":\"#36a64f\",\"pretext\":\"Health Check Status :+1:\",\"fields\":[{\"title\":\"Details\",\"value\":\"`More details available at /healthchecks-ui`\",\"short\":false},{\"title\":\"description\",\"value\":\"The HealthCheck `[[LIVENESS]]` is recovered. All is up and running\",\"short\":false}]}]}")]
Expand Down

0 comments on commit 4931a59

Please sign in to comment.