forked from dydxprotocol/v4-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IND-429]: Create precautionary monitors for tracking block processin…
…g speed (dydxprotocol#47)
- Loading branch information
1 parent
d4a305f
commit b1520ec
Showing
5 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
module "indexer_monitors" { | ||
count = var.enable_monitoring ? 1 : 0 | ||
|
||
source = "../modules/indexer_monitors" | ||
env_tag = "v4-${var.environment}" | ||
environment = var.environment | ||
slack_channel = var.monitoring_slack_channel | ||
pagerduty_tag = var.monitoring_pagerduty_tag | ||
ecs_cluster_name = var.full_node_name | ||
msk_cluster_name = aws_msk_cluster.main.cluster_name | ||
team = var.monitoring_team | ||
url = var.indexer_url | ||
source = "../modules/indexer_monitors" | ||
env_tag = "v4-${var.environment}" | ||
environment = var.environment | ||
slack_channel = var.monitoring_slack_channel | ||
pagerduty_tag = var.monitoring_pagerduty_tag | ||
ecs_cluster_name = var.full_node_name | ||
msk_cluster_name = aws_msk_cluster.main.cluster_name | ||
team = var.monitoring_team | ||
url = var.indexer_url | ||
enable_precautionary_monitors = var.enable_precautionary_monitors | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
resource "datadog_monitor_json" "average_block_processing_rate" { | ||
monitor = <<EOF | ||
{ | ||
"id": 117804982, | ||
"name": "[${var.environment}] Average Indexer block processing is slow", | ||
"type": "query alert", | ||
"query": "avg(last_5m):avg:ender.processed_block.timing.avg{env:testnet, service:indexer, success:true} / avg:dydxprotocol.blocktime_block_time_ms{env:testnet} > 0.5", | ||
"message": "This is not an actionable alert. When this alert fires, that means that the Indexer is processing blocks slow and more time should be invested in improving Ender latency. Please notify Trading if this alert fires.\n\n${local.monitor_suffix_literal}", | ||
"tags": [ | ||
"team:${var.team}", | ||
"env:${var.env_tag}" | ||
], | ||
"options": { | ||
"thresholds": { | ||
"critical": 0.5 | ||
}, | ||
"notify_audit": false, | ||
"require_full_window": false, | ||
"notify_no_data": true, | ||
"renotify_interval": 0, | ||
"include_tags": false, | ||
"no_data_timeframe": 60, | ||
"new_host_delay": 300, | ||
"silenced": {} | ||
}, | ||
"priority": null, | ||
"restricted_roles": null | ||
} | ||
EOF | ||
} | ||
|
||
resource "datadog_monitor_json" "p95_block_processing_rate" { | ||
monitor = <<EOF | ||
{ | ||
"id": 117804982, | ||
"name": "[${var.environment}] p95 Indexer block processing is slow", | ||
"type": "query alert", | ||
"query": "avg(last_5m):avg:ender.processed_block.timing.95percentile{env:testnet, service:indexer, success:true} / avg:dydxprotocol.blocktime_block_time_ms{env:testnet} > 0.75", | ||
"message": "This is not an actionable alert. When this alert fires, that means that the Indexer is processing blocks slow and more time should be invested in improving Ender latency. Please notify Trading if this alert fires.\n\n${local.monitor_suffix_literal}", | ||
"tags": [ | ||
"team:${var.team}", | ||
"env:${var.env_tag}" | ||
], | ||
"options": { | ||
"thresholds": { | ||
"critical": 0.75 | ||
}, | ||
"notify_audit": false, | ||
"require_full_window": false, | ||
"notify_no_data": true, | ||
"renotify_interval": 0, | ||
"include_tags": false, | ||
"no_data_timeframe": 60, | ||
"new_host_delay": 300, | ||
"silenced": {} | ||
}, | ||
"priority": null, | ||
"restricted_roles": null | ||
} | ||
EOF | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters