I just release version 0.3.0 of this plugin. The following changes have been implemented:
Using action:analytics.increment for analytics counter (better performance and accuracy)
Added label viewer to page view that can have the values user, guest, or bot (inspired by an upcoming change in 1.11, you get it early here)
Added new metric nodebb_online_guests
Added new metric nodebb_eventloop_lag_seconds. This is measured by NodeBB which has a smoothing factored compared to what is measured by NodeJS and provided via nodejs_eventloop_lag_seconds
Added new metric nodebb_eventloop_maxlag_seconds. This is the maximum allowed lag for NodeBB. If the lag is getting closer to this value NodeBB will start to issue 503 error codes. The chance a user is getting a 503 is calculate by this formula: (lag - maxLage) / maxLag.
@Per0x Sorry it took a while but your metric for online guests is now finally available.
The "top downloads" pie chart is a little misleading, actually. The package manager itself doesn't have any visibility on package downloads because those are done through npm, and not nbbpm itself. What it does track is how many people ask nbbpm to suggest a version to download.
For example, if you run v1.8.1 and you want to download a plugin, the latest version might not be compatible, so the ACP will query nbbpm for a suggested version. That's counted as a "download" (since the "suggest" call is done behind the scenes and is opaque to the end user).
So you could be seeing true downloads... people downloading your plugins... or someone's just hammering GET /api/v1/suggest?package=nodebb-plugin-prometheus a lot 😄
Otherwise I think it could be done via the hook filter:topics.addPostData? Just iterate over the posts array, get the category, and for every user of a post add an object to custom_profile_info with the property content set to some HTML indicating moderator rights?
Probably this... alternatively, use the groups method, but hook into filter:topics.addPostData to remove the group badge if they're not in the category that user moderates?