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

Add personal usage data to reports #27

Open
natanlao opened this issue Oct 28, 2020 · 5 comments
Open

Add personal usage data to reports #27

natanlao opened this issue Oct 28, 2020 · 5 comments
Assignees
Labels
code [subject] Production code enh [type] New feature or request

Comments

@natanlao
Copy link
Contributor

We will enhance the existing automated reporting tool to generate and
distribute personal usage reports, via the owner tag e-mails, about
what resources any person has outstanding on any given day. These will
replace the existing global reports for everyone who doesn't need an
overview of the whole lab's usage, and they will serve to remind
people whan they've left instances running and how much they in
particular are spending. (We probably don't want to send these when
the only resources are SSH keys.) The subject line can include the
amount of money spent that day (e.g. "AWS report: You spent $123.45 on
October 3, 2020"). The report body should include some boilerplate
guidance about the appropriate dollar value figures to use when
thinking about trade-offs between the lab's money and one's own time.

@melainalegaspi melainalegaspi added code [subject] Production code enh [type] New feature or request labels Oct 29, 2020
@natanlao
Copy link
Contributor Author

From Benedict: for the sake of transparency, personal reports should highlight personal usage, and summary of individual use should be available to everybody.

@natanlao
Copy link
Contributor Author

natanlao commented Dec 7, 2020

From Benedict: personal reports should also account for S3 usage.

@natanlao
Copy link
Contributor Author

This can likely be accomplished by grouping on the resourceTags/user:owner column, unless changed by #33

@natanlao
Copy link
Contributor Author

I was unable to complete this ticket. I wanted to complete #33 first to make this easier.

Implementing this may require a deeper architectural change and may warrant removing Docker functionality. Broadly speaking, these are the approaches I had in mind in order from least work to most work:

  1. Remove Docker dependency and interface with sendmail via subprocess
  2. Keep Docker dependency, connect container to host sendmail
  3. Keep Docker dependency, dump generated emails to a folder on the host and send them from the host

There are more approaches, but I was thinking about taking approach 1 and using it as an excuse to more tightly couple the failed report retry functionality.

@Richard-Hansen
Copy link
Contributor

Clarification: We want to send emails to the owners of a resource to remind them that they have the resource up and running. Thus, we can only send remind users if they tag their resources with their email address. (CloudCustodian provides regex filtering, so we can easily compile a list of resources that have emails as tags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code [subject] Production code enh [type] New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants