guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 119 forks source link

add `uploadedInLastFiveMinutes` to the imageCounts #4185

Closed twrichards closed 8 months ago

twrichards commented 8 months ago

Now that the reaper is back in action (see https://github.com/guardian/grid/pull/4145) we can no longer rely on the total count in ES for the alarms which hang-off the metrics produced by image-counter-lambda (see https://github.com/guardian/editorial-tools-platform/blob/main/cloudformation/media-service-account/image-counter-lambda.yaml). These alarms exist for two reasons...

  1. to alarm when we have an ingestion issue (i.e. total count wasn't rising)
  2. to alarm when we lose lots of images (as has happened in the past 😬)

This PR facilitates a new alarm to capture reason 1.

2 is much harder since we're reaping at a variable rate (effectively based on the ingestion rate from the moment 20 days prior).

prout-bot commented 8 months ago

Seen on auth, usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (merged by @twrichards 9 minutes and 57 seconds ago) Please check your changes!