Statistics on views access count

Hi everyone,

Hope you're doing well. This is my first post, this way I can test the forum as well. I looked for a solution since this morning but nothing seams to be the right way to do what I need. 

So, I would like to have a small report, that shows, by view, which one are the most accessed and which ones are not. The simplest would be, name of the view, access count, by day, for exemple.

So I saw that I could use the Event Log -> User Action log. But As I can see, by default i'ts only 10 000 events, and if I make a simple search in the UI, I only have event of the day (See the picture in attachment)

My goal is to access the logs using a script with an API for exemple to get the access count by view using the User Action log.

But As mentionned, I only have access to the event of the day, so I will have to catch the count every day and wait for X days to have my stats. So not possible manually. (Time consuming) 

Do you know an "easy" way to do this ? And if it takes a lot of resources to increase the amount of events history maximum

Have a really nice one

  • Welcome to M-Files Community!

    If you have a license to use User Action Log, then you also have the option to enable Advanced Event Log features in the vault. With this option enabled, M-Files will keep all log events without restrictions.

    Note that with User Action Log enabled, the size of the event log will increase considerably, so you may want to export the logs from the vault for instance using the Log Exporter module. Otherwise the size of the vault will keep growing and eventually start causing issues.

  • Hi ! Thanks a lot for your answer. I took some time looking at what you said. It seams I already have the Advance event log enable :

      

    As I read, the Log Exporter can help me export datat from M-Files to another system. 

    I also noticed that there is something called "M-FILES REPORTING" 

    As I am new into M-Files. I wanted to ask you what would be your way of doing what I need for my client. So I can chose the best approach.

    as a reminder, I need a way to tell wich View is accessed the most, so basically, get views ID and names, access count for the last 3 or 6 month and that's it. As the user log save only one Day, it would take like 3 month minimum to get all the data needed, I need to find a simplier way.

    I was setting an SQL server and SSMS into my M-Files server so I can use the log Exporter to save some data into a database. (Simple table with 4-5 fields). There is also this M-File Reporting guide I found.

    But that's the kind of work that would take too much time to implement and difficult to make profitable. But would be usefull for a lot of our customers. 

    Can you help me by telling me if I am doing it the good way (SQL Server + Log exporter) or if I overcomplicate the job ^^

    Maybe the simpliest way to achieve it is to copy the content of the table into a new one Every day, then using SQL to retrieve data (Excel, Power BI, etc.) 

    But as I know, the SQL structure of M-Files is a bit hard to use and understand

    Have a nice one

  • The Reporting module can be used to export and create reports on metadata found in the vault. This is different to the information that you can found in the vault event log, so the Reporting module doesn't directly help in log analytics.

    "As the user log save only one Day": this shouldn't be the case. As said, when Advanced Logging is enabled M-Files should keep all events without restrictions so you should have the full logs available. You may want to speak to your M-Files representative if you are observing other behavior, they can help review your environment configuration.

    In general it sounds to me you are on the right track: you would need to first export the logs with Log Exporter, then import the events to an external database where you can create reports on the event data. There are a number of moving parts in this, so since you are new to M-Files you may want to consult your M-Files representative also on this.

  • Thanks a lot for your quick and great Help on that. If I find a way, I'll let you know.

    Have a really nice day 

  • I was wondering if the logs could not be retrieved directly from SQL.

    Namely, where these user logs are stored. My M-Files instance is in SQL and not in Firebird. it would be better if I could query the database directly rather than going through the export log, which creates an XML file per log, which is not optimal. do you know if this log data is stored in the SQL database?

    Have a really nice day

  • The logs are stored in the vault database by default, but the database schema is not publicly documented and can change without warning between M-Files versions. Thus it is not recommended to access the database directly even for read-only purposes, you should always use M-Files APIs for any data access or integrations. Or, in your case, use the Log Exporter module to get the logs out of the database.

  • Oh, thanks a lot. Glad you told me that.

    I will stop what I was doing and start using the API.

    As the complicance Kit is an add-on, can we access the user logs data with the M-Files API ? 

    I believe "VaultEventLogOperations" is more about system event, not user one

    https://developer.m-files.com/APIs/COM-API/Reference/index.html#MFilesAPI~VaultEventLogOperations.html

  • If you have the license to enable Advanced Logging features, you also have the license to use the Log Exporter module in Compliance Kit. So there shouldn't be any extra costs for using Log Exporter to get the logs out of the vault.

  • Well, the issue is not really about the licence, but if the API can offer what I need. Which is user access logs. I'm spoilt for choice, all that's left is to get started.