Closed namjithwisilica closed 6 years ago
@namjithwisilica hi & thanks for asking. I guess this is not possible as a plugin. The reason for that is that plugins use clearly defined entry points (hooks into the message/auth/etc flow). It is of course possible to add more metrics as a core extension to VerneMQ though.
Actually, let me be a little more precise: Technically, a plugin is just an application that you can start alongside VerneMQ. So it's possible to create an app, that can hold additional metrics for you, and then send information to that app via the normal hooks.
To hold info about last hour message rate in a topic, you'd use the on_publish
hook to send metrics to your app. (in Erlang terms, this could be a simple gen_server, holding an ETS table with your metrics).
Your metrics would not show up as part of the normal VerneMQ metrics.
For example count of messages on a specific topic in last one hour?