Fix confirmation count in alerts
This commit is contained in:
parent
4f6313b32b
commit
e0f4bcae95
|
@ -151,7 +151,7 @@ route:
|
||||||
group_by: [ "..." ]
|
group_by: [ "..." ]
|
||||||
routes:
|
routes:
|
||||||
- receiver: slack-stuck-message
|
- receiver: slack-stuck-message
|
||||||
group_by: [ "bridge_id", "chain_id", "block_number", "tx_hash" ]
|
group_by: [ "alertname", "bridge_id", "chain_id", "block_number", "tx_hash" ]
|
||||||
matchers:
|
matchers:
|
||||||
- alertname = StuckMessage
|
- alertname = StuckMessage
|
||||||
- receiver: slack-unknown-confirmation
|
- receiver: slack-unknown-confirmation
|
||||||
|
|
|
@ -8,7 +8,7 @@ Stuck AMB message confirmation
|
||||||
*Chain ID:* {{ .CommonLabels.chain_id }}
|
*Chain ID:* {{ .CommonLabels.chain_id }}
|
||||||
*Block number:* {{ .CommonLabels.block_number }}
|
*Block number:* {{ .CommonLabels.block_number }}
|
||||||
*Age:* {{ .CommonAnnotations.age }}
|
*Age:* {{ .CommonAnnotations.age }}
|
||||||
*Collected confirmations:* {{ .CommonLabels.count }}
|
*Collected confirmations:* {{ $count := "" }}{{ range .Alerts }}{{ $count = .Labels.count }}{{ end }}{{ $count }}
|
||||||
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ Stuck AMB information request
|
||||||
*Chain ID:* {{ .CommonLabels.chain_id }}
|
*Chain ID:* {{ .CommonLabels.chain_id }}
|
||||||
*Block number:* {{ .CommonLabels.block_number }}
|
*Block number:* {{ .CommonLabels.block_number }}
|
||||||
*Age:* {{ .CommonAnnotations.age }}
|
*Age:* {{ .CommonAnnotations.age }}
|
||||||
*Collected confirmations:* {{ .CommonLabels.count }}
|
*Collected confirmations:* {{ $count := "" }}{{ range .Alerts }}{{ $count = .Labels.count }}{{ end }}{{ $count }}
|
||||||
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ Validators signed different AMB information request results
|
||||||
*Block number:* {{ .CommonLabels.block_number }}
|
*Block number:* {{ .CommonLabels.block_number }}
|
||||||
*Age:* {{ .CommonAnnotations.age }}
|
*Age:* {{ .CommonAnnotations.age }}
|
||||||
*Message id:* {{ .CommonLabels.message_id }}
|
*Message id:* {{ .CommonLabels.message_id }}
|
||||||
*Distinct information signatures:* {{ .CommonLabels.count }}
|
*Distinct information signatures:* {{ $count := "" }}{{ range .Alerts }}{{ $count = .Labels.count }}{{ end }}{{ $count }}
|
||||||
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ Stuck ERC_TO_NATIVE message confirmation
|
||||||
*Chain ID:* {{ .CommonLabels.chain_id }}
|
*Chain ID:* {{ .CommonLabels.chain_id }}
|
||||||
*Block number:* {{ .CommonLabels.block_number }}
|
*Block number:* {{ .CommonLabels.block_number }}
|
||||||
*Age:* {{ .CommonAnnotations.age }}
|
*Age:* {{ .CommonAnnotations.age }}
|
||||||
*Collected confirmations:* {{ .CommonLabels.count }}
|
*Collected confirmations:* {{ $count := "" }}{{ range .Alerts }}{{ $count = .Labels.count }}{{ end }}{{ $count }}
|
||||||
*Receiver:* {{ .CommonLabels.receiver }}
|
*Receiver:* {{ .CommonLabels.receiver }}
|
||||||
*Value:* {{ .CommonLabels.value }}
|
*Value:* {{ .CommonLabels.value }}
|
||||||
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
*Tx:* {{ template "explorer.tx.link" .CommonLabels }}
|
||||||
|
|
|
@ -62,6 +62,7 @@ func (r *signedInformationRequestsRepo) FindByMessageID(ctx context.Context, bri
|
||||||
q, args, err := sq.Select("*").
|
q, args, err := sq.Select("*").
|
||||||
From(r.table).
|
From(r.table).
|
||||||
Where(sq.Eq{"bridge_id": bridgeID, "message_id": messageID}).
|
Where(sq.Eq{"bridge_id": bridgeID, "message_id": messageID}).
|
||||||
|
OrderBy("signer").
|
||||||
PlaceholderFormat(sq.Dollar).
|
PlaceholderFormat(sq.Dollar).
|
||||||
ToSql()
|
ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -59,6 +59,7 @@ func (r *signedMessagesRepo) FindByMsgHash(ctx context.Context, bridgeID string,
|
||||||
q, args, err := sq.Select("*").
|
q, args, err := sq.Select("*").
|
||||||
From(r.table).
|
From(r.table).
|
||||||
Where(sq.Eq{"bridge_id": bridgeID, "msg_hash": msgHash}).
|
Where(sq.Eq{"bridge_id": bridgeID, "msg_hash": msgHash}).
|
||||||
|
OrderBy("signer").
|
||||||
PlaceholderFormat(sq.Dollar).
|
PlaceholderFormat(sq.Dollar).
|
||||||
ToSql()
|
ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue