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

feat: 6 month cost data history #1329

Merged
merged 3 commits into from
Jan 30, 2024
Merged

Conversation

Azanul
Copy link
Collaborator

@Azanul Azanul commented Jan 24, 2024

Problem

Komiser only records cost data from the instant it's started, ignoring past data

Solution

Use AWS cost explorer API to fetch and store 6 months cost history

Screenshots

[Include screenshots, if relevant, to help reviewers understand the changes you made.]

Notes

[Any additional notes or information that you would like to share with the reviewers.]

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Signed-off-by: Azanul <azanulhaque@gmail.com>
Signed-off-by: Azanul <azanulhaque@gmail.com>
@Azanul Azanul marked this pull request as ready for review January 29, 2024 13:39
log.Warn("Failed to extract resources from cost explorer output:", err)
}
for i, resource := range resources {
resource.ResourceId = "OLD_RESOURCE_" + strconv.Itoa(i)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about naming it "OLD_RESOURCE_"+resource.ResourceID for future query if there maybe any

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cost explorer api doesn't give out anything that can be used as resource.ResourceID

@Azanul Azanul merged commit 4749ba3 into tailwarden:develop Jan 30, 2024
3 checks passed
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.

3 participants