Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 Hi I've changed the way that we're registering a particular software asset because (as seems to be the new normal) we have ONE license key with a set amount of tokens which can be used against that license. So, for instance, we have a software license for 600 users. I've now created a 'Master' asset which holds the license key, and 600 'token' assets which, when used, will be assigned to a user and then linked to the Master asset so that we can keep track of how many licenses we are actually using. This way, if the Master license key changes, we only need to change ONE asset, instead of 600! Unfortunately, the OLD way of doing this (where I just had 600 license assets all linked to the user who used this license) has meant that I now have 600 assets that I need to delete, but I can't because they're all linked to a user and an SR. So, my question is, could the Hornbill Cleaner tool be updated so that I can enter the h_name field from the h_cmdb_assets table and that will delete all assets with that name please? thanks Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 ALSO....is there a limit on the number of entities which can be linked to a particular asset? I'm trying to add these 600 licenses, and it's stopped at 100 with a message saying 'the two assets are already linked' when I try to add any new link.... Link to comment Share on other sites More sharing options...
Steve G Posted October 16, 2020 Share Posted October 16, 2020 Hi @Paul Alexander, We've just released v1.12.0 of the cleaner tool, which allows you to add more complex filters to filter the assets for deletion by. So for example, if you wanted to delete all assets that have a name of YourAssetName, you would apply the following filter in the new AssetFilters array: { "CleanRequests": false, "RequestServices":[], "RequestStatuses":[], "RequestTypes":[], "RequestReferences":[ ], "RequestLogDateFrom":"", "RequestLogDateTo":"", "RequestClosedDateFrom":"", "RequestClosedDateTo":"", "CleanAssets": true, "AssetClassID": "", "AssetTypeID": 0, "AssetFilters": [ { "ColumnName": "h_name", "ColumnValue": "YourAssetName", "Operator": "Equals", "IsGeneralProperty": true } ], "CleanUsers":false, "Users":[] } The way the filters work (including available operators) is all documented on the Hornbill wiki. Re: the 100 link limit, I'm not sure about that so I'll get someone who knows that area of the app a little better to respond. Cheers, Steve Link to comment Share on other sites More sharing options...
Steve G Posted October 16, 2020 Share Posted October 16, 2020 @Paul Alexander Forgot to mention, as with any of the open source tools, and especially those that are destructive, it's highly recommended that you run your new config through this in dryrun mode first and check the logs to make sure the output is going to be as expected! Cheers, Steve Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 Hi @Steve G Thanks for this...it's going to save so much time! And thanks for the reminder to do a dryrun first...hitting that 'run' button is always a scary moment!! Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 16, 2020 Share Posted October 16, 2020 Hi @Paul Alexander there is no limit to the number of entities to link to an asset. The links between assets are stored into h_cmdb_links; may you please double check that there is no record in this table for the 2 entities you cannot link ? Regards Armando Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 Hi @ArmandoDM There IS already a link between these assets - so yes, the error message is genuine (it was just a coincidence that it's happened when I added item no. 100) Is there a way of, when I try to add a new link, to NOT have items which are already linked come up in the search results please? I've now got a point where if I do a search (in this case for anything named Nitro Token), all of the results which come up are already linked so I'm going to have to go through each individual item and link them separately....500 times! Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 16, 2020 Share Posted October 16, 2020 Hi @Paul Alexander if you open the master asset page, in the tab to link assets, the search result does NOT return the assets currently linked. Can you see the linked assets returned instead ? Thanks Armando Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 HI @ArmandoDM If I go to the Master record, and choose the 'link asset' option, and type in 'Nitro Token' (which is the 'name' of the types of assets I want to link) and select any of the options: Then I get this error: It worked fine for the first few times, but I can't get past this now... thanks Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 16, 2020 Share Posted October 16, 2020 Hi @Paul Alexander the search result should not return the assets already linked. I had a try and I cannot replicate this issue. May you try clearing the cache and reload the page please? Armando Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 @Steve G - the tool worked perfectly, thank you. Saved me a ton of time and a lot of headaches... @ArmandoDM - I've cleared the cache and it now seems to be working, thank you. Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 ONE more question though... when I'm searching for assets to link, I can select up to 10 of the same 'name' at a time (so, for instance, I've searched for 'Nitro Token' 10 times and selected 10 items to link) At this point, if I search for 'Nitro Token' again, I get a blank response. However, if I search for ANYTHING else, I get a list of more items that I can select from: (here I've searched for 'server' for instance) Is there a way of increasing the amount of hits I can do per search please? I'm having to do these 10 at a time, and then refresh the page (otherwise I get the error results mentioned earlier in this thread). thanks Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 16, 2020 Share Posted October 16, 2020 @Paul Alexander I think there is some caching logic that prevents you from loading more assets with the same name after loading the first 10. I will report the issue you mentioned for review. Apologies for the inconvenience. Have you tried searching for 'Token' ? It should return 10 more results Regards Armando Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 16, 2020 Share Posted October 16, 2020 @ArmandoDM I did try searching for 'nitro' but it still came up with nothing. I've now finished this little exercise (thankfully) but I reckon it'll be something I have to do again in the near future, so I'll have a look then. Thanks for your help so far.... Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 16, 2020 Share Posted October 16, 2020 No worries @Paul Alexander apologies for the inconvenience. Armando Link to comment Share on other sites More sharing options...
ArmandoDM Posted October 26, 2020 Share Posted October 26, 2020 Hi @Paul Alexander the issue discussed above has been fixed. It will be available in one of the upcoming builds. Regards Armando Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now