Hello,
I’m looking for an automated way to clean up some old actions from the console. While I’m aware that the BES Admin Tool can handle this, my situation is a bit more specific.
For example, I have a patch policy that runs multiple times a day, and it often interferes with other actions in the console, making it difficult to track them properly.
My question is: Is there a way to automate BigFix to remove these actions after a set number of days or hours? For instance, can it be configured to automatically clean up expired tasks containing “PP_Task ABCDE” in the name?
Any known solutions or workarounds would be greatly appreciated.
Thank you!
Yes, it can be done with scripting. We do this via Python and API calls. It really is up to you and your business needs for what you want to delete and when.
As a summarized overview, this is what we do.
- Call Query API to get a list of actions and the associated metadata we want such as ID, Name, create time, start/stop time, state (open, expired, etc) among other fields.
- Based on state of Open, Expired, or Stopped, name/title, addition of comments on the action, we do different things.
- We convert “BigFix” time to something more easily to work with in Python as we loop the different states
- Open actions that do not contain specific naming parterns and are older than XX days we stop.
- Stopped actions older than XX days we delete.
- Expired actions older than XX days and with our patching name standards, we keep for ~90 days while other actions we delete after ~30 days.
- The default timeout for HTTP sessions is 5mins, so you will also need to have logic for tasks that can go past 5minutes such as deleting multiple thousand actions.
- We also have a separate automated process to import data into our enterprise technology teams DB for reporting so we have data going back for a year+. It’s probably better to use BigFix Insights if you have Lifecycle licensing honestly… We’re doing what we are doing for business reasons though.