Jump to content

Hornbill Clean Utility


Recommended Posts

Hi everyone

I'm looking to run the Hornbill Clean utility to clear the complete list of assets within the asset list, without touching anything else like tickets users, attachments etc.... I essentially want to wipe the complete asset list to start again.

I've configured my conf.json file as below so it clears just the mobile devices initially. I'll then look to target other asset clases once I'm confident in what I'm doing. My question is, do I need everything else circled in blue, or can I just remove these lines completely from the file? I assume these filters are just used to be more granular on what you're targeting for removal.

 

As I want to remove everything in the mobile device class presumably I only need the two lines highlighted in yellow, is that right?

Leaving everything else to 'false' will presumably leave it all in tact. Is someone able to verify my understanding is correct please?

 

hornbill.JPG

Link to comment
Share on other sites

Hi Steve, thanks for this.

I've performed a dry run and set the conf.json file to target the asset class "monitor" for removal, yet when I check the log file after it's run it lists computers within the log file.

Any idea why this is happening please? Why would it be removing laptops when the asset class has been set to monitors?

image.thumb.png.ed79ae7645533ab327ef7bc6ad346089.png


2024/05/15 15:27:04 [DRYRUN] ********** Cleaner Utility Started **********
2024/05/15 15:27:18 [DRYRUN] Confirmation Prompts Accepted
2024/05/15 15:27:18 [DRYRUN] Config File Name: conf.json
2024/05/15 15:27:18 [DRYRUN] Dry Run: true
2024/05/15 15:27:18 [DRYRUN] Skip Prompts: false
2024/05/15 15:27:19 [DRYRUN] CleanRequests: false
2024/05/15 15:27:19 [DRYRUN] CleanAssets: true
2024/05/15 15:27:19 [DRYRUN] Filtered by AssetClassID: monitor
2024/05/15 15:27:19 [DRYRUN] CleanUsers: false
2024/05/15 15:27:19 [DRYRUN] CleanServiceAvailabilityHistory: false
2024/05/15 15:27:19 [DRYRUN] CleanContacts: false
2024/05/15 15:27:19 [DRYRUN] CleanOrganisations: false
2024/05/15 15:27:19 [DRYRUN] CleanSuppliers: false
2024/05/15 15:27:19 [DRYRUN] CleanSupplierContracts: false
2024/05/15 15:27:19 [DRYRUN] CleanEmails: false
2024/05/15 15:27:19 [DRYRUN] Number of Assets to delete: 10873
2024/05/15 15:27:19 [DRYRUN] [ASSET] ID: Asset Name: PC703090
2024/05/15 15:27:20 [DRYRUN] [ASSET] ID: Asset Name: PC14309
2024/05/15 15:27:20 [DRYRUN] [ASSET] ID: Asset Name: PC10702

Link to comment
Share on other sites

Monitor is not an Asset Class, it's an Asset Type - as the AssetClassID is invalid it's applying to all Classes.

An AssetClassID of computerPeripheral combined with:

"AssetFilters": [
        {
                "ColumnName": "h_type"
                "ColumnValue": 7,
                "Operator": "Equals",
                "IsGeneralProperty": true
        }
],

would remove Monitors in my Instance.
Your h_type values may differ - please check before trying this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...