Skip to content

Comments

Metric Based Automatic Clean-up#289

Open
schrieveslaach wants to merge 1 commit intomasterfrom
automatic-back-up
Open

Metric Based Automatic Clean-up#289
schrieveslaach wants to merge 1 commit intomasterfrom
automatic-back-up

Conversation

@schrieveslaach
Copy link
Contributor

Fixes #149

@schrieveslaach schrieveslaach force-pushed the automatic-back-up branch 5 times, most recently from 792d006 to 29019b7 Compare February 18, 2026 16:01
@schrieveslaach schrieveslaach marked this pull request as ready for review February 18, 2026 16:02
apps.into_iter()
.filter(|(_, app)| {
app.created_at
.is_none_or(|created_at| created_at <= time_to_exists_before)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

issue: @aixigo-dvoss reported that just after creation the tile has been immediately backed up. Note to myself: we need some unit testing here.

# UTC based cron expression. When this option is set, PREvant will not perform
# any automated backups.
# (optional): not set by default
busyHours = { start = "0 8 * * * Mon-Fri", end = "0 16 * * * Mon-Fri" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: Improve the example here because the busy hours would be every hour from 8 minutes after to 18 minutes after. Which is weird.

Suggested change
busyHours = { start = "0 8 * * * Mon-Fri", end = "0 16 * * * Mon-Fri" }
busyHours = { start = "0 0 8 * * Mon-Fri", end = "0 0 16 * * Mon-Fri" }

api/src/main.rs Outdated
let config_json = serde_json::json!({
"defaultAppName": config.applications.default_app,
"isAuthRequired": matches!(config.api_access.mode, ApiAccessMode::RequireAuth { .. }),
"isAuthRequired": config.database.is_some() && matches!(config.runtime, Runtime::Kubernetes(..)),
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Pretty sure this change was not intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, not intended. Thanks for letting me know.

This change bring automated backups for PREvant. When configured in
Traefik and in PREvant, PREvant will use router based access metrics
(collected from Traefik via Prometheus) to determine if an application
is not accessed within the `time_to_use` duration. If not accessed
anymore, PREvant will move unused applications into the backup (see
docs/configuration.md for more information).
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.

Automatic Cleanup for PREvant tiles

2 participants