Changes to the period of statistics
- Every 10 minutes, check how many users are connected;
- Generate the full statistics only once a day, aggregating the user data of the previous day. This includes the higher number of users connected on the day, smaller number of users offline, average number of users connected and max number of users online/away.
- Include week day on statistics that can be aggregated.
The prometheus data will be affected by this change, need to check https://github.com/RocketChat/Rocket.Chat/blob/e16aa26248cde355af6ae1c773171627c1c12174/app/metrics/server/lib/metrics.js#L107
@geekgonecrazy would be a problema if we stop sending the statistics when the instance starts?
@rodrigok nope register is now independent after 1.0
I changed the code to load the number of users of the previous day, from 00:00 to 23:50, instead of getting the number of users between executions of the cron job. This makes the code and the data more reliable.