Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Changes to the period of statistics

Open Hudell opened this issue 6 years ago • 4 comments

  • 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.

Hudell avatar May 17 '19 20:05 Hudell

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

rodrigok avatar May 20 '19 20:05 rodrigok

@geekgonecrazy would be a problema if we stop sending the statistics when the instance starts?

rodrigok avatar May 20 '19 21:05 rodrigok

@rodrigok nope register is now independent after 1.0

geekgonecrazy avatar May 20 '19 21:05 geekgonecrazy

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.

Hudell avatar May 22 '19 14:05 Hudell