Check onlyoffice-stats¶
Overview¶
Monitors OnlyOffice Document Server statistics and license usage via the HTTP API. Reports active connections, document editing sessions, and license consumption. Alerts when license usage exceeds the configured thresholds.
Important Notes:
- By default the
info/info.jsonpage is only available from localhost. The OnlyOffice nginx configuration has to be modified if the check is not running locally (/etc/onlyoffice/documentserver/nginx/includes/ds-docservice.conf: setallow ...instead ofdeny allonlocation ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(info|internal)(\/.*)$).
Data Collection:
- Fetches statistics from the OnlyOffice
info/info.jsonendpoint via HTTP - Reports maximum licensed connections, license status and expiration, hourly view and edit connection statistics (min/avg/max), unique user count, and server version
Fact Sheet¶
| Fact | Value |
|---|---|
| Check Plugin Download | https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/onlyoffice-stats |
| Nagios/Icinga Check Name | check_onlyoffice_stats |
| Check Interval Recommendation | Every 30 minutes |
| Can be called without parameters | Yes |
| Runs on | Cross-platform |
| Compiled for Windows | No (runs with Python interpreter) |
Help¶
usage: onlyoffice-stats [-h] [-V] [--always-ok] [--insecure] [--no-perfdata]
[--no-proxy] [--proxy PROXY] [--timeout TIMEOUT]
[--url URL]
Monitors OnlyOffice Document Server statistics and license usage via the HTTP
API. Reports active connections, document editing sessions, and license
consumption. Alerts when license usage exceeds the configured thresholds.
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
--always-ok Always returns OK.
--insecure This option explicitly allows insecure SSL connections.
--no-perfdata Suppress the performance data section from the output.
The status message and the exit code are unaffected, so
alerting keeps working while trending data is dropped.
--no-proxy Do not use a proxy, not even one the environment names.
Overrides `--proxy`.
--proxy PROXY Proxy to reach the target through. The scheme defaults to
`http` when omitted. Overrides the proxy the environment
names (`http_proxy`, `https_proxy`, `all_proxy`) together
with the exceptions it lists in `no_proxy`, and is itself
overridden by `--no-proxy`. Without either parameter the
environment applies. Credentials belong into the
environment variable rather than here, because a command-
line argument is visible to every user on the host.
Example: `--proxy=http://proxy.example.com:3128`.
--timeout TIMEOUT Network timeout in seconds. Default: 3 (seconds)
--url URL OnlyOffice API URL. Default: http://localhost
Documentation:
https://linuxfabrik.github.io/monitoring-plugins/check-plugins/onlyoffice-stats/
Usage Examples¶
./onlyoffice-stats --url=http://localhost --timeout=3
Output:
Max 20 connections, licensed (expired) [WARNING], last hour: 3/7/12 views and 2/6/11 edits (min/avr/max), 13 unique users, v1.2.3
States¶
- OK if the license is valid and connection counts are within limits.
- WARN if the license expires in the next 10 days.
- WARN if the license has expired.
- WARN if the maximum hourly view or edit connections reach 90% of the licensed maximum.
- CRIT if the maximum hourly view or edit connections reach 95% of the licensed maximum.
Perfdata / Metrics¶
| Name | Type | Description |
|---|---|---|
| conn_hour_edit_avr | Number | Average number of editing connections per hour. |
| conn_hour_edit_max | Number | Maximum number of editing connections per hour. |
| conn_hour_edit_min | Number | Minimum number of editing connections per hour. |
| conn_hour_view_avr | Number | Average number of viewing connections per hour. |
| conn_hour_view_max | Number | Maximum number of viewing connections per hour. |
| conn_hour_view_min | Number | Minimum number of viewing connections per hour. |
| unique_users | Number | Number of unique users. |
Credits, License¶
- Authors: Linuxfabrik GmbH, Zurich
- License: The Unlicense, see LICENSE file.