diff --git a/monitor/alerts/db_alerts_provider.go b/monitor/alerts/db_alerts_provider.go index 7ec3bd4..93261c4 100644 --- a/monitor/alerts/db_alerts_provider.go +++ b/monitor/alerts/db_alerts_provider.go @@ -666,6 +666,7 @@ type StuckErcToNativeMessage struct { TransactionHash common.Hash `db:"transaction_hash"` MsgHash common.Hash `db:"msg_hash"` Count uint64 `db:"count"` + Sender common.Address `db:"sender"` Receiver common.Address `db:"receiver"` Value string `db:"value"` } @@ -678,6 +679,7 @@ func (c *StuckErcToNativeMessage) AlertValues() AlertValues { "tx_hash": c.TransactionHash.String(), "msg_hash": c.MsgHash.String(), "count": strconv.FormatUint(c.Count, 10), + "sender": c.Sender.String(), "receiver": c.Receiver.String(), "value": c.Value, }, @@ -693,6 +695,7 @@ func (p *DBAlertsProvider) FindStuckErcToNativeMessages(ctx context.Context, par sm.msg_hash, count(s.log_id) as count, EXTRACT(EPOCH FROM now() - ts.timestamp)::int as age, + m.sender, m.receiver, m.value / 1e18 as value FROM sent_messages sm @@ -713,6 +716,7 @@ func (p *DBAlertsProvider) FindStuckErcToNativeMessages(ctx context.Context, par sm.msg_hash, count(s.log_id) as count, EXTRACT(EPOCH FROM now() - ts.timestamp)::int as age, + m.sender, m.receiver, m.value / 1e18 as value FROM sent_messages sm diff --git a/prometheus/templates/slack.tmpl b/prometheus/templates/slack.tmpl index 663a672..a830c54 100644 --- a/prometheus/templates/slack.tmpl +++ b/prometheus/templates/slack.tmpl @@ -124,6 +124,7 @@ Stuck ERC_TO_NATIVE message confirmation *Block number:* {{ .CommonLabels.block_number }} *Age:* {{ .CommonAnnotations.age }} *Collected confirmations:* {{ $count := "" }}{{ range .Alerts }}{{ $count = .Labels.count }}{{ end }}{{ $count }} +*Sender:* {{ .CommonLabels.sender }} *Receiver:* {{ .CommonLabels.receiver }} *Value:* {{ .CommonLabels.value }} *Tx:* {{ template "explorer.tx.link" .CommonLabels }}