[GH-ISSUE #250] Auto delete logs in self hosted version #181

Closed
opened 2026-02-25 23:41:29 +03:00 by kerem · 4 comments
Owner

Originally created by @Foddy on GitHub (May 5, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/250

I couldn’t find any information about that in the docs so I am wondering if the self hosted version is able to automatically remove old logs from pings?

I have some jobs running every minute. I don’t want to imagine how many no longer relevant rows my database will have in a few months... :S

Originally created by @Foddy on GitHub (May 5, 2019). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/250 I couldn’t find any information about that in the docs so I am wondering if the self hosted version is able to automatically remove old logs from pings? I have some jobs running every minute. I don’t want to imagine how many no longer relevant rows my database will have in a few months... :S
kerem closed this issue 2026-02-25 23:41:29 +03:00
Author
Owner

@Foddy commented on GitHub (May 5, 2019):

I am blind. Sorry.

<!-- gh-comment-id:489431468 --> @Foddy commented on GitHub (May 5, 2019): I am blind. Sorry.
Author
Owner

@yonas commented on GitHub (Apr 25, 2021):

@Foddy I'm looking for an automated method as well. What did you find?

<!-- gh-comment-id:826172776 --> @yonas commented on GitHub (Apr 25, 2021): @Foddy I'm looking for an automated method as well. What did you find?
Author
Owner

@cuu508 commented on GitHub (May 3, 2021):

@yonas – there is a prunepings management command (details in README). Run it regularly from e.g. a cron job.

<!-- gh-comment-id:831261591 --> @cuu508 commented on GitHub (May 3, 2021): @yonas – there is a `prunepings` management command ([details in README](https://github.com/healthchecks/healthchecks#database-cleanup)). Run it regularly from e.g. a cron job.
Author
Owner

@yonas commented on GitHub (May 3, 2021):

@cuu508 -- Thanks! I've created a pull request so it can find Python 3. https://github.com/healthchecks/healthchecks/pull/504

However, after running the script, I still see log entries in the web UI when looking at a check's details page.

On first run, it reports deleted a couple thousand pings. On second run, immediately after, it reports 0 pings pruned. It seems like the web UI is either caching pings or using another source to fetch ping logs.

<!-- gh-comment-id:831389905 --> @yonas commented on GitHub (May 3, 2021): @cuu508 -- Thanks! I've created a pull request so it can find Python 3. https://github.com/healthchecks/healthchecks/pull/504 However, after running the script, I still see log entries in the web UI when looking at a check's details page. On first run, it reports deleted a couple thousand pings. On second run, immediately after, it reports 0 pings pruned. It seems like the web UI is either caching pings or using another source to fetch ping logs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#181
No description provided.