Skip to content

Commit

Permalink
[Platform] Fix regression with backup failure email #6461
Browse files Browse the repository at this point in the history
Summary:
When implementing replication lag alerting, I caused a regression with backup failure alerting. Need to fix field names in the alert payload.

@CNarang noticed that emails weren't being sent when testing this feature on 2.5.1. Tested the feature on his installation of the platform and saw
```
Invalid alert_info_json
```
being logged for cluster_health.py when running it manually with the logged payload from the platform. This should resolve the issue.

Test Plan: Test backup failure alert

Reviewers: arnav, wesley, sanketh

Reviewed By: sanketh

Subscribers: cnarang, jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D9972
  • Loading branch information
daniel-yb committed Nov 24, 2020
1 parent c1fda7f commit 3b23991
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ public void sendNotification() {
CustomerTask task = CustomerTask.findByTaskUUID(userTaskUUID);
Customer customer = Customer.get(task.getCustomerUUID());
ObjectNode notificationData = Json.newObject()
.put("alertname", "Backup failure")
.put("alert_name", "Backup failure")
.put("task_type", task.getType().name())
.put("target_type", task.getTarget().name())
.put("target_name", task.getNotificationTargetName())
.put("alert_info", taskInfo);
.put("task_info", taskInfo);
String customerTag = String.format("[%s][%s]", customer.name, customer.code);
List<String> destinations = new ArrayList<>();
String ybEmail = appConfig.getString("yb.health.default_email", null);
Expand Down

0 comments on commit 3b23991

Please sign in to comment.