Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add socks monitor for stream_destroyed_errors #92

Merged
merged 1 commit into from
Apr 2, 2024
Merged
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
27 changes: 27 additions & 0 deletions modules/indexer_monitors/precautionary_monitors.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,30 @@ resource "datadog_monitor_json" "rds_read_replica_lag" {
}
EOF
}

resource "datadog_monitor_json" "websocket_stream_destroyed" {
monitor = <<EOF
{
"id": 2836481,
"name": "[${var.environment}] Underlying socket was destroyed, leading to lost websocket messages.",
"type": "query alert",
"query": "sum(last_5m):avg:socks.ws_send.stream_destroyed_errors{env:${var.environment}}.as_count() > 500",
"message": "Underlying socket was destroyed, leading to lost messages. Check if there are any CPU/memory spikes on any specific tasks. This should auto-recover.\n\n${local.monitor_suffix_literal}",
"tags": [
"team:${var.team}",
"env:${var.env_tag}"
],
"options": {
"thresholds": {
"critical": 500
},
"notify_audit": false,
"include_tags": false,
"notify_no_data": false,
"silenced": {}
},
"priority": null,
"restricted_roles": null
}
EOF
}
Loading