Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Lagniappe Cleanups (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethen Pociask authored Aug 30, 2023
1 parent 63104d3 commit 840073f
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 72 deletions.
21 changes: 15 additions & 6 deletions docs/architecture/alerting.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ end
subgraph AM["Alerting Manager"]
alertingRelay --> |Alert|EL
EL[eventLoop] --> |Alert SUUID|AS["AlertStore"]
AS --> |Alert Destination|EL
EL --> |Submit alert|AD[Destination]
AD --> |Slack|SH["Slack Handler"]
AD --> |counterParty|CPH["Counterparty Handler"]
AS --> |Alert Policy|EL
EL --> |Submit alert|SR["SeverityRouter"]
SR --> SH["Slack"]
SR --> PH["PagerDuty"]
SR --> CPH["CounterParty Handler"]

end
CPH --> |"HTTP POST"|TPH["Third Party API"]
SH --> |"HTTP POST"|SlackAPI("Slack Webhook API")
PH --> |"HTTP POST"|PagerDutyAPI("PagerDuty API")

</div>
{% endraw %}

Expand All @@ -49,9 +52,12 @@ An alert destination is a configurable destination that an alert can be sent to.
#### Slack
The Slack alert destination is a configurable destination that allows alerts to be sent to a specific Slack channel. The Slack alert destination will be configured with a Slack webhook URL. The Slack alert destination will then use this URL to send alerts to the specified Slack channel.

**NOTE: As of now Pessimism can only post alerts to a single slack channel**

### Cooldown
#### PagerDuty
The PagerDuty alert destination is a configurable destination that allows alerts to be sent to a specific PagerDuty services via the use of integration keys. Pessimism also uses the SUUID associated with an alert as a deduplication key for PagerDuty. This is done to ensure that PagerDuty will not be spammed with duplicate or incidents.


### Alert CoolDowns
To ensure that alerts aren't spammed to destinations once invoked, a time based cooldown value (`cooldown_time`) can be defined within the `alert_params` of a heuristic session config. This time value determines how long a heuristic session must wait before being allowed to alert again.

An example of this is shown below:
Expand All @@ -73,3 +79,6 @@ An example of this is shown below:
}
}
```

### Alert Messages
Pessimism allows for the arbitrary customization of alert messages. This is done by defining an `message` value string within the `alerting_params` of a heuristic session bootstrap config or session creation request. This is critical for providing additional context on alerts that allow for easier ingestion by downstream consumers (i.e, alert responders).
2 changes: 1 addition & 1 deletion genesis.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"heuristic_params": {
"address": "0xfC0157aA4F5DB7177830ACddB3D5a9BB5BE9cc5e",
"args": ["Transfer(address, address, uint256)"]
"args": ["Transfer(address,address,uint256)"]
}
},
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
65 changes: 0 additions & 65 deletions mocks/alert_client.go

This file was deleted.

0 comments on commit 840073f

Please sign in to comment.