Skip to content

Commit

Permalink
Report publishing-api metrics to prometheus hourly
Browse files Browse the repository at this point in the history
22 minutes past the hour is a random choice. Choosing a random value
rather than 0 to avoid a situation where everything happens exactly on
the hour causing load spikes.
  • Loading branch information
richardTowers committed Aug 2, 2024
1 parent f1b0b45 commit 07dee66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/app-config/values-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,9 @@ govukApplications:
- name: events-export
task: "events:export_to_s3"
schedule: "38 5 * * 0"
- name: metrics-report-to-prometheus
task: "metrics:report_to_prometheus"
schedule: "22 * * * *" # every hour, at 22 minutes past the hour

Check warning on line 1857 in charts/app-config/values-integration.yaml

View workflow job for this annotation

GitHub Actions / yamllint

1857:34 [comments] too few spaces before comment
# In non-production envs, run Search API v2 bulk import every week to bring it to parity
# with Publishing API state (which gets refreshed from production DB every night).
- name: search-api-v2-bulk-import
Expand Down
3 changes: 3 additions & 0 deletions charts/app-config/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,9 @@ govukApplications:
- name: events-export
task: "events:export_to_s3"
schedule: "38 5 * * 0"
- name: metrics-report-to-prometheus
task: "metrics:report_to_prometheus"
schedule: "22 * * * *" # every hour, at 22 minutes past the hour

Check warning on line 1897 in charts/app-config/values-production.yaml

View workflow job for this annotation

GitHub Actions / yamllint

1897:34 [comments] too few spaces before comment
- name: search-api-v2-bulk-import
task: "queue:requeue_all_the_ever_published_things[bulk.search_api_v2_sync]"
schedule: "0 0 1 11 *" # arbitrary value (only used as a template but field is required)
Expand Down
3 changes: 3 additions & 0 deletions charts/app-config/values-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,9 @@ govukApplications:
- name: events-export
task: "events:export_to_s3"
schedule: "38 5 * * 0"
- name: metrics-report-to-prometheus
task: "metrics:report_to_prometheus"
schedule: "22 * * * *" # every hour, at 22 minutes past the hour

Check warning on line 1891 in charts/app-config/values-staging.yaml

View workflow job for this annotation

GitHub Actions / yamllint

1891:34 [comments] too few spaces before comment
# In non-production envs, run Search API v2 bulk import every week to bring it to parity
# with Publishing API state (which gets refreshed from production DB every night).
- name: search-api-v2-bulk-import
Expand Down

0 comments on commit 07dee66

Please sign in to comment.