Feature #12163
closedAdd ability to expire facts based on fact name.
Description
Currently there isn't a way to expire old facts that are no longer being collected from the database. This feature adds a rake task similar to reports:expire to delete facts based on the provided fact name.
Updated by Ohad Levy almost 9 years ago
- Status changed from New to Need more information
once new facts comes in, old facts (e.g. facts that dont exists in the new facts set) gets deleted automatically.
Updated by Ryan Sabatini almost 9 years ago
Ohad Levy wrote:
once new facts comes in, old facts (e.g. facts that dont exists in the new facts set) gets deleted automatically.
If I stop collecting a custom fact or rename the custom fact, does that fact automatically get deleted? The main reason I came up with the solution is that we were collecting some poorly built custom facts that resulted in ~174k fact_name entries and ~12 million fact values in the database. The sheer volume of the facts broke the javascript on the drop down box for "Trendable" when creating a new trend counter.
We have since stopped collecting the facts that were adding the extra entries that we weren't really using. I have come up with a coded solution similar to reports:expire that allows me to delete the fact name and values for the fact names that we are not longer collecting which allowed me to get the total values down far enough to use the trendable drop down box to create a new trend.
Updated by Dominic Cleal almost 9 years ago
- Status changed from Need more information to New
Ryan Sabatini wrote:
Ohad Levy wrote:
once new facts comes in, old facts (e.g. facts that dont exists in the new facts set) gets deleted automatically.
If I stop collecting a custom fact or rename the custom fact, does that fact automatically get deleted?
It should delete the fact values, but not the fact names. If there were many custom fact names added, as you suggest, then these don't get cleaned up during an import of facts for a host (assuming no other host has a value for it).
I'm changing the ticket status as I think what you're describing is valid.
Updated by Dominic Cleal about 8 years ago
- Related to Bug #16576: Structured facts importer is extremely slow added
Updated by Marek Hulán over 7 years ago
- Has duplicate Feature #18479: Add a rake task to cleanup facts that are not used anymore added
Updated by The Foreman Bot over 7 years ago
- Status changed from New to Ready For Testing
- Assignee set to Marek Hulán
- Pull request https://github.com/theforeman/foreman/pull/4275 added
Updated by Marek Hulán over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 89d84f633bf2d2ff4390ffe98ae701f06a8763ef.
Updated by Dominic Cleal over 7 years ago
- Translation missing: en.field_release set to 209