Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Stabilize API HTTP alarms and remove thumbnails alarms runbooks (#3523)

Krystle Salazarde6707c4b354
diff --git a/documentation/meta/monitoring/runbooks/api_http_2xx_under_threshold.md b/documentation/meta/monitoring/runbooks/api_http_2xx_under_threshold.md
index bcaf33a70..64b3e6e70 100644
--- a/documentation/meta/monitoring/runbooks/api_http_2xx_under_threshold.md
+++ b/documentation/meta/monitoring/runbooks/api_http_2xx_under_threshold.md
@@ -1,12 +1,12 @@
# Run Book: API Production HTTP 2XX responses count under threshold
```{admonition} Metadata
-Status: **Unstable**
+Status: **Stable**
-Maintainer: @krysaldb
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Production+2XX+responses+count+under+threshold?>
+Alarm links:
+- [Alarm details](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Production+HTTP+2XX+responses+count+under+threshold?)
+- [ECS-Production-Dashboard](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards/dashboard/ECS-Production-Dashboard)
+- [Production Database + Elasticsearch dashboard](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards/dashboard/Service-Overview)
```
## Severity Guide
diff --git a/documentation/meta/monitoring/runbooks/api_http_5xx_above_threshold.md b/documentation/meta/monitoring/runbooks/api_http_5xx_above_threshold.md
index 6c90b62e7..4e08e2806 100644
--- a/documentation/meta/monitoring/runbooks/api_http_5xx_above_threshold.md
+++ b/documentation/meta/monitoring/runbooks/api_http_5xx_above_threshold.md
@@ -1,12 +1,13 @@
# Run Book: API Production HTTP 5XX responses count above threshold
```{admonition} Metadata
-Status: **Unstable**
+Status: **Stable**
-Maintainer: @krysaldb
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Production+2XX+responses+count+above+threshold?>
+Alarm links:
+- [Alarm details](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Production+HTTP+5XX+responses+count+over+threshold)
+- [API Production log group][log_group]
+- [ECS-Production-Dashboard](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards/dashboard/ECS-Production-Dashboard)
+- [Production Database + Elasticsearch dashboard](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards/dashboard/Service-Overview)
```
## Severity Guide
@@ -19,7 +20,20 @@ short time then the severity is low.
If the issue is not related to known recurrent events and persists, the severity
is critical. Check if dependent services –DB, Redis, Elasticsearch– are
-available to the API or if the problem is intrinsic to itself.
+available to the API or if the problem is intrinsic to itself. To gather more
+information check the [log group][log_group], use the "Logs Insights" view to
+query for requests that failed using a CloudWatch query similar to the following
+which can give more hints about where is the problem.
+
+```
+fields request, @timestamp, @message
+| filter status >= 500
+| sort @timestamp desc
+| limit 20
+```
+
+[log_group]:
+ https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/$252Fecs$252Fproduction$252Fapi
## Historical false positives
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_above_threshold.md b/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_above_threshold.md
deleted file mode 100644
index 4cd496397..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_above_threshold.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Run Book: API Thumbnails Production Average Response Time above threshold
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @stacimc
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+Average+Response+Time+above+threshold>
-```
-
-## Severity Guide
-
-If the avg response time is not [anomalously high][anomaly_alarm], the severity
-is likely low. Check for a recent deployment that may have introduced the
-problem, and rollback to the previous version. If not, check the request count
-and general network activity. If abnormally high, refer to the [traffic analysis
-run book][traffic_runbook] to identify and block any malicious traffic.
-
-[anomaly_alarm]:
- https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+Average+Response+Time+anomalously+high
-[traffic_runbook]:
- /meta/monitoring/traffic/runbooks/identifying-and-blocking-traffic-anomalies.md
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-- 2023-09-26 at 14:38 UTC: API Thumbnail service overwhelmed (traffic analysis
- example)
-- 2023-09-25 at 16:23 UTC: API Thumbnails unhealthy hosts
-- 2023-09-05 at 22:15 UTC: Unhealthy thumbnail tasks restarted
-- 2023-07-27 at 19:14 UTC: API Thumbnails unhealthy hosts
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_anomaly.md b/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_anomaly.md
deleted file mode 100644
index 8e6602b0b..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_avg_response_time_anomaly.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Run Book: API Thumbnails Production Average Response Time anomalously high
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @stacimc
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+Average+Response+Time+anomalously+high>
-```
-
-## Severity Guide
-
-Confirm that there is not a total outage of the service. If not, the severity is
-likely low. Check for a recent deployment that may have introduced the problem,
-and rollback to the previous version. If not, check the request count and
-general network activity. If abnormally high, refer to the [traffic analysis run
-book][traffic_runbook] to identify and block any malicious traffic.
-
-[traffic_runbook]:
- /meta/monitoring/traffic/runbooks/identifying-and-blocking-traffic-anomalies.md
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-- 2023-09-26 at 14:38 UTC: API Thumbnail service overwhelmed (traffic analysis
- example)
-- 2023-09-25 at 16:23 UTC: API Thumbnails unhealthy hosts
-- 2023-09-05 at 22:15 UTC: Unhealthy thumbnail tasks restarted
-- 2023-07-27 at 19:14 UTC: API Thumbnails unhealthy hosts
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_http_2xx_under_threshold.md b/documentation/meta/monitoring/runbooks/api_thumbnails_http_2xx_under_threshold.md
deleted file mode 100644
index 719c5e58b..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_http_2xx_under_threshold.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Run Book: API Thumbnails Production HTTP 2XX responses count under threshold
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @krysaldb
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+HTTP+2XX+responses+count+under+threshold?>
-```
-
-## Severity Guide
-
-After confirming there is not a total outage, check if the overall request count
-has decreased as well (go to the [CloudWatch dashboard][cloudwatch] or
-alternatively check in CloudFlare). If the overall requests are lower then the
-severity is low, and you should continue searching for the cause of the general
-decrease.
-
-If the lower number is only in 2XX responses the severity is likely high, so
-also check the dashboard to look for other anomalies. Verify if any of the
-thumbnail providers are experiencing an outage or are rate-limiting Openverse.
-Go to the [API logs][api_logs] to check for errors or data that yield clues.
-
-[cloudwatch]:
- https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards/dashboard/ECS-Production-Dashboard
-[api_logs]:
- https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/$252Fecs$252Fproduction$252Fapi
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-Nothing registered to date.
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_http_5xx_above_threshold.md b/documentation/meta/monitoring/runbooks/api_thumbnails_http_5xx_above_threshold.md
deleted file mode 100644
index 83acf7a0b..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_http_5xx_above_threshold.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Run Book: API Thumbnails Production HTTP 5XX responses count above threshold
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @krysaldb
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+HTTP+5XX+responses+count+under+threshold?>
-```
-
-## Severity Guide
-
-After confirming there is not a total outage, check if the increase of 5XX HTTP
-errors is related to a regular time where resources are expected to be
-constrained like a recent deployment, a data refresh, DB maintenance, etc. If
-the spike is related to one of these events and the alarms stabilizes in the
-short time then the severity is low.
-
-If the issue is not related to known recurrent events and persists, the severity
-is critical. Check if dependent services –DB, Redis, Elasticsearch– are
-available to the API or if the problem is intrinsic to itself.
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-- 2023-09-27 from 16:15 to 18:00 UTC: 5XX responses spike between 983 and 1434
- due to unstable tasks.
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_above_threshold.md b/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_above_threshold.md
deleted file mode 100644
index 0cf613d56..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_above_threshold.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Run Book: API Thumbnails Production P99 Response Time above threshold
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @stacimc
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+P99+Response+Time+above+threshold>
-```
-
-## Severity Guide
-
-If the P99 response time is not [anomalously high][anomaly_alarm], the severity
-is likely low. Check for a recent deployment that may have introduced the
-problem, and rollback to the previous version. If not, check the request count
-and general network activity. If abnormally high, refer to the [traffic analysis
-run book][traffic_runbook] to identify and block any malicious traffic.
-
-[anomaly_alarm]:
- https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+P99+Response+Time+anomalously+high
-[traffic_runbook]:
- /meta/monitoring/traffic/runbooks/identifying-and-blocking-traffic-anomalies.md
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-- 2023-09-26 at 14:38 UTC: API Thumbnail service overwhelmed (traffic analysis
- example)
-- 2023-09-25 at 16:23 UTC: API Thumbnails unhealthy hosts
-- 2023-09-05 at 22:15 UTC: Unhealthy thumbnail tasks restarted
-- 2023-07-27 at 19:14 UTC: API Thumbnails unhealthy hosts
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_anomaly.md b/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_anomaly.md
deleted file mode 100644
index 440af3e7a..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_p99_response_time_anomaly.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Run Book: API Thumbnails Production P99 Response Time anomalously high
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @stacimc
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+P99+Response+Time+anomalously+high>
-```
-
-## Severity Guide
-
-Confirm that there is not a total outage of the service. If not, the severity is
-likely low. Check for a recent deployment that may have introduced the problem,
-and rollback to the previous version. If not, check the request count and
-general network activity. If abnormally high, refer to the [traffic analysis run
-book][traffic_runbook] to identify and block any malicious traffic.
-
-[traffic_runbook]:
- /meta/monitoring/traffic/runbooks/identifying-and-blocking-traffic-anomalies.md
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-- 2023-09-26 at 14:38 UTC: API Thumbnail service overwhelmed (traffic analysis
- example)
-- 2023-09-25 at 16:23 UTC: API Thumbnails unhealthy hosts
-- 2023-09-05 at 22:15 UTC: Unhealthy thumbnail tasks restarted
-- 2023-07-27 at 19:14 UTC: API Thumbnails unhealthy hosts
diff --git a/documentation/meta/monitoring/runbooks/api_thumbnails_request_count_anomaly.md b/documentation/meta/monitoring/runbooks/api_thumbnails_request_count_anomaly.md
deleted file mode 100644
index 255c43db2..000000000
--- a/documentation/meta/monitoring/runbooks/api_thumbnails_request_count_anomaly.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Run Book: API Thumbnails Production Request Count anomalously high
-
-```{admonition} Metadata
-Status: **Unstable**
-
-Maintainer: @krysaldb
-
-Alarm link:
-- <https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#alarmsV2:alarm/API+Thumbnails+Production+Request+Count+anomalously+high>
-```
-
-## Severity Guide
-
-When a sudden increase in request count is noticed, verify that the services are
-supporting the load by looking at metrics like response time or ES CPU usage for
-example. If the API is doing fine, then severity is low and may only require
-future resource scaling depending on the kind of traffic.
-
-If the services are strained then the severity is critical, search for the root
-cause to prevent more serious outages. If there are no recent obvious
-integrations (like the Gutenberg plugin) then follow the run book to [identify
-traffic anomalies in Cloudflare][runbook_traffic], to determine whether the
-recent traffic is organic or if it comes from a botnet. Find the origin of
-requests and evaluate whether it needs to be blocked or if Openverse services
-need to adapt to the new demand.
-
-[traffic_runbook]:
- /meta/monitoring/traffic/runbooks/identifying-and-blocking-traffic-anomalies.md
-
-## Historical false positives
-
-Nothing registered to date.
-
-## Related incident reports
-
-Nothing registered to date.
diff --git a/documentation/meta/monitoring/runbooks/index.md b/documentation/meta/monitoring/runbooks/index.md
index 13b661174..cf3fd0531 100644
--- a/documentation/meta/monitoring/runbooks/index.md
+++ b/documentation/meta/monitoring/runbooks/index.md
@@ -19,13 +19,6 @@ api_avg_response_time_anomaly
api_p99_response_time_above_threshold
api_p99_response_time_anomaly
api_request_count_anomaly
-api_thumbnails_http_2xx_under_threshold
-api_thumbnails_http_5xx_above_threshold
-api_thumbnails_request_count_anomaly
-api_thumbnails_avg_response_time_above_threshold
-api_thumbnails_avg_response_time_anomaly
-api_thumbnails_p99_response_time_above_threshold
-api_thumbnails_p99_response_time_anomaly
nuxt_http_2xx_under_threshold
nuxt_http_5xx_above_threshold
nuxt_avg_response_time_above_threshold