Is their any way to see the size of a confluence space, number of attachments etc.

1 answer

This widget could not be displayed.

Easiest way that I know of is to use direct SQL queries against the database.

1) Install the SQL and Cache plugins for Confluence
2) Install the macro-security plugin for confluence and restrict SQL to admins only
3) Configure a datasource in your <install>/conf/server/.xml config file with a read-only user that has access to the confluence database.
4) Create a wiki page and add the markup to query and render the results directly in the wiki page:

This macro will render a table with three columns: | page total | space name | space key |

select count(distinct CONTENT.title) as "Pages", SPACES.spacename as "Space", SPACES.spacekey as "Key" from CONTENT, SPACES where CONTENT.spaceid IS NOT NULL and CONTENT.spaceid = SPACES.spaceid group by CONTENT.spaceid order by Pages DESC

This macro will render a pie chart and a table that displays the totals across you entire site for: Pages, Attachments, Comments, Mail, Drafts, and User Status. You should be able to modify the query to select only from specific spaces quite easily:

 - %1%|legend=false|tables=content | attachment=^Confluence Content.png |

select contenttype as Type, count(distinct CONTENT.title) as "Count" from CONTENT group by contenttype having Count > 0
select contenttype as Type, count(*) as "Count" from CONTENT where contenttype='COMMENT' group by contenttype having Count > 0
select "ATTACHMENTS" as Type, count(distinct title) as "Count" from ATTACHMENTS having Count > 0
order by Count DESC

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

601 views 8 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you