Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-11155

Having the ability to list the size of pages, spaces, attachments and etc being used in Confluence

    • 38
    • 27
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      It will be useful if there is macro/plugin that can list the size of the pages, spaces, attachments, mail and etc being used in Confluence.

            [CONFCLOUD-11155] Having the ability to list the size of pages, spaces, attachments and etc being used in Confluence

            Pinned comments

            Hi all - Confluence PM here

            Question for the group about this request: other than being able to manage the amount of storage you're using to avoid hitting the limit for your Confluence edition, are there any other reasons why this information would be of value to you and your team?

            John Hooper added a comment - Hi all - Confluence PM here Question for the group about this request: other than being able to manage the amount of storage you're using to avoid hitting the limit for your Confluence edition, are there any other reasons why this information would be of value to you and your team?

            All comments

            Hi all - Confluence PM here

            Question for the group about this request: other than being able to manage the amount of storage you're using to avoid hitting the limit for your Confluence edition, are there any other reasons why this information would be of value to you and your team?

            John Hooper added a comment - Hi all - Confluence PM here Question for the group about this request: other than being able to manage the amount of storage you're using to avoid hitting the limit for your Confluence edition, are there any other reasons why this information would be of value to you and your team?

            Don Bills added a comment -

            This feature request was created 12 years ago, and no option exists still for Cloud instances, beyond the general storage usages shown for the organization. Atlassian has sent emails to people if they are over a certain storage amount in an attempt to upgrade to more expensive version with no space restrictions, while noting that they aren't charging for excess storage yet.

            However, if they do intend to charge, it seems that they can't responsibly do so if they don't provide users the ability to truly manage and get insights into where their storage is being used. It is not practical for someone to have to go into individual space settings and attempt to administer through the space attachments tab.

            Don Bills added a comment - This feature request was created 12 years ago, and no option exists still for Cloud instances, beyond the general storage usages shown for the organization. Atlassian has sent emails to people if they are over a certain storage amount in an attempt to upgrade to more expensive version with no space restrictions, while noting that they aren't charging for excess storage yet. However, if they do intend to charge, it seems that they can't responsibly do so if they don't provide users the ability to truly manage and get insights into where their storage is being used. It is not practical for someone to have to go into individual space settings and attempt to administer through the space attachments tab.

            Dempsey Ubeku added a comment - - edited

            tested and working ok

            Dempsey Ubeku added a comment - - edited tested and working ok

            Piyush added a comment -

            For Server version - We have a option (available to confluence admins) to add user macro in General Configuration page. Then that to be used in any location provided SPACE KEY.

            And Regarding BobSwift, that's really a great CLI to use with a 'good' amount

            Checkout: https://answers.atlassian.com/questions/48319/can-create-user-macros-in-the-ondemand-version

            Piyush added a comment - For Server version - We have a option (available to confluence admins) to add user macro in General Configuration page. Then that to be used in any location provided SPACE KEY. And Regarding BobSwift, that's really a great CLI to use with a 'good' amount Checkout: https://answers.atlassian.com/questions/48319/can-create-user-macros-in-the-ondemand-version

            No but I'm know no way to install this kind of script on Confluence Cloud. (Perhaps you can tell me how you would install it on Confluence Server, and I will try to see if it is feasible on Confluence Cloud)

            BTW I just found an add-on that would allow to write that kind of script :
            https://bobswift.atlassian.net/wiki/display/CSOAP

            Sebastien Ribiere added a comment - No but I'm know no way to install this kind of script on Confluence Cloud. (Perhaps you can tell me how you would install it on Confluence Server, and I will try to see if it is feasible on Confluence Cloud) BTW I just found an add-on that would allow to write that kind of script : https://bobswift.atlassian.net/wiki/display/CSOAP

            Piyush added a comment -

            I'm unaware about the Confluence Cloud status.
            That failed?

            Piyush added a comment - I'm unaware about the Confluence Cloud status. That failed?

            This macro seems interesting.
            But it seems unusable on Confluence Cloud. Am I wrong?

            Sebastien Ribiere added a comment - This macro seems interesting. But it seems unusable on Confluence Cloud. Am I wrong?

            Piyush added a comment - - edited

            I found out this macro which gives 95% of exact space storage status

            // Some comments here
            ## Macro title: Space Meta Data 2
            ## Macro has a body: Y or N (N)
            ## Body processing: Selected body processing option
            ## Output: Selected output option
            ##
            ## Developed by: Matthew Horn, based on Space Meta Data by Andrew Frayling
            ## Date created: 06/07/2012
            ## Installed by: <your name>
            ## Macro to display information such as number of pages, number of blog posts, attachment size, etc. about a named Space.
            ## @param TargetSpace:title=Target space|type=string|desc=Enter the KEY of the space you want metadata for. For example, coredoc, gscontent, samples, wncontent|required=true|multiple=false
            ## Get space details
            #set ( $targetSpace = $spaceManager.getSpace($paramTargetSpace) )
            #set ( $spaceName = $targetSpace.getName() )
            #set ( $spaceKey = $targetSpace.getKey() )
            #set ( $spaceHome = $targetSpace.getHomePage() )
            #set ( $spaceCreator = $targetSpace.getCreatorName() )
            #set ( $spaceCreationDate = $targetSpace.getCreationDate() )
            #set ( $spaceDescription = $targetSpace.getDescription() )
            #set ( $pageCount = $spaceManager.findPageTotal($targetSpace) )
            #set ( $blogCount = $spaceManager.getNumberOfBlogPosts($targetSpace) )
             
            ## Get all pages in the current Space
            #set ( $allPagesInSpace = $pageManager.getPages($targetSpace, true) )
            ## Reset total attachment file size
            #set ( $totalAttachmentFileSizeForSpace = 0 )
            ## Reset total number of attachments
            #set ( $totalAttachmentCount = 0 )
            ## Loop through all pages in the current Space
            #foreach ($page in $allPagesInSpace)
              ## reset the attachment count for each page
              #set ( $pageAttachmentCount = 0 )
              ## reset the attachment file size total for each page
              #set ( $totalFileSizePerPage = 0 )
              ## get the attachments for each page
              #set ( $allAttachments = $page.getAttachments() )
              ## Loop through each attachment
              #foreach ($attachment in $allAttachments)
                ## Increment the attachment count for the page
               #set ( $pageAttachmentCount = $pageAttachmentCount + 1 )
                ## Sum the size of the attachments on the page
                #set ( $totalFileSizePerPage = $totalFileSizePerPage + $attachment.getFileSize() )
              #end
              ## End looping through attachments
              ## Increment total attachment count for the current Space
              #set ( $totalAttachmentCount = $totalAttachmentCount + $pageAttachmentCount )
              ## Sum the total size of attachments for the current Space
              #set ( $totalAttachmentFileSizeForSpace = $totalAttachmentFileSizeForSpace + $totalFileSizePerPage )
            #end
            ## End looping through pages
             
            ## Convert attachment size to MBs
            #set ( $attachmentSizeMb = ($totalAttachmentFileSizeForSpace / 1024.00) / 1024.00 )
             
            ## Display Space Details
            <table class="confluenceTable">
              <tbody>
                <tr>
                  <th class="confluenceTh">Name</th>
                  <td class="confluenceTd">$spaceName</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Key</th>
                  <td class="confluenceTd">$spaceKey</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Description</th>
                  <td class="confluenceTd">$spaceDescription.getBodyAsString()</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Home Page</th>
                  <td class="confluenceTd">#contentLink2($spaceHome true false)</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Created By</th>
                  <td class="confluenceTd">#usernameLink($spaceCreator) ($action.dateFormatter.formatDateTime($spaceCreationDate))</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Number of Pages</th>
                  <td class="confluenceTd">$pageCount</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Number of Blog Posts</th>
                  <td class="confluenceTd">$blogCount</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Number of Attachments</th>
                  <td class="confluenceTd">$totalAttachmentCount (including all versions)</td>
                </tr>
                <tr>
                  <th class="confluenceTh">Total Size of Attachments</th>
                  <td class="confluenceTd">$attachmentSizeMb MB</td>
                </tr>
              </tbody>
            </table>
            
            

            Piyush added a comment - - edited I found out this macro which gives 95% of exact space storage status // Some comments here ## Macro title: Space Meta Data 2 ## Macro has a body: Y or N (N) ## Body processing: Selected body processing option ## Output: Selected output option ## ## Developed by: Matthew Horn, based on Space Meta Data by Andrew Frayling ## Date created: 06/07/2012 ## Installed by: <your name> ## Macro to display information such as number of pages, number of blog posts, attachment size, etc. about a named Space. ## @param TargetSpace:title=Target space|type=string|desc=Enter the KEY of the space you want metadata for. For example, coredoc, gscontent, samples, wncontent|required=true|multiple=false ## Get space details #set ( $targetSpace = $spaceManager.getSpace($paramTargetSpace) ) #set ( $spaceName = $targetSpace.getName() ) #set ( $spaceKey = $targetSpace.getKey() ) #set ( $spaceHome = $targetSpace.getHomePage() ) #set ( $spaceCreator = $targetSpace.getCreatorName() ) #set ( $spaceCreationDate = $targetSpace.getCreationDate() ) #set ( $spaceDescription = $targetSpace.getDescription() ) #set ( $pageCount = $spaceManager.findPageTotal($targetSpace) ) #set ( $blogCount = $spaceManager.getNumberOfBlogPosts($targetSpace) )   ## Get all pages in the current Space #set ( $allPagesInSpace = $pageManager.getPages($targetSpace, true) ) ## Reset total attachment file size #set ( $totalAttachmentFileSizeForSpace = 0 ) ## Reset total number of attachments #set ( $totalAttachmentCount = 0 ) ## Loop through all pages in the current Space #foreach ($page in $allPagesInSpace)   ## reset the attachment count for each page   #set ( $pageAttachmentCount = 0 )   ## reset the attachment file size total for each page   #set ( $totalFileSizePerPage = 0 )   ## get the attachments for each page   #set ( $allAttachments = $page.getAttachments() )   ## Loop through each attachment   #foreach ($attachment in $allAttachments)     ## Increment the attachment count for the page    #set ( $pageAttachmentCount = $pageAttachmentCount + 1 )     ## Sum the size of the attachments on the page     #set ( $totalFileSizePerPage = $totalFileSizePerPage + $attachment.getFileSize() )   #end   ## End looping through attachments   ## Increment total attachment count for the current Space   #set ( $totalAttachmentCount = $totalAttachmentCount + $pageAttachmentCount )   ## Sum the total size of attachments for the current Space   #set ( $totalAttachmentFileSizeForSpace = $totalAttachmentFileSizeForSpace + $totalFileSizePerPage ) #end ## End looping through pages   ## Convert attachment size to MBs #set ( $attachmentSizeMb = ($totalAttachmentFileSizeForSpace / 1024.00) / 1024.00 )   ## Display Space Details <table class= "confluenceTable" >   <tbody>     <tr>       <th class= "confluenceTh" > Name </th>       <td class= "confluenceTd" > $spaceName </td>     </tr>     <tr>       <th class= "confluenceTh" > Key </th>       <td class= "confluenceTd" > $spaceKey </td>     </tr>     <tr>       <th class= "confluenceTh" > Description </th>       <td class= "confluenceTd" > $spaceDescription.getBodyAsString() </td>     </tr>     <tr>       <th class= "confluenceTh" > Home Page </th>       <td class= "confluenceTd" > #contentLink2($spaceHome true false) </td>     </tr>     <tr>       <th class= "confluenceTh" > Created By </th>       <td class= "confluenceTd" > #usernameLink($spaceCreator) ($action.dateFormatter.formatDateTime($spaceCreationDate)) </td>     </tr>     <tr>       <th class= "confluenceTh" > Number of Pages </th>       <td class= "confluenceTd" > $pageCount </td>     </tr>     <tr>       <th class= "confluenceTh" > Number of Blog Posts </th>       <td class= "confluenceTd" > $blogCount </td>     </tr>     <tr>       <th class= "confluenceTh" > Number of Attachments </th>       <td class= "confluenceTd" > $totalAttachmentCount (including all versions) </td>     </tr>     <tr>       <th class= "confluenceTh" > Total Size of Attachments </th>       <td class= "confluenceTd" > $attachmentSizeMb MB </td>     </tr>   </tbody> </table>

            Piyush added a comment -

            Was this ever reviewed?

            Piyush added a comment - Was this ever reviewed?

            Any chances of this request being progressed given the increasing number of votes in favour?

            Daniel Markiewicz added a comment - Any chances of this request being progressed given the increasing number of votes in favour?

              62c32a53ff47 John Hooper
              mgchong Ming Giet Chong [Atlassian]
              Votes:
              90 Vote for this issue
              Watchers:
              64 Start watching this issue

                Created:
                Updated: