igniterealtime / openfire-restAPI-plugin

Allows Openfire administration over a RESTful API.
http://www.igniterealtime.org/projects/openfire/plugin-archive.jsp?plugin=restAPI
Apache License 2.0
19 stars 53 forks source link

fixes #155: Add statistics for endpoint responses #156

Closed guusdk closed 2 years ago

guusdk commented 2 years ago

This commit adds statistics for every response generated in response to a HTTP request on one of the REST API endpoints.

The statistics show the amount of responses for each particular 'family' of status codes (1xx, 2xx, 3xx, 4xx and 5xx).

The Monitoring plugin can be used to review graphs of this data. Note that the current latest release of the Monitoring plugin (2.3.1) has an issue that affects the functionality when a plugin that provides a statistic is unloaded/reloaded. See https://github.com/igniterealtime/openfire-monitoring-plugin/issues/238 for details. It is recommended to use this commit only in combination with a version of the Monitoring plugin in which this issue is fixed. A work-around for the issue, if it does occur, is to restart Openfire after a plugin has been unloaded/reloaded.

Fishbowler commented 2 years ago

Does this have any dependency on essential versions of Openfire or Monitoring that need to be accounted for?

guusdk commented 2 years ago

I do not believe that to be the case, apart from the aforementioned https://github.com/igniterealtime/openfire-monitoring-plugin/issues/238

The statistics-related API has been a part of Openfire core for ages, and has not been touched for years.

The Monitoring plugin uses that API to obtain Statistics definitions supplied anywhere in Openfire and/or Plugins, in order to display them.

guusdk commented 2 years ago

Rebased to Main, force-pushed.