-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
117 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package alert | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/wormhole-foundation/wormhole-explorer/common/client/alert" | ||
) | ||
|
||
// alert key constants definition. | ||
const ( | ||
ErrorSaveDestinationTx = "ERROR_SAVE_DESTINATION_TX" | ||
) | ||
|
||
func LoadAlerts(cfg alert.AlertConfig) map[string]alert.Alert { | ||
alerts := make(map[string]alert.Alert) | ||
|
||
messagePrefix := alert.GetMessagePrefix(cfg.Enviroment, cfg.P2PNetwork) | ||
// Alert error saving vaa. | ||
alerts[ErrorSaveDestinationTx] = alert.Alert{ | ||
Alias: ErrorSaveDestinationTx, | ||
Message: fmt.Sprintf("%s %s", messagePrefix, "Error saving destination tx in globalTransactions collection"), | ||
Description: "An error was found persisting the destination tx in globalTransactions collection.", | ||
Actions: []string{"check globalTransactions collection"}, | ||
Tags: []string{cfg.Enviroment, cfg.P2PNetwork, "contract-watcher", "destination tx", "mongo"}, | ||
Entity: "contract-watcher", | ||
Priority: alert.CRITICAL, | ||
} | ||
|
||
return alerts | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ TERRA_URL= | |
APTOS_URL= | ||
OASIS_URL= | ||
MOONBEAM_URL= | ||
CELO_URL= | ||
CELO_URL= | ||
ALERT_ENABLED=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ TERRA_URL= | |
APTOS_URL= | ||
OASIS_URL= | ||
MOONBEAM_URL= | ||
CELO_URL= | ||
CELO_URL= | ||
ALERT_ENABLED=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ TERRA_URL= | |
APTOS_URL= | ||
OASIS_URL= | ||
MOONBEAM_URL= | ||
CELO_URL= | ||
CELO_URL= | ||
ALERT_ENABLED=false |