The proper way to get information about your repo would be to create a Java or javascript webscript. To get info about documents you’ll need to use CMIS query language in it. But sometimes more convenient way is to use SQL. For example in the project I’m working on we use AppDynamics for monitoring. For one of the dashboards we would like to have a document counter and for AppDynamics it’s more convenient to get a result from database rather than response from an Alfresco webscript. So here we go!
First we need to connect to Alfresco database. You can refer to this post to do it: Connect to alfresco database.
Total number of documents in repository
This query will return number of nodes which have cm:content type:
To get number of folders (which have cm:folder type) replace content by folder. To see all available types run following queries:
For custom types change qname and namespace.
Document name - creator - date
This one will return human readable document name, username of creator and date when this document was created:
Please note that it only works with cm:content types of document. If you did modification to the model and created some custom type, let’s say ep:content, then you need to run this query:
Number of uploaded documents per person
This query returns list of users and number of documents uploaded by them:
Number of users
Total number of nodes with type person which is basically number of users:
List of users
This query returns list of users from the Alfresco database: