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

Rudimentary implementation of "uptime" filter #398

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

lyricnz
Copy link
Contributor

@lyricnz lyricnz commented Jul 20, 2024

Per #366 - supports:

  • uptime: > xxx
  • uptime: < yyy
  • uptime: between xxx and yyy
  • uptime: xxx-yyy

Uptime is in hours, and is only really applicable for EC2 instances. For RDS instances, it currently uses the "time since create", since that's all that's available.

@lyricnz
Copy link
Contributor Author

lyricnz commented Jul 20, 2024

This isn't going to work. Sure, if you add an "uptime>1" requirement to a filter, it won't match until the resource has been up for an hour, but it also won't match when it's stopped (so the resource won't get started).

@lyricnz
Copy link
Contributor Author

lyricnz commented Jul 20, 2024

OK, so if the "uptime" filter returns True if the resource is anything but "running", and only in that state compares the actual uptime to the configured value. This would mean that, when stopped (or starting) the filter continues to match.

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