Skip to content

Check qts-memory-usage

Overview

Monitors system memory utilization on QNAP appliances running QTS via the API. Alerts when memory usage exceeds the configured thresholds. Reports total, used, and free memory along with the usage percentage.

Important Notes:

  • See QNAP plugins for the monitoring account, the requirements and for testing without a QNAP appliance.

Data Collection:

  • Authenticates against the QTS API and fetches system information via /cgi-bin/management/manaRequest.cgi
  • Calculates memory usage from the total and free memory values reported by QTS

Fact Sheet

Fact Value
Check Plugin Download https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/qts-memory-usage
Nagios/Icinga Check Name check_qts_memory_usage
Check Interval Recommendation Every minute
Can be called without parameters No (--password and --url are required)
Runs on Cross-platform
Compiled for Windows No (runs with Python interpreter)
3rd Party Python modules xmltodict

Help

usage: qts-memory-usage [-h] [-V] [--always-ok] [-c CRIT] [--insecure]
                        [--no-perfdata] [--no-proxy] --password PASSWORD
                        [--proxy PROXY] [--timeout TIMEOUT] --url URL
                        [--username USERNAME] [-w WARN]

Monitors system memory utilization on QNAP appliances running QTS via the API.
Alerts when memory 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.
  -c, --critical CRIT  CRIT threshold for memory usage in percent. Supports
                       Nagios ranges. Default: 90
  --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`.
  --password PASSWORD  QTS API password.
  --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: 6 (seconds)
  --url URL            QTS-based appliance URL. Example:
                       `--url=https://192.0.2.10:8080`.
  --username USERNAME  QTS API username. Default: admin
  -w, --warning WARN   WARN threshold for memory usage in percent. Supports
                       Nagios ranges. Default: 80

Documentation:
https://linuxfabrik.github.io/monitoring-plugins/check-plugins/qts-memory-usage/

Usage Examples

./qts-memory-usage --url=http://qts:8080 --username=admin --password=linuxfabrik --insecure

Output:

7.33% - total: 62.8GiB, used: 4.6GiB, free: 58.2GiB

States

  • OK if memory usage is below the thresholds.
  • WARN if memory usage exceeds --warning (default: 80%).
  • CRIT if memory usage exceeds --critical (default: 90%).
  • --always-ok suppresses all alerts and always returns OK.

Perfdata / Metrics

Name Type Description
free Bytes Free memory.
memory-usage Percentage Memory usage, in percent.
total Bytes Total memory.
used Bytes Used memory.

Credits, License