Hi all,
We're running out of disk space on our cloud environment. Appian Support has identified that the main culprits are our Knowledge Centers. They can't however identify which specific Knowledge Centers are the largest. We have over a hundred though so it may just be an accumulation of them all.
But anyway, I need to find all their individual sizes and am hoping someone knows how to do this without manually checking each Knowledge Center's properties?
An option I'm trying is:
a!localVariables( local!knowledgeCenter: cons!ABC_KNOWLEDGE_CENTER_PROPERTIES, a!forEach( items: local!knowledgeCenter, expression: { creator: knowledgecenter(fv!item, "creator"), dateCreated: knowledgecenter(fv!item, "dateCreated"), description: knowledgecenter(fv!item, "description"), id: knowledgecenter(fv!item, "id"), name: knowledgecenter(fv!item, "name"), numberOfDocuments: knowledgecenter(fv!item, "numberOfDocuments"), size: knowledgecenter(fv!item, "size") / 1000000 & " MB" } ) )
Which outputs a useful list like this:
Thing is, the Constant I'm using in the expression... I need to manually add each Knowledge Center to that Constant which also seems like a long way round:
Does anybody please have a simpler way to get a list of all Knowledge Centers and their sizes?
Many thanks,Uel
Discussion posts and replies are publicly visible
I don't think there is a solution for this. The plugin "Get All Knowledge Centers" is not available anymore.
Thanks for the reply, Stefan.
How would you tackle this (as I know you have a wealth of experience from other Community answers you've given)? Manually?
I'm afraid it's a long, frustrating and almost completely manual process. I have repeatedly begged Appian to provide better tools for gaining insight into top-level folders with relative sizes, and it has never materialized. I faced this issue last year and had to build something custom to our setup.
Yeah ... good old hard manual labor ...
Hm ... you could put all KCs into an app and export it. Then extract the IDs from the XML files using some scripting, but them in a list and cast it to KCs.
It's not pretty and it is clunky but you can navigate to the "All Objects" view, filter by Folder and Search using "Knowledge Center" (assuming your KCs are all named this way):
You can then open the properties of each to get the contents/size value.
Thanks to you both for your input. Stefan, I'll try your suggestion.
Thanks Stewart. Are there any plans in place to display folder sizes in an easier-to-view method?
Sorry, I know of no such plans. In the meantime here's something I've cooked up. It relies on the Content Tools plug-in from the App Market:
a!localVariables( local!ids: fn!enumerate(2000) + 1300, local!contentObjects: a!forEach( items: local!ids, expression: fn!getcontentobjectdetailsbyid(fv!item) ), local!potentialKCs: a!forEach( items: local!contentObjects, expression: if( fv!item = "No object with this ID has been found", null, fn!split(fv!item, ",")[5] ) ), local!KCIds: local!Ids[wherecontains( " Type: Knowledge Center", local!potentialKCs )], a!forEach( items: local!KCIds, expression: fn!concat( fn!knowledgecenter(fv!item, "name"), ": ", fn!round(fn!knowledgecenter(fv!item, "size")/1024,2), "KB (", "Number Of Documents: ", fn!knowledgecenter(fv!item, "numberOfDocuments"), ")" ) ) )
Output for me is this:
You may have to adjust the starting point for where User-defined KCs come into play (I've set mine at 1300 in Line 2 of the code) and I've set my upper bound as 2000 above this which finds all the ones I can see in the All Objects view I posted about earlier.
In the spirit of understanding what you'd like to see...would a tab on the 'Monitor' view (both at individual Application level, and at all Applications level) that showed the KCs (with their properties) with a tree of the folders/sub-folders with similar properties meet your need?
Thanks for this, Stewart. I'll give it a try