Global Statistics Plugin

Name Global Stats Plugin
Vendor Atlassian Software Systems (Website)
Authors Atlassian
Homepage http://confluence.atlassian.com/display/CONFEXT/EXAMPLE
Issue Management http://developer.atlassian.com/jira/browse/EXAMPLE
Continuous Integration n/a
Categories Admin Macros
Most Recent Version 2.2-1.1
Availability Confluence v2.2 to v3.0.0_01
State Stable
Support Unsupported Plugins
License Freeware / Open Source (ASL)
Price Free
Release Docs http://confluence.atlassian.com/display/CONFEXT/Global+Statistics+Plugin
Java API Docs n/a
Download Source https://svn.atlassian.com/svn/public/contrib/confluence/globalstats-plugin/tags/2.2-1.1/
Download JAR globalstats-plugin-2.2-1.1.jar
Confluence Version Compatibility
The latest plugin is not compatible with Confluence 2.2.0 or 2.2.1. Use this jar if you need to run on Confuence 2.0 or 2.1.

Description

This plugin generates statistics on space and content usage, and optionally mails them to Atlassian. Collecting this data will allow us to perform more meaningful load/performance testing on Confluence. You can utilise these statistical data retrieved from Confluence instance also for managerial or house-keeping purposes.

Your Privacy
  • The data collected by this plugin is purely statistical: how many pages, comments, attachments and so on are in each space. Identifiable information such as space titles/keys, content, attachment names and so on are not collected.
  • Sending the data to Atlassian must be triggered manually by an administrator: there is no automatic process.
  • If you're at all worried about what information we're gathering, you will have the chance to review the data before it is sent to Atlassian.

Downloading & Installing

  • Download from above the version of the plugin jar appropriate for your Confluence installation.
  • Install the plugin through Confluence's plugin upload feature.

Known Problems

In results it displays "-1" for all current number of pages, news and mail, while other blanks are left with "0".

This is due to the fact that some databases do not support the SQL syntax used in the plugin's implementation, for instance MySQL 4.

from tableName AS aliasNAME

was replaced by

from tableName aliasNAME

and

select count(c.*)

was replaced by

select count(*)
Unfortunately, we will not be supporting any database that does not understand the sql syntax above for the global stats plugin. If you are willing to look into the source code of the plugin, then you will probably be able to make a quick hack to fix the sql statements according to your database.

Please see the relevant Forum Discussion for more details and a JIRA bug report

Usage

Confluence 2.2 and later: Follow the "Site Statistics" link that will have appeared in the Administration section of the Admin Console.

Confluence 2.0 or 2.1: Manually go to /admin/globalstats/viewstatistics.action relative to your Confluence site root (i.e. http://wiki.example.com/admin/globalstats/viewstatistics.action).

After that, everything should be self-explanatory.

Screenshots

Bugs

Please report bugs in comments.

Labels

confluence21 confluence21 Delete
confluence20 confluence20 Delete
confluence22 confluence22 Delete
confluence23 confluence23 Delete
statistics statistics Delete
plugin plugin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 29, 2006

    Dan Hardiker says:

    Plugin works fine on 2.3-DR1, however 2.2.1a fails with the following: Caused ...

    Plugin works fine on 2.3-DR1, however 2.2.1a fails with the following:

    Caused by: java.lang.NoSuchMethodError: com.atlassian.confluence.spaces.SpaceManager.getAllSpaces()Ljava/util/List;
    	at com.atlassian.confluence.extra.globalstats.ViewStatisticsAction.doDefault(ViewStatisticsAction.java:40)
    
  2. Apr 23, 2007

    Dan Hardiker says:

    Above I said the plugin works fine - however thats not strictly true. It also fu...

    Above I said the plugin works fine - however thats not strictly true. It also functions on 2.2.5 however both 2.3-DR1 and 2.2.5 produce these errors when using a MySQL DB:

    2006-08-29 12:40:41,974 ERROR [confluence.extra.globalstats.GlobalStatisticsManager] \
    doSqlCountQuery Unable to perform query [select count(c.*) from CONTENT as c \
    where c.SPACEID = 19 and c.PREVVER is null and c.CONTENTTYPE = 'BLOGPOST']: \
    java.sql.SQLException: You have an error in your SQL syntax; \
    check the manual that corresponds to your MySQL server version for the right syntax to use near \
    '*) from CONTENT as c where c.SPACEID = 19 and c.PREVVER is null and c.CONTENTTYP' at line 1
    java.sql.SQLException: You have an error in your SQL syntax; \
    check the manual that corresponds to your MySQL server version for the right syntax to use near \
    '*) from CONTENT as c where c.SPACEID = 19 and c.PREVVER is null and c.CONTENTTYP' at line 1
    

    There are a fair few of them, around 8 - 10. For reference here is my MySQL version information:

    mysql  Ver 14.7 Distrib 4.1.13, for suse-linux (i686) using readline 5.0
    1. Apr 23, 2007

      Miles Metcalfe says:

      Similar issue with jTDS driver and Microsoft SQL Server:  2006-08-30 15:16:36...

      Similar issue with jTDS driver and Microsoft SQL Server:

       2006-08-30 15:16:36,441 ERROR [confluence.extra.globalstats.GlobalStatisticsManager] \
      doSqlCountQuery Unable to perform query [select count(c.*) from CONTENT as c \
      where c.SPACEID = 43 and c.PREVVER is null and c.CONTENTTYPE = 'PAGE']: \
      java.sql.SQLException: Line 1: Incorrect syntax near '*'.
      
    2. Aug 30, 2006

      Jeff Brooks says:

      Similar issue with MySQL 5.0.22

      Similar issue with MySQL 5.0.22

  3. Apr 23, 2007

    Sean Alderson-Claeys says:

    I installed the globalstats-plugin-2.0-1.0.jar into my 2.0.3 Build:#323 Confluen...

    I installed the globalstats-plugin-2.0-1.0.jar into my 2.0.3 Build:#323 Confluence implementation successfully (or at least it appeared to install ok). When I hit the generate stats button I get the following error in my log file:

    2006-09-12 16:34:18,754 ERROR [confluence.extra.globalstats.GlobalStatisticsManager] Unable to perform query \
    [select count(c.*) from CONTENT as c where c.SPACEID = 37 and c.PREVVER is null and c.CONTENTTYPE = 'BLOGPOST']: \
    java.sql.SQLException: ORA-01747: invalid user.table.column, table.column, or column specification
    

    Any ideas other than to upgrade? (upgrading would be very difficult at the moment and this info would be invaluable).

    1. Sep 19, 2006

      Rajendra says:

      Sean, I'm also getting same errors. And the reason is: Queries used are not as ...

      Sean,

      I'm also getting same errors.
      And the reason is: Queries used are not as per Oracle db expects... See my comments at the end.

  4. Sep 14, 2006

    Jeff Brooks says:

    I uninstalled the old version, cleared out my tomcat /work directory, restarted ...

    I uninstalled the old version, cleared out my tomcat /work directory, restarted my confluence server, and then uploaded/installed the new 2.2.1.1 version (and verified it was in the ./plugins directory).  I still get the same error reported above with MySQL 5.0.22.

    1. Sep 19, 2006

      Jeff Brooks says:

      Version 2 works fine for me!  Thank you.

      Version 2 works fine for me!  Thank you.

  5. Apr 23, 2007

    Rajendra says:

    Hi, I just installed this plugin (using Repository Client) and getting errors. ...

    Hi,

    I just installed this plugin (using Repository Client) and getting errors.

    We are using Confluence 2.2.4 / Oracle 9i database

    I guess, sqls are in Oracle pl/sql style. Here is one exception

    2006-09-19 13:20:21,928 ERROR [confluence.extra.globalstats.GlobalStatisticsManager] doSqlCountQuery Unable to perform query \
    [select count(c.*) from CONTENT as c where c.PREVVER is null and c.CONTENTTYPE = 'MAIL']: java.sql.SQLException: \
    ORA-01747: invalid user.table.column, table.column, or column specification
    

    But if I do change the query little bit and run; it executes with results. The correc sql query is:

    select count(*) from CONTENT c where c.PREVVER is null and c.CONTENTTYPE = 'MAIL';
    

    Has anyone able to run this plugin successfully (with Oracle as backend) ?

    thanks,
    Rajendra

    1. Sep 24, 2006

      Ivan Benko says:

      Hi Rajendra, I have changed the sql syntax to prevent use of '.' in the count s...

      Hi Rajendra,

      I have changed the sql syntax to prevent use of '.' in the count statement as it it not supported in MySQL databases. Also, there is a problem with MySQL 4, as it doesn't support nested queries either. Please download the latest jars and let me know if you are still experiencing problem. The jars have been successfully tested on MySQL 5.

      Thanks,
      Ivan

      1. Nov 20, 2006

        Andrew Miller says:

        I can confirm that this works fine with Confluence 2.2.9 running against MySQL 5...

        I can confirm that this works fine with Confluence 2.2.9 running against MySQL 5.0.22.

  6. Sep 24, 2006

    Rajendra says:

    Ivan, From your comments it looks like you have made changes for MySQL Database...

    Ivan,

    From your comments it looks like you have made changes for MySQL Database.
    What about Oracle database ? Will those queries execute?

    thanks,
    Rajendra

  7. Nov 30, 2006

    RefuX Zanzeenbarr says:

    Confluence Repository Client gives this error: Plugin [confluence.extra.globals...

    Confluence Repository Client gives this error:

    Plugin [confluence.extra.globalstats] File Not Found: http://confluence.atlassian.com/download/attachments/186998/globalstats-plugin-2.2-1.0.jar

  8. Dec 22, 2006

    Rick Cogley says:

    I get the same error. Try copying the plugin's URL, and then uploading manually....

    I get the same error. Try copying the plugin's URL, and then uploading manually...

  9. Feb 01, 2007

    Charlie Perry says:

    Where do I request an extra feature? I want to be able to generate charts such a...

    Where do I request an extra feature? I want to be able to generate charts such as this one from wikipedia Could not generate thumbnail: Image file format not supported

    I just want to be able to demonstrate growth in pages, edits and users over time.

    1. Feb 01, 2007

      Bob Swift says:

      Site Statistics has some related graphs but not a running total. I have to thin...

      Site Statistics has some related graphs but not a running total. I have to think about the query to get that.

    2. Jun 17, 2007

      Kevin Tran says:

      Hi Charlie, Although Confluence does not faciliate generation of charts like th...

      Hi Charlie,

      Although Confluence does not faciliate generation of charts like the one in your image, we have a similar features available with the Global Statistics Plugin. Similar Graphs and statistics like page growth, number of edits and users are generated for either an individual space or your entire Confluence instance.

      Since Confluence 2.3, there is an Activity Plugin available which provides statistics for an individual space.

      Have a look at the available features and see if they meet your requirements. If they do not, please create a new feature request.

      Cheers,
      Kevin

      1. Mar 30, 2007

        Kalyan D says:

        Hi Kevin, I upgraded to confluence v. 2.3.3 for my org. This plugin is really u...

        Hi Kevin,

        I upgraded to confluence v. 2.3.3 for my org. This plugin is really useful but there is bug to the link "See also: Global Confluence activity " under space administration.

        This link was supposed to be <hostname>/<conflunencehome>/admin/globalstats/viewstatistics.action
        but is pointing to <hostname>/admin/globalstats/viewstatistics.action which throws a 404 error.

        Any idea where can i modify that?

        Thanks,
        Kalyan

  10. Feb 05, 2007

    Charlie Perry says:

    This plugin is really useful. Is there anyway that I can find out how many page...

    This plugin is really useful.

    Is there anyway that I can find out how many pages there are in total in a Confluence wiki. I want to start keeping track of the growth in the number of pages.

    1. Feb 05, 2007

      Kevin Tran says:

      Hi Charlie, In the "Site Statistics" page in the Administration Section, you wi...

      Hi Charlie,

      In the "Site Statistics" page in the Administration Section, you will find statistics about the entire Confluence instance, including the total number of pages.

      I just did some quick searching and found a link to something called SQL plugin which may be just what you are looking for. It looks like it's used in conjunction with the Chart Plugin. Both plugins should be available for installation via Confluence's Plugin Repository, also found in the Administration section.

      Cheers,
      Kevin

      1. Feb 08, 2007

        Charlie Perry says:

        Thanks. The Global activity charts are really useful. I want to share them with ...

        Thanks. The Global activity charts are really useful. I want to share them with all users not just administrators. Is there any way I can include these charts/statistics in a normal page in the wiki?

  11. Mar 01, 2007

    Libor Tvrdík says:

    Hi, please fix url in Confluence Repository Client. My client download file glob...

    Hi, please fix url in Confluence Repository Client. My client download file globalstats-plugin-2.2-1.0.jar (can be globalstats-plugin-2.2-1.1.jar).

    Thanks.

    Cheers,
    Libor

    1. Mar 01, 2007

      Tony Cheah Tong Nyee says:

      Hi Libor, This problem is reproducible. I would advise you to seek assistance f...

      Hi Libor,

      This problem is reproducible. I would advise you to seek assistance from the author at:

      http://jira.adaptavist.com/browse/CRC

      Thanks,
      Tony

      1. Mar 02, 2007

        Libor Tvrdík says:

        Oops, I mean that author is Atlassian. Thanks for your response. I'm going to ...

        Oops, I mean that author is Atlassian.

        Thanks for your response. I'm going to report one.

        Libor

  12. May 11, 2007

    Private Name says:

    I can't download the jar !

    I can't download the jar !

    1. May 11, 2007

      David Chui says:

      I'm not sure exactly which jar you are not able to download. However, I can down...

      I'm not sure exactly which jar you are not able to download. However, I can download the files from here. If you would like us to send you the jar file, kindly create a support request and tell us which file you would like to have.

      Regards,
      David

  13. Jun 05, 2007

    Mark S says:

    I'm with Christophe C above.  I'm unable to download the jar.   W...

    I'm with Christophe C above.  I'm unable to download the jar.   When I click the link that goes here, I get a Page Not Found error.  I looked under the attachments tab where it should be and it is not there.  Perhaps there is some weird administrative only tag on it?  I was also unable to download it from within the plugin repository in our wiki.  Got basically the same error - that it didn't exist.

    I downloaded the older version, but it doesn't seem to be working right on 2.5. 

    1. Jun 06, 2007

      Tony Cheah Tong Nyee says:

      Hi Mark, Thank you for the report. I could reproduce the problem in my local sy...

      Hi Mark,

      Thank you for the report. I could reproduce the problem in my local system too. We will look into it and try correcting the download source.
      Apologies for all the inconvenience caused.

      Cheers,
      Tony

      1. Jun 06, 2007

        Tony Cheah Tong Nyee says:

        Hi Mark, For your information, a new version of this plugin is released(version...

        Hi Mark,

        For your information, a new version of this plugin is released(version 2.2-1.1) and it is also available in the attachment page.
        Give it a try and let us know how it goes.

        Cheers,
        Tony

  14. Jun 14, 2007

    Tony Cheah Tong Nyee says:

    Hi Mark, Apologies for the inconvenience caused. The latest JAR file is now upl...

    Hi Mark,

    Apologies for the inconvenience caused.
    The latest JAR file is now uploaded to this page and it's available in the "Download JAR" session. If you want us to send you the JAR file, please kindly create a Support Issue and tell us which file you would like to have.

    Cheers,
    Tony

  15. Jun 21, 2007

    Stephen Morad says:

    Any chance you could add a size metric to these reports.  They are VERY use...

    Any chance you could add a size metric to these reports.  They are VERY useful right now but being able to see how much space all of the pages/attachments are taking up would also be wonderful!!!

  16. Jul 19, 2007

    John Tapley says:

    Cool plugin! Thanks for making it!

    Cool plugin! Thanks for making it!

  17. Aug 30, 2007

    Peter Higgs says:

    Hi,  I am not a developer but am managing a confliuence system..So every mo...

    Hi,  I am not a developer but am managing a confliuence system..So every month I have been copying the results from the Glbal Stats page into an excel pivottable datasource... adding the date down the left column and using this as a way of tracking changes over time.. nbut..

    Is there an existing XSLT that I can use to transform the report to atlassian xml into something i can import into Excel or a database.   Or even better how about adding a button on the page next to "send to Atlassian" . "export to xml spreadsheet"

    1. Sep 02, 2007

      Fennie Ng says:

      Hi Peter, I am not aware of any workaround that could achieve your requirements...

      Hi Peter,

      I am not aware of any workaround that could achieve your requirements, perhaps you many want to raise a feature request for this.

      If you would like to find out more information or assistance on plugins, I would advice you to direct your questions to our forum and mailing list as there might be other user/developers who have already implemented it and should be able to share their ideas with you.

      Regards,
      Fennie

      1. Sep 03, 2007

        Peter Higgs says:

        Thanks Fennie, I will do so.

        Thanks Fennie, I will do so.

  18. Sep 13, 2007

    David Grogan says:

    Are there macros that I can use to display these types of stats directly in a sp...

    Are there macros that I can use to display these types of stats directly in a space page?

    Thanks,

    David

    1. Sep 13, 2007

      Fennie Ng says:

      Hi David, I am not aware of any other macros that can be used to fulfill your r...

      Hi David,

      I am not aware of any other macros that can be used to fulfill your requirement. If you think that the existing Space Activity does not reflect your needs, there is a feature request about improving space statistic being tracked at :

      http://jira.atlassian.com/browse/CONF-8984

      Feel free to cast a vote to the request.

      Regards,
      Fennie

  19. Dec 04, 2007

    K says:

    I'm looking to get statistics of the top 50 pages for each space.  I know C...

    I'm looking to get statistics of the top 50 pages for each space.  I know Confluence shows the Top 10 already, but I need a longer list. 

    Can I use the SQL plug in and then write an SQL statement to pull this directly from the database?  If so, where can I find docs of the database model (or if anyone knows the tables offhand to save me trolling through the entire data model, that would be helpful

    1. Dec 04, 2007

      Paul Csapo says:

      It can? How? When I look at the admin/globalstats/viewstatistics.action in th...

      It can?

      How?

      When I look at the admin/globalstats/viewstatistics.action in the admin console, it just shows overall totals for Pages, News and Mail

  20. Jan 14, 2008

    Andy Brook says:

    Minor bug I found, in 2.7.0, generating global statistics results in a no Dashbo...

    Minor bug I found, in 2.7.0, generating global statistics results in a no Dashboard link, top left....

    1. Jan 24, 2008

      David Leinbach says:

      This is also a problem under 2.6.2

      This is also a problem under 2.6.2

  21. Feb 26, 2008

    Alexey Troshichev says:

    Hello Can it gather statistic about downloads and visitors? I mean when we ha...

    Hello

    Can it gather statistic about downloads and visitors?

    I mean when we have any files in attach, can it gather statistics about downloads.

    1. Feb 28, 2008

      Ming Giet Chong says:

      Hi Alexey, This feature is not supported currently, however, you can raise a fe...

      Hi Alexey,

      This feature is not supported currently, however, you can raise a feature request at the issue tracker:

      Regards,
      MG

  22. Jul 24, 2008

    ido says:

    Hi , Is this plugin working over clusters ? Thanks

    Hi ,
    Is this plugin working over clusters ?
    Thanks

  23. Dec 03, 2008

    kirk kness says:

    Any answer on does this work with clusters ?

    Any answer on does this work with clusters ?

  24. Jan 13

    Liza says:

    Are there known performance issues with using the Global Statistics plugin in la...

    Are there known performance issues with using the Global Statistics plugin in large instances of Confluence?

  25. Mar 05

    shreekant somani says:

    which version of the jar is compatible with Confluence 2.2.1 ? I tried using gl...

    which version of the jar is compatible with Confluence 2.2.1 ?

    I tried using globalstats-plugin-2.0-1.1.jar which installed  but gave an error when trying to view the stas from the Site Stats link !!