Skip to content

Update query-cloudwatch to be able to query multiple dates (LG-11257)#9383

Merged
zachmargolis merged 1 commit intomainfrom
margolis-query-cloudwatch-slices
Oct 16, 2023
Merged

Update query-cloudwatch to be able to query multiple dates (LG-11257)#9383
zachmargolis merged 1 commit intomainfrom
margolis-query-cloudwatch-slices

Conversation

@zachmargolis
Copy link
Contributor

@zachmargolis zachmargolis commented Oct 13, 2023

🎫 Ticket

LG-11257

🛠 Summary of changes

Adds a new --date option to query-cloudwatch that allows using the the time_slices option of our CloudwatchClient to query separate, disjoint dates with the same query, willl help with more efficient use of time in Cloudwatch and lower billing costs.

example:

> aws-vault exec prod-power -- \
  ./bin/query-cloudwatch \
  --date 2023-09-01,2023-08-01 \ # << NEW OPTION
  --env prod --app idp --log events.log \
  --query "fields @timestamp | stats count(*) by bin(1d)" \
  --no-progress
2023-09-01 00:00:00.000,20914416
2023-08-01 00:00:00.000,25423701

* Adds --date option

changelog: Internal, Scripts, Update query-cloudwatch script to able to query multiple dates
@zachmargolis zachmargolis requested review from a team and mitchellhenke October 13, 2023 22:30
@zachmargolis zachmargolis merged commit 1d67947 into main Oct 16, 2023
@zachmargolis zachmargolis deleted the margolis-query-cloudwatch-slices branch October 16, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants