2023-06-30 07:25:09 -07:00
|
|
|
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)
|
|
|
|
|
|
|
|
// Alert error saving vaa.
|
|
|
|
alerts[ErrorSaveDestinationTx] = alert.Alert{
|
|
|
|
Alias: ErrorSaveDestinationTx,
|
2023-07-06 07:20:18 -07:00
|
|
|
Message: fmt.Sprintf("[%s] %s", cfg.Environment, "Error saving destination tx in globalTransactions collection"),
|
2023-06-30 07:25:09 -07:00
|
|
|
Description: "An error was found persisting the destination tx in globalTransactions collection.",
|
|
|
|
Actions: []string{"check globalTransactions collection"},
|
2023-07-06 07:20:18 -07:00
|
|
|
Tags: []string{cfg.Environment, "contract-watcher", "destination tx", "mongo"},
|
2023-06-30 07:25:09 -07:00
|
|
|
Entity: "contract-watcher",
|
|
|
|
Priority: alert.CRITICAL,
|
|
|
|
}
|
|
|
|
|
|
|
|
return alerts
|
|
|
|
}
|