Skip to content

Check librenms-version

Overview

Displays LibreNMS instance information including version, database schema, Python and RRDtool versions via the LibreNMS API. This check does not track new releases since LibreNMS can update itself when running the Git version.

Important Notes:

  • Consider also monitoring the EOL dates for Apache, MariaDB, PHP and other components using the corresponding *-version check plugins

Data Collection:

  • Queries the LibreNMS API endpoint /api/v0/system to retrieve instance metadata
  • Reports LibreNMS version, Git branch, database schema, database server version, Net-SNMP, PHP, Python, and RRDtool versions
  • Requires a LibreNMS API token with "Global Read" permissions (create one via LibreNMS > Gear Icon > API > API Settings)

Fact Sheet

Fact Value
Check Plugin Download https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/librenms-version
Nagios/Icinga Check Name check_librenms_version
Check Interval Recommendation Every day
Can be called without parameters No (--token is required)
Runs on Cross-platform
Compiled for Windows No (runs with Python interpreter)

Help

usage: librenms-version [-h] [-V] [--always-ok] [--insecure] [--no-perfdata]
                        [--no-proxy] [--proxy PROXY] [--timeout TIMEOUT]
                        --token TOKEN [--url URL]

Displays LibreNMS instance information including version, database schema,
Python and RRDtool versions via the LibreNMS API. This check does not track
new releases since LibreNMS can update itself when running the Git version.
The version is reported for reference and never alerts on its own.

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)
  --token TOKEN      LibreNMS API token.
  --url URL          LibreNMS API URL. Default: http://localhost

Documentation:
https://linuxfabrik.github.io/monitoring-plugins/check-plugins/librenms-version/

Usage Examples

./librenms-version --url=http://librenms --token=03xyza61e74a9876f3dc7ab11234229d

Output:

LibreNMS 21.6.0 (Git: HEAD), DB-Schema 2021_06_07_123600_create_sessions_table (211), MariaDB 10.6.3-MariaDB, Net-SNMP 5.8, PHP 8.0.8, Python 3.6.8, RRD-Tool 1.7.0

States

  • Always returns OK.
  • --always-ok is not available since the check always returns OK.

Perfdata / Metrics

Name Type Description
db-version Float Database server version as a floating-point number.
librenms-version Float LibreNMS version as a floating-point number.
netsnmp-version Float Net-SNMP version as a floating-point number.
php-version Float PHP version as a floating-point number.
python-version Float Python version as a floating-point number.
rrdtool-version Float RRDtool version as a floating-point number.

Credits, License