Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions crates/apollo_dashboard/resources/dev_grafana_alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,58 @@
"for": "30s",
"severity": "p2"
},
{
"name": "strk_to_usd_error_count",
"title": "Strk to Usd error count",
"ruleGroup": "evaluation_rate_default",
"expr": "(sum(increase(snip35_strk_usd_error_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1h])) or vector(0)) and on() (is_observer{cluster=~\"$cluster\", namespace=~\"$namespace\"} == 0)",
"conditions": [
{
"evaluator": {
"params": [
10.0
],
"type": "gt"
},
"operator": {
"type": "and"
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"for": "1m",
"severity": "p5"
},
{
"name": "strk_to_usd_success_count",
"title": "Strk to Usd success count",
"ruleGroup": "evaluation_rate_default",
"expr": "(sum(increase(snip35_strk_usd_success_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1h]))) and on() (is_observer{cluster=~\"$cluster\", namespace=~\"$namespace\"} == 0)",
"conditions": [
{
"evaluator": {
"params": [
1.0
],
"type": "lt"
},
"operator": {
"type": "and"
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"for": "30s",
"severity": "$$$strk_to_usd_success_count-severity$$$"
},
{
"name": "sync_storage_open_read_transactions",
"title": "sync - High number of open read transactions",
Expand Down
4 changes: 4 additions & 0 deletions crates/apollo_dashboard/src/alert_definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ use crate::alert_scenarios::l1_gas_prices::{
get_eth_to_strk_success_count_alert,
get_l1_gas_price_provider_insufficient_history_alert,
get_l1_gas_price_scraper_success_count_alert,
get_strk_to_usd_error_count_alert,
get_strk_to_usd_success_count_alert,
};
use crate::alert_scenarios::l1_handlers::{
get_l1_handler_transaction_waiting_in_l1_alert,
Expand Down Expand Up @@ -605,6 +607,7 @@ pub fn get_apollo_alerts() -> Alerts {
get_consensus_round_above_zero(),
get_consensus_votes_num_sent_messages_alert(),
get_eth_to_strk_error_count_alert(),
get_strk_to_usd_error_count_alert(),
get_gateway_add_tx_idle(),
get_gateway_proof_archive_write_failure(),
get_general_pod_state_not_ready(),
Expand Down Expand Up @@ -636,6 +639,7 @@ pub fn get_apollo_alerts() -> Alerts {
alerts.push(get_consensus_round_above_zero_multiple_times());
alerts.push(get_consensus_round_high());
alerts.push(get_eth_to_strk_success_count_alert());
alerts.push(get_strk_to_usd_success_count_alert());
alerts.append(&mut get_general_pod_memory_utilization_vec());
alerts.append(&mut get_general_pod_disk_utilization_vec());
alerts.push(get_http_server_avg_add_tx_latency_alert());
Expand Down
21 changes: 21 additions & 0 deletions crates/apollo_dashboard/src/alert_scenarios/l1_gas_prices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use apollo_l1_gas_price::metrics::{
ETH_TO_STRK_SUCCESS_COUNT,
L1_GAS_PRICE_PROVIDER_INSUFFICIENT_HISTORY,
L1_GAS_PRICE_SCRAPER_SUCCESS_COUNT,
SNIP35_STRK_USD_ERROR_COUNT,
SNIP35_STRK_USD_SUCCESS_COUNT,
};
use apollo_metrics::metrics::MetricQueryName;

Expand Down Expand Up @@ -38,6 +40,25 @@ pub(crate) fn get_eth_to_strk_error_count_alert() -> Alert {
)
}

pub(crate) fn get_strk_to_usd_success_count_alert() -> Alert {
const ALERT_NAME: &str = "strk_to_usd_success_count";
oracle_success_count_alert(
ALERT_NAME,
"Strk to Usd success count",
&SNIP35_STRK_USD_SUCCESS_COUNT,
SeverityValueOrPlaceholder::Placeholder(ALERT_NAME.to_string()),
)
}

pub(crate) fn get_strk_to_usd_error_count_alert() -> Alert {
oracle_error_count_alert(
"strk_to_usd_error_count",
"Strk to Usd error count",
&SNIP35_STRK_USD_ERROR_COUNT,
AlertSeverity::Informational,
)
}

/// Alert if had no successful l1 gas price scrape in the last hour.
///
/// Uses `sum_increase` for the same spot-eviction reason as `get_eth_to_strk_success_count_alert`.
Expand Down
Loading