Skip to content

November 2026

0.27.0 Failed checks that explain themselves, a native Icinga 2 agent, and a Checkmk agent that matches the official one

0.27.0 is about the moment a check fails. The agent now keeps a log of its last failed checks, and can keep the metrics and diagnostics tables (top processes, services in trouble, the last log errors, the usual disk growth spots) from that moment, on the host and for the fleet server. It also adds an experimental IcingaAgent module that joins an Icinga 2 cluster natively, brings the Checkmk agent dump in line with the official agent, and adds pressure metrics, per-volume growth, and Hyper-V over-commitment and switch checks.

โœจ Highlights

  • ๐Ÿงพ A log of the last failed checks. The core keeps the last 50 WARNING, CRITICAL and UNKNOWN results from every transport, with output and perfdata. It shows on a new Failed checks page, as a dashboard widget and at GET /api/v2/failures (#1697).
  • ๐Ÿ” What the system looked like when it failed. With capture metrics and capture diagnostics on, each failure keeps the metrics snapshot and small diagnostics tables from that moment. A new Diagnostics page shows them live, and an enrolled agent can send failure context to the fleet server (#1699, #1710).
  • ๐ŸงŠ IcingaAgent: NSClient++ as a native Icinga 2 agent (experimental). It speaks the cluster protocol on port 5665, requests its certificate from the Icinga CA and runs the checks the master schedules with command_endpoint (#1736).
  • ๐Ÿ“ค The Checkmk agent dump matches the official agent. New Linux <<<cpu>>> and <<<kernel>>> sections, the full memory data, process owners and exact numbers. nscp mk install sets the agent up from the command line (#1719).
  • ๐Ÿ“Š Pressure metrics and volume growth. Linux pressure stall figures, the Windows processor queue and page faults, the average disk queue, and how much each volume grew in the last hour and day, as metrics and as check_drivesize keywords (#1710).
  • ๐Ÿ–ฅ๏ธ Hyper-V over-commitment and virtual switches. check_hyperv_host reports CPU and memory over-commitment, the new check_hyperv_switches checks every virtual switch, and check_hyperv_vms finds duplicate VM names (#1718).
  • ๐Ÿ”’ Security fixes. A Checkmk dump field read from the OS can no longer forge rows or sections (#1735). The Windows web backend moves to Mongoose 7.24 (#1722).

๐Ÿ” Detailed changes

๐Ÿงพ Core โ€” the failed-check log

The log is on by default and lives in memory only. Configure it under [/settings/core/failed checks], or in the new folded Failed-check log settings card on the Failed checks page:

Key Meaning
enabled, max entries, statuses Whether to keep the log, how many entries (default 50), which states count.
record arguments none, safe (default: thresholds, filter, syntax and what was checked) or all (every option, with password/token values as ***).
capture metrics, capture diagnostics Keep the metrics snapshot and the diagnostics tables with each failure. Off by default.
metrics context budget, max context size Bound what the snapshots may hold (default 4 MiB). The oldest are released first and their failures stay in the log marked evicted.
prune metrics, prune pattern Trim each snapshot: zeros, empty, duplicates, or keys containing a text.

GET /api/v2/failures takes ?status=, ?command=, ?since= and ?limit=. GET /api/v2/failures/<index>/context serves the snapshot, and DELETE empties the log. The endpoints need the new failures.list / failures.delete grants, which only the built-in full role holds.

๐Ÿ” Core โ€” diagnostics

capture diagnostics keeps small tables with each failure, each switched on in the module that produces it:

Table Holds
processes.top_cpu, processes.top_memory Name, pid, CPU share and memory. Never a command line.
services.problems, services.events Services not running as they should, and the service manager’s crash and restart events.
eventlog.errors The last critical and error events (Application and System logs, or the journal).
disk.growth_spots The size of the temp and log folders, page and swap files, and shadow-copy storage.
failures.recent The last failed checks. Always present.

GET /api/v2/diagnostics (new diagnostics.list grant) serves the latest snapshot live, and nscp test gains a diagnostics [section] command. An enrolled agent sends at most one failure-context report per failure context interval (default 1h) to a fleet server that asks for one. Set failure context = false under [/settings/fleet] to send none.

๐ŸงŠ IcingaAgent โ€” a native Icinga 2 agent (experimental)

The module is not loaded by default and does nothing until /settings/Icinga/agent has a parent host and a parent endpoint. It then connects to an Icinga 2 master or satellite, gets a certificate (straight away with a ticket, otherwise after icinga2 ca sign), and runs the checks it is sent. CheckCommands import ifw-api, the same convention Icinga for Windows uses. Checks run as IcingaAgent:<parent endpoint>, so the permission policy decides what the parent may run. tls version and allowed ciphers tune the connection. Install the master’s ca.crt, or set parent fingerprint, so the first connection is verified too.

๐Ÿ“ค CheckMKServer โ€” official agent sections and nscp mk install

Section Change
<<<cpu>>>, <<<kernel>>> New on Linux: load, thread count, /proc/vmstat and /proc/stat.
<<<mem>>> The whole of /proc/meminfo on Linux, commit limit and virtual memory on Windows, exact values.
<<<df>>> Built by check_drivesize on Linux, with inode counts (needs CheckDisk).
<<<ps>>> The user field holds the process owner. Every Windows process has a command.
<<<services>>> Delayed and trigger-start services are auto, as the official agent sends them.
<<<check_mk>>> OSType, OSName and OSVersion, which become cmk/os_* host labels.
nscp mk install --allowed-hosts 10.0.0.5 --local "CPU Load=check_cpu warn=load>80 crit=load>95"
nscp mk show

The install command enables CheckMKServer, CheckSystem and CheckDisk, and adds local checks and MRPE entries. A re-run only changes what it is given.

๐Ÿ“Š Metrics โ€” pressure, volume growth and a Metrics page that explains itself

  • Pressure. system.pressure.* adds the Linux pressure stall figures for CPU, memory and I/O, major faults, and the Windows processor queue length and page faults. disk.io.<disk>.avg_queue_length joins the instantaneous queue length on both platforms.
  • Volume growth. disk.free.<drive>.used_change_1h and _24h say how much a volume grew, and check_drivesize gains the same keywords: warn=used_change_1h > 2G. They read unknown until the agent has a full hour (or day) of history.
  • Metrics page. The web UI shows each metric’s description, labels, kind and unit (640.5 GiB, 34 %), grouped by module and instance (#1713, #1715).
  • check_mssql_counters gains latch_wait_ms, the average latch wait (#1737).

๐Ÿ–ฅ๏ธ Windows โ€” Hyper-V and SCVMM

  • check_hyperv_host gains running_vms, vm_vcpus, cpu_overcommit, memory_assigned, physical_memory and memory_overcommit. It now reads the VMs over WMI, so it needs the same rights as check_hyperv_vms. When it cannot, guests_known is false and guests_error says why.
  • check_hyperv_switches is new: type, state, health and ports for every virtual switch.
  • check_hyperv_vms gains name_count (critical=name_count > 1), and health reads degraded, minor_failure, … instead of health_10, health_15, … (#1718).
  • scripts\check_scvmm_hosts.ps1 is a new sample script that checks every host System Center VMM manages (#1720).

๐Ÿ›ฐ๏ธ Fleet and core

  • Poll interval bounds. poll interval, min poll interval and max poll interval under [/settings/fleet] bound how often the host polls, whatever the server asks for (#1729).
  • Stored module state is per module. nsclient.db used to share one namespace between modules. Each module (or alias) now owns its entries, and existing sessions and bookmarks are carried over on first start (#1726).
  • [/settings/core] keys are known. A misspelled key there now gets a warning naming the key it resembles, and nscp settings --validate fails on it (#1731).
  • No longer experimental: check_single_file, check_disk_io, check_disk_health, check_tcp, check_dns, check_http, check_connections, check_ntp_offset, check_nscp_update and the NSCANgClient module (#1714).

๐Ÿ”’ Security

  • Checkmk dump injection. A line break in a process command line, a mountpoint or a service name could end a row early and pose as another row or a whole section. Control characters are now replaced with a space (#1735).
  • Mongoose 7.24. The Windows web backend no longer silently ignores headers past the 30th. A request with more is now refused (#1722).
  • OpenSSL 3.5.10. The twelve November OpenSSL CVEs that scanners flag against the bundled 3.5.9 are not reachable through NSClient++. The notice lists why for each.

๐Ÿ› Bug fixes

  • check_http and check_nsclient_web_online honour timeout=. Neither applied it, so a server that accepted the connection and never answered held the check forever (#1707).
  • check_patch_age. A host with no install dates reported age -1, which looked freshly patched. age is now unknown, with a new age_known flag (#1734).
  • check_service no longer fails every call on a service whose configuration the agent’s account cannot read, and the Checkmk <<<services>>> section stays.
  • Windows Update search. The patch collector could crash when a search was aborted while Windows Update was finishing it. The search now runs to completion on its own thread (#1725).
  • Scheduler report lists accept spaces and any case: report = critical, warning used to submit only criticals.
  • Settings. Setting a key to an empty value from a module or script now stores the empty value instead of deleting the key. Lua and Python gain remove_key(). A fleet timeout = 0 and negative sizes are refused.
  • Module listing. An unloaded .zip module bundle now shows in the full module listing, the REST module list and the web UI (#1727).

๐Ÿ“ฆ Packaging

  • check_nsclient 1.2.0 is bundled on Windows and Linux. It adds nsclient failures, which reads the failed-check log and the context kept with each failure, fleet explain, which asks a fleet server to explain an error, and nrpe, which runs a check over NRPE the way check_nrpe does.

โš ๏ธ Upgrade notes

The full list is on the upgrading page, and the security fixes are on the security notices page.

  • Checkmk sites: run service discovery on hosts monitored through NSClient++. The memory service moves to Checkmk’s own memory check, new CPU services appear, and process rules that match on the user now see the owner. On Linux, enable CheckDisk to keep <<<df>>>. A Lua line object set with line:set_line(...) now sends an embedded line break as a space.
  • Custom roles: the failed-check log needs failures.list (failures.delete to clear), and diagnostics need diagnostics.list.
  • check_hyperv_vms health: filters on health_0, health_10, health_15 or health_30 must use unknown, degraded, minor_failure or non_recoverable_error.
  • check_patch_age: replace age < 0 or age = -1 with age_known = 0.
  • nscp settings --validate now fails on a misspelled key under [/settings/core]. Fix the spelling it suggests.
  • Scripts that wrote an empty string to reset a key should call remove_key() instead.
  • Windows web server behind a proxy: a request with more than 30 headers is now dropped. Trim what the proxy forwards if requests start failing.
  • Downgrading after the first start loses stored module state once: web sessions log out and log bookmarks start over.

Download

You can download the new version from GitHub

// Michael Medin

Thank you, OSMC 2026

OSMC 2026 wrapped up in Nuremberg today. I went to OSMC for many years, but this was my first time back in several, and the 20 year anniversary was a good one to return for.

A lot was familiar. I met a number of old friends this week, and some new people as well. The new hotel was a great upgrade, though I did miss Checkpoint Jenny. Thank you to everyone who came to my talk, asked questions, or stopped me in the hallway afterwards, and to the NETWAYS team for a well-run conference.

The slides

The deck from my talk is up:

Most of the talk was a walk through the last two years: the new checks, Linux, the transports, the security work. The last part was new, so here is a short summary for those who were not in the room.

What the agent knows

After Nagios World I wrote that context is the piece classic monitoring has always been missing, and that the agent is a natural place to collect it. At the time that was just an idea. It is now four things an agent can tell you about its own host:

  • Host facts: what the host is. An opt-in inventory of the OS, hardware, network interfaces, volumes, installed software, services and more. Already released, since 0.24.0.
  • Metrics: how much. The snapshot of CPU, memory, disk and network the agent has had for years, now also with pressure metrics (is anything actually waiting?) and how much a disk has grown over the last hour and day.
  • Diagnostics: what’s going on right now. Small tables rather than numbers: the top processes by CPU and memory, services that are not where they should be, recent service crashes and event log errors, and the places that usually fill a disk. Off by default, and never a command line.
  • Failed checks: what it looked like when it failed. The agent keeps the last 50 checks that did not come back OK, each with the metrics and diagnostics from that moment. By the time a human logs in the spike is gone. The snapshot is not.

All of it lives on the box and needs no server. You can read it over REST, in nscp test, with check_nsclient or in the web UI.

A first guess from Fleet

The number that matters is the time from error to recovery, and most of that time is not the check interval or the fix. It is a human working out what is actually wrong.

So an enrolled agent can report a failed check to NSClient Fleet together with its context, and Fleet can hand the check result, the host facts, the snapshot and the diagnostics to a model and ask for a first guess. What you got paged with is this:

CRITICAL: 1m: 87%

What Fleet says about it is this:

$ check_nsclient fleet explain --host faults-osl-14 --check check_cpu "CRITICAL: 1m: 87%"

faults-osl-14: The 1-minute CPU load [...] is critical because
acme-indexer.exe is holding the host's only CPU core at 100% [...]
The evidence [...] does not show why the indexer is consuming the
core or whether that behaviour is expected.

That is a real answer to a fault I planted on a test host, shortened to fit. It names the process, it knows the host has one core, and it says what it does not know.

A few things I care about here:

  • It is off by default. Nothing leaves the Fleet server until you configure a provider.
  • You pick the model. Claude, anything OpenAI-compatible, or a local Ollama on your own hardware, in which case the evidence never leaves your network.
  • The bill has a ceiling. One explanation per problem, not per alert, under a daily budget. With a small hosted model it came to a fraction of a cent each in my tests.
  • Your monitoring stays the same. The checks, thresholds and notifications are untouched. This sits at the very end and explains the failure you already got.

And if you do not like AI, the same context is just as useful to a human.

Out on Monday

I had planned to stand on stage and say that all of this is out now. It is not, quite. Host facts and the metrics snapshot are released, but the new metrics, the diagnostics, the failed check log and the Fleet side are coming on Monday.

Thanks again, everyone. I hope to be back next year.

// Michael Medin

0.26.0 Nagios NCPA support, a check that finds what is filling a disk, and scripts that run from the fleet tree

0.26.0 adds two experimental pieces: an NCPAServer module that lets Nagios’ check_ncpa.py poll NSClient++, and check_largest_files, which ranks the files or folders filling a disk and reads the NTFS Master File Table on Windows. A new script root setting lets every script module run its scripts from the fleet tree. The WEB server now uses its threads pool, keeps connections alive and no longer falls back to cleartext when its certificate does not load. Missing predefined performance counters are retried until they exist, and a fleet install stops writing local configuration.

โœจ Highlights

  • ๐Ÿ“ก NCPAServer: poll NSClient++ with check_ncpa.py. A new, experimental module serves the Nagios NCPA HTTP API on port 5693, token-authenticated and limited by allowed hosts. This release serves the plugins/ node, which runs any check, alias or script (#1633).
  • ๐Ÿ’พ check_largest_files finds what is filling a disk. It lists the top largest files (or, with type=folders, folders) beneath a path. On Windows it reads the NTFS Master File Table, which takes seconds where walking a large volume takes minutes (#1692).
  • ๐Ÿ›ฐ๏ธ script root runs scripts from the fleet tree. External, Lua, Python and check_mk scripts can all load from ${fleet-folder}/scripts, a shared folder or one of your own, so a fleet bundle can ship its scripts (#1673, #1684).
  • โฑ๏ธ The WEB server serves requests in parallel and keeps connections alive. threads (default 10) finally sizes a real pool, so one slow REST check no longer holds up the web UI. Connections are reused, and the request body cap is now the max request size setting (#1653, #1678).
  • ๐Ÿ”’ No cleartext fallback when the web certificate does not load. An unreadable or mismatched certificate or key stops the WEB server with a reason. It no longer serves plain HTTP on 8443 or fails every handshake (#1633).
  • ๐Ÿ“Š Late performance counters are picked up. One predefined counter that was not registered yet used to break every predefined counter until a restart. Each one is now retried on its own until it appears (#634, #1656).
  • ๐Ÿ›ฐ๏ธ A fleet install writes no local configuration. An MSI install with FLEET_SERVER only adds the fleet include, so the fleet server’s settings are no longer overridden by installer defaults (#1688).

๐Ÿ” Detailed changes

๐Ÿ“ก NCPAServer โ€” a Nagios NCPA endpoint (experimental)

The module is off until you enable it. It answers the NCPA HTTP API that check_ncpa.py speaks:

check_ncpa.py -H agent -t <token> -M plugins/check_cpu
Setting ([/settings/NCPA/server]) Meaning
token, backup token The NCPA token, plus a second one for rotation. nscp ncpa token --set stores either one hashed.
allowed hosts Who may connect, as with the other servers.
allow arguments Arguments are refused unless this is true, as with NRPE.
threads How many requests it answers at once (default 10).

It uses the WEB server’s certificate and won’t start unless that certificate loads. allow insecure = true covers a missing certificate only. On Windows it is the new NCPA support installer feature. The built-in NCPA node tree (cpu/, memory/, disk/, …) comes in a later release. The security notice explains what enabling it exposes.

๐Ÿ’พ CheckDisk โ€” check_largest_files (experimental)

check_largest_files path=D:\ top=10 min-size=100M
check_largest_files path=/var type=folders folder-depth=2

pattern and min-size narrow what is counted. timeout (default 30 seconds) aborts a long scan and returns UNKNOWN, or whatever timeout-state says. On Windows the check reads the NTFS Master File Table directly when it can: that needs a local NTFS volume and administrator rights, which the service has. Otherwise, and always on Linux, it walks the tree. Neither method follows symbolic links, junctions or mount points. path is gated by file access in [/settings/disk], as check_files is.

๐Ÿ›ฐ๏ธ Scripting โ€” script root

CheckExternalScripts, PythonScript, LUAScript, CheckMKClient and CheckMKServer now all read script root, either from their own section or from [/settings/default]:

Value Scripts folder
${scripts} (default) the built-in layout, unchanged
fleet ${fleet-folder}/scripts, where the fleet sync stages a bundle’s scripts/ entries
shared ${shared-path}/scripts
a path a folder of your own

Python and Lua read its python and lua sub-folders. External scripts start in the folder above it, the same rule the default layout always followed, so a moved scripts folder runs unchanged. On Linux and macOS the agent now sets that working directory itself instead of inheriting one. ext-scr add --import records scripts/<name> on every platform.

โš™๏ธ WEBServer โ€” threads, keep-alive and request size

  • Threads. The web server ran every request on one thread, so a slow check over REST held up every other request, the web UI and /api/v2/metrics. threads under /settings/WEB/server was read and never used. It now sizes the pool on both backends.
  • Keep-alive. The Linux backend sent Connection: close on every answer. Clients now reuse their connection for up to 30 seconds between requests, on every platform.
  • max request size. The body cap was a compile-time constant (1 MiB on Linux, 3 MiB on Windows), and a request over it was dropped without an answer. It is now a setting, default 3MiB. A larger request gets 413 Payload Too Large with a body naming the setting. On Windows the effective limit is 3 MiB, whatever the setting says.
  • Certificate must load. If certificate or certificate key points at a file that cannot be used, the server logs why and does not start. Set certificate to empty and allow insecure = true only if you really want cleartext.
  • nscp web install (and the NRPE equivalent) run without write access to the certificate folder now say so and how to fix it, instead of printing Invalid command line (#1660).

๐Ÿ“Š CheckSystem โ€” performance counters, facts and process keywords

  • Predefined counters (#634). Each counter in [/settings/system/windows/counters] is added on its own. A missing one is retried in the background: quickly during the first minute, then every minute. The log says Failed to add counter <name> (<path>): ... once, then Counter <name> is now available. check_pdh reload=true, which used to do nothing, now has the collector retry on its next tick.
  • os facts: domain or workgroup. Two new Windows fields, join (domain, workgroup or standalone) and join_name, say whether the host is joined. domain was always only the DNS suffix (#1674).
  • check_process page file keywords. pagefile and peak_pagefile reported each other’s value on Windows. They now report what their names say (#1670).
  • Windows Server 2008 / 2008 R2. The network and temperature collectors no longer fail every second with a WMI lookup error. check_network reports the interface source there (#1681).

๐Ÿงญ Core โ€” unknown commands and shutdown

  • Unknown commands name their module. check_ping without CheckNet now answers Unknown command(s): check_ping (provided by module CheckNet, which is not loaded: add "CheckNet = enabled" under [/modules] and restart). The old text is kept as the prefix (#698, #1661).
  • Stopping waits for running tasks. A module reload, metrics round or facts round in flight when the service stops now finishes first. A task that runs longer than 30 seconds is reported by name, and the shutdown carries on without it. Scheduler checks in progress are finished the same way when the module reloads (#1676).

๐Ÿ› Bug fixes

  • Crash on exit after WEBServer loaded. WEBServer left a callback installed in the mongoose library, which crashed the process at exit. The crash handler also failed while writing its report and left an empty .crash file. Both are fixed (#1677).

๐Ÿ“ฆ Packaging

  • Boost.JSON is now linked from the Boost build: nscp_json.dll / libnscp_json.so is gone and the MSI ships boost_json.dll instead. The Linux packages use the system library (#1561).
  • Fleet installs. With FLEET_SERVER, the MSI ignores the configuration properties (ALLOWED_HOSTS, NSCLIENT_PWD, CONF_SET, NRPEMODE, NSCA_*, …) with a warning in the install log, and skips the monitoring-tool pages (#1688).

โš ๏ธ Upgrade notes

The full list is on the upgrading page, and the security fixes are on the security notices page.

  • WEB server certificate. If the configured certificate or key does not load, the WEB server no longer starts. Check the log after upgrading and fix the file, or deliberately opt into cleartext.
  • Fleet installs. Configuration passed to an MSI install alongside FLEET_SERVER is now ignored. Move those values to the fleet server, and have it enable the modules it needs. Hosts that are already enrolled keep their nsclient.ini.
  • Hand-rolled Windows deployments that copy the DLLs next to nscp.exe must add boost_json.dll.
  • check_process pagefile / peak_pagefile. Thresholds written against the swapped values should switch keywords. Graphs of pf_use / ppf_use flip at the upgrade.
  • Linux and macOS external scripts now run with the parent of the scripts folder as their working directory, /usr/share/nsclient on a default install, so scripts/check.sh resolves the same way as on Windows. Under the shipped systemd unit nothing changes, because it already set WorkingDirectory to that folder. An agent started by hand or as a container entrypoint used to inherit whatever directory it was launched from. A script that relied on that should use an absolute path.
  • Log-matching rules. A missing performance counter now logs Failed to add counter <name> (<path>): ... instead of Exception in Failed to add counter. A predefined counter read in the first seconds after startup answers Failed to get value instead of 0.

Download

You can download the new version from GitHub

// Michael Medin

0.25.0 The agent reports configuration it ignores, and a robustness pass over scripting and concurrency

0.25.0 makes misconfiguration visible: a section or key nothing reads is now logged, shown in the web UI and reported by nscp settings --validate. Collector-backed checks gain a warmup-state option, kill tree finally works on Linux, and the rest of the release is the harvest of a stress harness, a concurrency audit and a full test of the Lua and Python APIs: a Lua crash under concurrent calls, socket requests stuck behind unrelated slow checks, duplicated events and client payloads, and a long list of smaller fixes.

โœจ Highlights

  • ๐Ÿ” Configuration nothing reads is reported. A misspelled section, a section without its leading /, or a key above the first section used to be ignored without a word. The agent now warns about each one at startup and on every reload, the web UI shows a Configuration problems banner, and nscp settings --validate exits with 1 when it finds any (#647, #1657).
  • โฑ๏ธ warmup-state for collector-backed checks. check_cpu, check_load and, on Linux and macOS, check_memory, check_pagefile and check_network can report ok (or any other status) instead of UNKNOWN while the collector takes its first sample, so a restart need not raise alerts. A collector that is disabled or failing now says so instead of reporting zeros (#1621).
  • ๐Ÿง kill tree works on Linux. The script runs in a session of its own and a timeout signals the whole process group, so backgrounded helpers die with it; unloading CheckExternalScripts now ends running scripts (#1629).
  • ๐Ÿ”’ Lua and Python scripting hardened. A Lua check running twice at once could crash the agent; listing scripts over REST ran every check; and a test of every documented API fixed a dozen bindings that did nothing or crashed (#1642, #1636, #1632).
  • ๐Ÿ“ก Socket servers no longer queue behind slow checks. About one NRPE, NSCA, check_mk or NSClient request in a few hundred waited for an unrelated long-running check, which showed up as an occasional Socket timeout (#1642).
  • ๐Ÿ”’ OpenSSL 3.5.9 in the Windows builds, from the 29 September 2026 upstream security release (#1666).

๐Ÿ” Detailed changes

โš™๏ธ Settings โ€” configuration nothing reads (#647)

A key the agent never reads used to be silently ignored, so a script defined under [settings/external scripts] (no leading /) was simply Unknown command. Every section and key is now checked against what the loaded modules registered:

Where What you see
Log a warning naming each unread section or key, at startup and on every reload
Web UI a Configuration problems banner, and a Problems button on the Settings page
REST GET /api/v2/settings/problems
CLI nscp settings --validate prints the report and exits with 1 on a warning

Sections and keys that belong to a module which is not loaded are listed as info and raise nothing; add --load-all to --validate to have every installed module register its settings first. The check found one of its own: the core registered its section as settings rather than /settings, so nscp settings --update wrote an empty [settings] into every file it touched. It no longer does, and an existing empty one is harmless.

โฑ๏ธ CheckSystem / CheckSystemUnix โ€” warmup-state

Right after a start the background collector has no sample yet and the checks answer UNKNOWN “โ€ฆ not available yet (collector still initializing)”. The new option picks that status:

check_cpu warmup-state=ok

It only covers a collector that has not tried yet. Telling the cases apart also changes results without the option: on Linux and macOS a source the collector cannot read (an unreadable /proc/stat or /proc/meminfo in a locked-down container) used to be stored as an all-zero sample, so check_cpu reported 0% load as if measured; it now answers UNKNOWN with the reason. The checks concept page describes every case.

๐Ÿง CheckExternalScripts โ€” kill tree on Linux

The setting was accepted on Linux but did nothing: only the script was signalled on a timeout, and a helper it had backgrounded kept the output pipe open, so the check only returned when the timeout expired. With kill tree = true the script now runs in its own session and SIGTERM / SIGKILL go to the whole group. Unloading the module kills running scripts, which report was killed: the module is unloading; a script ended by a signal names it (was terminated by signal 9 (SIGKILL)), and every script reads stdin from /dev/null.

๐Ÿ”’ Scripting โ€” LUAScript and PythonScript

  • Concurrent Lua calls. Two calls into the same script, where the first was parked in nscp.sleep or a Core call, shared one Lua stack and could terminate the agent; two overlapping NRPE requests were enough. Every call now runs on a Lua thread of its own.
  • Listing scripts ran every check. GET /api/v2/scripts/lua and /api/v2/scripts/py collected each query’s parameters by running it, so a caller with only a listing grant could run every check on the agent. They now ask for names only.
  • Show and delete. GET/DELETE on /api/v2/scripts/{lua,py}/<name> (and nscp lua|py show|delete) answered an empty 200 and did nothing. They now read and delete script files as documented; the security notice lists what that means for the grants.
  • Lua API. One script that failed to parse no longer takes the whole module down; an on_start calling the Core API no longer leaves the Lua lock held for good; Registry:simple_cmdline handlers run; a reload re-runs on_start; require() searches ${scripts}/lua/lib as documented, which fixes shared helpers on Linux packages.
  • Python API. plugin_alias is python rather than empty when no alias is set; a Registry.event handler no longer crashes the agent and Registry.event_pb handlers run; Core.simple_exec reports a call nothing could run as UNKNOWN instead of (0, []).
  • nscp lua list and nscp py list were always empty on DEB/RPM installs, where ${scripts} lives under /usr/lib; they now list the scripts.

๐Ÿ“ก Socket servers and the core โ€” concurrency

  • No queueing behind slow checks. The NRPE, NSCA, check_mk and NSClient servers used legacy asio strands, which share a pool of 193 implementations between all connections, so a new request could wait for another connection’s check. Every connection and the accept loop now has a strand of its own.
  • Events delivered once. A message carrying N records (a real-time CPU filter sends one per core) reached every subscriber N times: /api/v2/events, ElasticClient and script handlers all saw duplicates.
  • Client targets send once. Since 0.20.0 a client query with target=<name> sent its payload twice: check_foo!a!a over NRPE, every submit_* message as two lines, every batch= record twice.
  • Reloads start modules after loading them. A Lua on_start or a Scheduler run on startup schedule now runs once every module the reload loads is loaded, as at boot, and a module a reload loads for the first time is started.
  • Module unload waits for calls inside it. Unloading now waits for a log line or a metrics/facts round still running inside the module, and refuses with a clear message rather than tearing it down underneath.
  • Settings and permission reload races. Walks of the included settings stores raced a reload (a use-after-free); a permission policy reload that fails part-way now fails closed and denies exec.

๐Ÿ“ Logging โ€” one logger

The core now has one logger instead of three backends. This is mostly an internal cleanup, and the log looks the same on a normal install. Two things differ: the service writes each line to the console and the log file on the thread that logs it rather than through a queue, so the last lines before a crash are no longer left behind in that queue; and the queue that feeds log-handler modules (the web UI’s live log, check_nscp, ElasticClient, scripts) is capped at 10 000 lines, past which the oldest lines are dropped for the handlers only and nsclient.fatal records it. --log-backend file and threaded-file both still work, so installed service units need no change (#1637).

๐Ÿ›ก๏ธ Undefined-behaviour sweep and audit follow-ups

The second undefined-behaviour sweep and the 2026-09 source review closed another round of findings (#1609, #1622,

1623, #1630, #1639, #1640):

  • convert() / neg() results that overflow 64 bits are an evaluation error instead of a wrapped value, and convert(2, 'min') / convert(2, 'kb') now scale whole numbers as they did fractions.
  • Out-of-range numbers from check_http json-path=, Docker, Kubernetes and floating-point keywords saturate at the integer limit.
  • Whitespace-only perfdata parses as empty, and filter_perf sorts non-numeric entries last.
  • NRPE escapes control characters in its log lines, check_nt logs a missing password once at load, and the About page links only to http(s) homepages.
  • The docs now name the web grants and the USER_WRITABLE_CONFIG installer property that amount to administrator access, and the unreachable root /metrics route is removed.

๐Ÿ› Bug fixes

  • check_pdh and a missing instance. A counter instance that disappears for a moment is sampled once more a second later, errors name the counter (Failed to poll counter: No data for <path> ...), and ignore-errors=true now skips a counter with no value (#648, #1654, #1625).
  • Rejected connections say why. One log line names the address, the allowed hosts list and the section that sets it (#1651).
  • Fleet host override wins. The fleet server’s host-specific override is now merged after the bundles, so it wins on a key both set (#1635).
  • Aliases with \n are refused instead of silently gaining a newline, so "path=C:\nscp" no longer becomes C: + newline + scp (#1649).
  • check_nt explains “No performance data” with the check’s own message, and an & in a file or service name no longer splits the reply (#1649).
  • check_os_version no longer swaps Windows 7 and Server 2008 R2, and names Windows 11 25H2 (#1649).
  • Localized Windows. OS error text in the ANSI code page no longer breaks the protobuf result, which lost the whole check result on a non-English host (#1619).
  • CheckMKClient scripts entries resolve under ${scripts} and a missing one is logged.

๐Ÿ“ฆ Packaging

  • The Windows builds bundle OpenSSL 3.5.9 (from 3.5.8), picking up CVE-2026-35189 and clearing the version-based scanner finding (#1665, #1666). Linux packages use the distribution’s OpenSSL and are unaffected.

โš ๏ธ Upgrade notes

The full list is on the upgrading page, and the security fixes on the security notices page.

  • nscp settings --validate can now exit with 1. A script or pipeline that runs it fails on any unread section or key; fix the reported entries.
  • Fleet host overrides now win over bundles. If a host override sets a key a bundle also sets, the host switches to the override’s value; check your overrides if you relied on the bundle winning.
  • Aliases containing \n are refused. Check the log for Refusing alias after upgrading; write \\n for a literal, and Windows paths with / or doubled backslashes.
  • Log-matching rules. The rejected connection lines (now one line), check_nt’s No performance data error and check_pdh’s Failed to add counter text changed; match the new prefixes.
  • LUAScript reloads re-run on_start, and Lua require() / CheckMKClient scripts resolve from ${scripts}; check scripts that must run once, or helpers kept under the install base with a custom ${scripts}.
  • PythonScript passes python as plugin_alias and Core.simple_exec reports failures as UNKNOWN; check scripts that test for "", 0 or False.
  • Linux kill tree = true now runs the script in its own session; a script that calls setsid() itself gets EPERM.
  • Permission policy: a reload that fails part-way now denies exec until a later reload succeeds. Nothing changes unless [/settings/permissions] enabled = true.

Download

You can download the new version from GitHub

// Michael Medin

0.24.1 NSCANgClient leaves the Windows installer after antivirus detections

0.24.1 is a small follow-up to 0.24.0 with one change: the Windows installer no longer ships NSCANgClient, because a few antivirus engines report its DLL as malware and made the whole MSI look infected. The module is still in the Windows zip, still signed, and is copied into place by hand.

This release is only a workaround for what are most likely false positives, not a fix: the module’s code is the same as in 0.24.0, and nothing else changed. If you use NSCANgClient on Windows, stay on (or install) the 0.24.0 build instead, which still ships the module in the installer.

โœจ Highlights

  • โš ๏ธ Only a workaround: NSCANgClient users should use 0.24.0. 0.24.1 changes nothing but the packaging of this one module. If you submit results over NSCA-NG from Windows, the 0.24.0 installer gives you the same module without the manual copy.

  • ๐Ÿ“ฆ NSCANgClient is no longer in the Windows MSI. Four antivirus engines on VirusTotal flag NSCANgClient.dll from 0.24.0 with generic machine-learning verdicts. Until the vendors have analysed it, the module ships in the Windows zip only. Linux and macOS packages are unchanged. (#1615)

  • ๐Ÿ”’ A security notice on what the detections do and do not mean. The verdicts are likely false positives but unconfirmed, and the release’s signature, attestation and checksums show the file was not altered after the build, not that the build itself was clean. The notice and FAQ 1.12 spell out both.
  • ๐ŸชŸ The DLL stays signed in the zip. The signing list is read from the installer sources, so leaving the module out of the MSI would have dropped it from signing too; it is now kept on the list explicitly.

๐Ÿ” Detailed changes

๐Ÿ“ฆ Windows installer โ€” NSCANgClient removed

The detections come from Avast and AVG (Win64:Evo-gen [Trj]), Avira and WithSecure (TR/W64.Evo), Sophos (Mal/Generic-S) and Trellix (Artemis). Microsoft Defender and the other engines report the file as clean. All four are generic verdicts that score what a file looks like rather than signatures for a known malware family, and a small, rarely seen DLL whose code is mostly a TLS handshake over raw sockets is a shape they are known to over-fire on.

Because a flagged installer is enough for a download to be blocked, the NSCANgClient component is taken out of the MSI until the vendors clear it. It remains in the Windows zip, Authenticode-signed like every other binary of the release and covered by the zip’s SHA256SUMS. If a configured NSCANgClient = enabled cannot find the module, the load-failure hint now says to copy the DLL from the zip instead of pointing at an installer feature that no longer exists.

If you use NSCA-NG from Windows, the simplest option is to stay on 0.24.0. To run 0.24.1 and keep using it, copy modules\NSCANgClient.dll from the zip of the same version and platform into the installation’s modules folder, after this upgrade and after every later one. The steps are on the NSCANgClient reference page.

๐Ÿ”’ Documentation โ€” antivirus detections

  • A new security notice describes the detections, what the release evidence (signature, Sigstore build provenance attestation, SHA256SUMS) rules out, and what it cannot rule out: a compromise before the signature.
  • FAQ 1.12 now separates what those checks prove from what they cannot, and sends failed checks or signs of a real compromise to a private GitHub security advisory.
  • The NSCA-NG scenario, the installing page and the installer options table point Windows users at the manual install.

โš ๏ธ Upgrade notes

The full list is on the upgrading page.

  • Windows, NSCANgClient users: use 0.24.0 instead. 0.24.1 is only a workaround for the antivirus detections and has nothing else in it, so staying on 0.24.0 keeps the module installed and managed by the MSI. If you upgrade anyway: an MSI upgrade removes the copy an earlier installer put there, and the service then logs that the module was not found. Copy modules\NSCANgClient.dll from the matching zip into the modules folder after upgrading, and again after every later upgrade: the installer does not own a file copied this way, so it never replaces it. Check the file first as FAQ 1.12 shows. Nothing to do if you do not use NSCA-NG on Windows, or on Linux and macOS.

Download

You can download the new version from GitHub

// Michael Medin

0.24.0 Host facts, NSClient++ on macOS, and new checks from Active Directory to Kubernetes

0.24.0 is a big release, and most of it is about the agent knowing more: what the host it runs on actually is, and what the services on it are doing.

The headline is host facts โ€” an opt-in inventory the agent keeps about its host. The OS and hardware, network interfaces, volumes, installed software, services, scheduled tasks, Docker, MySQL, SQL Server and Hyper-V each become a fact set you turn on in the module that already checks that thing. The collected document is served over REST behind two new grants, shown on a new Facts page in the web UI, available as facts in nscp test, and uploaded to the fleet server by an enrolled agent โ€” as a hash on every poll, and as the document only when the server says it holds a different one. Every set is off until you enable it.

Alongside that, NSClient++ runs on macOS for the first time (an experimental Apple silicon package, with CheckSystem ported to Darwin), and there is a wave of new, experimental checks: Active Directory, Hyper-V, Kubernetes, Windows Failover Clusters, NPS and RADIUS, domain registration expiry, and eight more SQL Server checks.

The hardening pass continues. One request can no longer cost the agent without bound โ€” command nesting, check_multi fan-out, regular-expression matching and log-file reads all have limits now. The shared default password is stored hashed, nscp web install sets up HTTPS on its own, a module can only be named by a file name, the Linux service runs sandboxed under its own group, every DLL the Windows installer ships is signed, and a failing background thread can no longer take the whole agent down. Several of these have an upgrade note worth reading โ€” NSCAServer users in particular.

โœจ Highlights

  • ๐Ÿท๏ธ Host facts: an opt-in inventory of the host. os, hardware, network.interfaces, storage.volumes, software.installed, services.installed, tasks.scheduled, agent, docker, mysql, mssql and hyperv.vms sets, each produced by the module that already checks it and each off until enabled. CheckSystem also publishes three new selector tags โ€” os_family, arch and virtualization โ€” that mean the same thing on every platform. (#1559, #1583, #1589, #1594)
  • ๐Ÿ“ค Facts over REST, in the web UI and on the fleet server. GET /api/v2/facts and POST /api/v2/facts/commands/refresh sit behind the new facts.get and facts.refresh grants, which only the full role carries. An enrolled agent uploads its document only when the server’s hash differs. (#1559, #1590)
  • ๐ŸŽ NSClient++ on macOS. An experimental, self-contained Apple silicon .pkg and .tar.gz, running as a launchd daemon. CheckSystem carries all 21 of its Linux commands on macOS, with check_service checking launchd jobs. The package is not signed or notarized yet. (#1578, #1593)
  • ๐Ÿงช New experimental modules: CheckActiveDirectory, CheckHyperV and CheckKubernetes. AD replication, the machine secure channel and a real Kerberos probe of each KDC; Hyper-V host capacity, hypervisor CPU and per-VM health; and a Kubernetes cluster’s API, pods, nodes and workloads, read over HTTPS with a service-account token and no kubectl. (#1601, #1586, #1587)
  • ๐ŸชŸ More Windows server checks. Failover Cluster groups, resources, nodes and networks that follow a role across nodes; NPS authentication, accounting and counters; and eight new SQL Server checks โ€” availability groups, blocking, counters, integrity, sessions, tempdb, transactions and waits. (#1600, #1598, #1398)
  • ๐ŸŒ check_domain and check_radius in CheckNet. Domain registration expiry over RDAP with an optional WHOIS fallback, and an authenticated RADIUS probe that validates the response authenticator and reads its credentials from a protected file. (#1599, #1598)
  • ๐Ÿ›ก๏ธ Bounded work per request. A deeply nested check_multi could exhaust a thread’s stack, a backtracking regular expression could pin a worker for minutes, and check_logfile could read a whole multi-gigabyte file into memory โ€” each reachable by any caller allowed to pass arguments. Nesting stops at 16 levels, check_multi at 128 commands, regex matching at 30 s per check, and check_logfile reads at most max-size (64 MiB) per call. (#1554)
  • ๐Ÿ”’ The shared default password is stored hashed, and NSCAServer no longer inherits it. NSCAClient โ€” how almost everyone uses NSCA โ€” is unaffected, but a host that receives NSCA through NSCAServer with the key in /settings/default must move the key before upgrading. A new nscp nsca install sets either side. (#1567)
  • ๐Ÿ” Hardening across the agent. nscp web install serves HTTPS and generates its certificate; a [/modules] entry must be a file name; settings are never migrated to a remote store; credential-looking keys are redacted even for unloaded modules; the Linux unit is sandboxed under Group=nsclient; every shipped Windows DLL is Authenticode-signed; and a worker thread that throws is contained and logged instead of ending the process. (#1553, #1577, #1582, #1584)

๐Ÿ” Detailed changes

๐Ÿท๏ธ Host facts

A tag selects a group of hosts; a fact describes one. The agent has published a handful of tags for a while (os_name, os_version, a tag per running service), but it knew a good deal more about the machine โ€” every value below is read by one of its checks โ€” and published none of it. So nothing could tell a 64-core Linux VM from a laptop without running a check against the host.

Facts are an inventory the core keeps: each producing module contributes fact sets, the core assembles them into one document, and the document is re-read on a schedule, on a settings reload, or on demand. Every set is off by default โ€” an inventory is data an operator did not necessarily agree to ship โ€” and is turned on in the module that produces it:

[/settings/system/windows/facts]   ; [/settings/system/unix/facts] on Linux and macOS
os = true
hardware = true
network.interfaces = true
software.installed = true
services.installed = true

[/settings/disk/facts]
storage.volumes = true

[/settings/facts]
agent = true
Set Produced by Describes
os CheckSystem family, name, version, arch, virtualization, domain
hardware CheckSystem manufacturer, model, CPU cores, memory
network.interfaces CheckSystem per interface: MAC, status, speed, addresses
software.installed CheckSystem per program: version, publisher, architecture, source, install date, size
services.installed CheckSystem Windows services or systemd units, stopped and disabled included, with their startup type
storage.volumes CheckDisk per volume: device, filesystem, type, label, size
tasks.scheduled CheckTaskSched every scheduled task, hidden and disabled included
docker, docker.containers, docker.images CheckDocker the daemon, its containers and images
mysql, mysql.databases CheckMySQL the server and its databases
mssql, mssql.databases CheckMSSQL the instance and its databases
hyperv.vms CheckHyperV per VM: GUID, generation, configured processors and memory, checkpoints, replica role
agent the core version, loaded modules, whether it is enrolled

A few rules hold across all of them. A record’s id is the name the matching check already uses for that instance โ€” a storage.volumes id is what check_drivesize calls drive. A field that could not be determined is omitted, never written empty, so an absent key means unknown. The sets describe the host, not how busy it is: no free space, traffic, container state, uptime or connection counts, which change every round and belong to the checks. No set carries a login, a password or a command line. A list stops at 2500 records and says so under errors, and a set that cannot be read keeps its last good value and reports why. Sets that talk to a service (Docker, the databases, Hyper-V, services and tasks) are never read on the startup round, so a daemon that does not answer cannot hold up the service start.

CheckSystem also publishes three new tags at start โ€” os_family, arch and virtualization โ€” with one vocabulary on every platform (Windows’ AMD64 is published as x86_64), so one fleet selector covers a mixed fleet. virtualization reads none on a Windows host that runs Hyper-V, WSL2 or virtualization-based security itself: what the firmware says outranks the hypervisor bit.

Reading them. nscp test gains facts and facts refresh. The web UI gains a Facts page that shows the document and turns a set on through the settings API. Over REST, GET /api/v2/facts returns the document (or one subtree with ?path=os) and POST /api/v2/facts/commands/refresh collects a round now. Both need new grants, facts.get and facts.refresh, which only the built-in full role carries; add facts.get to a role that should read the inventory. See Host Facts. (#1559, #1583, #1589, #1594)

๐Ÿ“ค Fleet โ€” facts leave the host only when the server lacks them

An enrolled agent now reports the SHA-256 of its facts document on every desired-state poll and state report, and uploads the document itself to POST /agent/v1/facts only when the server’s X-Facts-Hash answer differs. A server that never sends that header is never sent the document. Uploads back off from one minute to an hour on rejection, honour Retry-After, and are held for a day after a 413, with the log naming the largest sets. With no set enabled, only the hash of the empty document goes out. To keep a set on the host but off the server, turn it off or do not enroll the host. (#1590)

The fleet trust model is tightened too: a renewal can no longer rotate the bundle signing key unless the new key is signed by the old one, and the fleet guide now states plainly that a fleet server is an administrator of every host enrolled with it.

๐ŸŽ macOS

Releases now carry NSCP-<version>-macos-arm64.pkg and a matching .tar.gz. Both bundle their libraries, so the target Mac needs no Homebrew. The .pkg installs under /usr/local, creates a hidden _nsclient account and registers a launchd daemon:

sudo installer -pkg NSCP-<version>-macos-arm64.pkg -target /
sudo launchctl print system/com.nsclient.nscp          # status
sudo launchctl kickstart -k system/com.nsclient.nscp   # restart
sudo /usr/local/sbin/uninstall-nsclient --purge        # remove

It is experimental in the sense a young check is: it works, but the layout, account and launchd job may still change. It is Apple silicon only, and not signed or notarized โ€” install from a terminal, or clear the quarantine flag first. CheckDisk and CheckLogFile are not in the macOS build yet.

CheckSystem runs on macOS with the same commands, keywords and settings section (/settings/system/unix) as on Linux, reading sysctl, Mach, libproc, IOKit and launchctl instead of procfs. A value macOS does not have is reported as absent โ€” the keyword renders unknown and emits no perfdata โ€” or the check returns UNKNOWN, never an unmeasured zero. check_service checks launchd jobs by label, check_installed_software lists receipts, app bundles and Homebrew kegs, and check_os_updates gains live=true to ask Apple’s update server. (#1578, #1593)

๐Ÿงช New modules

Module Commands What it covers
CheckActiveDirectory (Windows) check_ad_replication, check_secure_channel, check_kdc Inbound replication links on a DC; the machine secure channel via netlogon; a real Kerberos AS-REQ to each KDC, so a KDC that accepts connections but issues no tickets is caught
CheckHyperV (Windows) check_hyperv_host, check_hyperv_cpu, check_hyperv_vms VM health summary and hypervisor capacity; logical processor load the ordinary CPU counters cannot see on a host; per-VM state, heartbeat, memory, checkpoints and Replica status
CheckKubernetes check_kubernetes, check_pods, check_nodes, check_workloads API readiness and node counts; the kubectl get pods STATUS column; node pressure and cordons; desired versus available replicas

All three are off by default and marked experimental: their options, keywords and output may still change. CheckKubernetes is configured once under [/settings/kubernetes] (an API server and token, a JSON kubeconfig, or nothing when running in-cluster); no check takes a url= or token=, so a REST caller cannot redirect the token elsewhere. Building it from source needs Boost 1.77 or later. See the Active Directory and Kubernetes scenarios. (#1601, #1586, #1587)

๐ŸชŸ Windows server checks

Failover Clusters. CheckWindowsApps gains check_cluster_groups, check_cluster_resources, check_cluster_nodes and check_cluster_networks. They read the local cluster through ClusAPI โ€” no PowerShell or WMI โ€” include objects owned by other nodes, and never move or restart anything. A clustered role is followed when it moves; an ownership change alone stays OK. A missing cluster, an access error or a partial read is UNKNOWN, never an empty OK. An offline or failed group is CRITICAL by default, so a role that is offline on purpose alerts until you filter it out (name=SQL selects the ones you expect). ClusAPI is loaded on demand, so a host without clustering is unaffected. (#1600)

NPS. check_nps_auth, check_nps_accounting and check_nps_counters cover a Network Policy Server’s authentication outcomes, accounting and performance counters. (#1598)

SQL Server. CheckMSSQL gains eight checks, all on the module’s existing connection settings:

Command Watches Rights
check_mssql_sessions session and connection counts per database and login VIEW SERVER STATE
check_mssql_blocking blocked sessions and blocking chains VIEW SERVER STATE
check_mssql_transactions old or leaked open transactions, long-running requests VIEW SERVER STATE
check_mssql_counters buffer cache, page life expectancy, batch and lock rates VIEW SERVER STATE
check_mssql_waits wait statistics by category, scheduler pressure VIEW SERVER STATE
check_mssql_tempdb tempdb space by consumer, volume headroom VIEW SERVER STATE
check_mssql_availability_groups Always On replica and database health VIEW SERVER STATE
check_mssql_integrity suspect pages, age of the last successful CHECKDB (never runs it) SELECT on msdb.dbo.suspect_pages; sysadmin for checkdb_age

A missing permission degrades a keyword to a sentinel or returns UNKNOWN rather than raising an alert. check_mssql_databases gains data_headroom and log_headroom โ€” how far a database can grow before it hits a file’s max_size or fills the volume it grows into, with files on one volume sharing its free space:

check_mssql_databases "critical=data_headroom < 1G and data_headroom >= 0"

And one fix for every check: an integer keyword compared against a size is no longer routed through a floating-point number, so values above 2^53 bytes compare exactly. (#1398)

CheckWindowsApps and CheckMSSQL are experimental modules, so all of the above may still change in options, keywords and output.

๐ŸŒ CheckNet โ€” domain expiry and RADIUS

check_domain watches a domain’s registration expiry the way check_certificate watches a certificate’s, warning below 30 days and critical below 10 by default. It queries RDAP over verified HTTPS, prefers the registrar’s date over the registry’s, and can fall back to an explicitly named WHOIS server:

nscp client --module CheckNet --boot --query check_domain domain=example.com

It makes a live request on every run, so schedule it daily from one place per domain. The default endpoint is the public https://rdap.org redirector, which means the domain you check is sent to a third party; rdap-url= names a provider of your choice. WHOIS is unencrypted and the fallback also applies after a TLS failure, so enable it only with a server you trust.

check_radius sends a PAP authentication, an expected rejection, or (when enabled) a Status-Server probe, validates both response authenticators, and reads its shared secret and credentials from files that must be protected. Both commands are experimental. (#1599, #1598)

๐Ÿ›ก๏ธ Resource limits on one request

Three costs were unbounded, each reachable from one request by a caller that may pass arguments to a check โ€” an NRPE peer with allow arguments = true, or a REST caller with queries.execute.

Limit Value Past it
Command nesting depth 16 The query is refused with a structured error. check_multi, check_and_forward and check_timeout re-enter the core on the same thread, and a few thousand levels exhausted the stack โ€” not a catchable failure on Windows.
check_multi commands per call 128 UNKNOWN, naming the count.
Regular-expression matching 30 s per check, 1 MiB per subject Further matches are refused and the check returns UNKNOWN rather than quietly under-matching. A catastrophic-backtracking pattern no longer pins a worker for the length of an event log, and its failure is no longer misreported as “invalid syntax”.

Compiled patterns are now cached, so ordinary filters get faster. check_logfile gains max-size (default 64m): with a bookmark it paces the read and nothing is lost; without one a larger file is UNKNOWN rather than silently half-read โ€” add bookmark=auto, max-lines, or raise max-size. (#1554)

๐Ÿ”’ The shared default password, and NSCA’s own key

nscp web install and nscp web password --set now store /settings/default/password as a pbkdf2-sha256$โ€ฆ hash, and the Windows installer hashes a password it is given. The web UI and check_nt verify against either form, so a clear-text value you wrote by hand keeps working; nscp web password --set <the same value> hashes it in place. --display cannot show a hashed password any more.

NSCA does not verify a password โ€” it encrypts with it โ€” so it could never use a hash. NSCAServer, the listener that receives NSCA, therefore no longer reads the shared section, and refuses to start with encryption on and no key. Only a start refuses: nscp settings, nscp client --module NSCAServer and the documentation build still load the module without its listener, so the section can be listed and fixed in place. NSCAClient, which submits to an NSCA daemon, always had its key on the client target and is unaffected. A new command sets either side:

nscp nsca install --host <nsca-server> --password <key> --encryption aes256   # submit
nscp nsca install --server --password <key>                                   # receive

The Windows installer takes the same values as NSCA_SERVER, NSCA_PORT, NSCA_PASSWORD, NSCA_ENCRYPTION and NSCA_HOSTNAME. (#1567)

๐Ÿ›ก๏ธ Hardening

  • nscp web install serves HTTPS by default and generates a self-signed certificate when none exists, instead of blanking the certificate and leaving a web server that refused to start. On Linux a generated certificate is handed to the service account. --insecure asks for plain HTTP on port 8080. (#1584)
  • A module is named by a file name. A [/modules] entry or Control.LOAD that is a path โ€” absolute, or walking out with .. โ€” is refused; naming a module was also naming any file on the host. The ./modules fallback resolves against ${exe-path}. (#1553)
  • Settings are never migrated to an http(s):// store, which would send every credential in the configuration to whatever the URL names. Importing from one is unchanged. (#1553)
  • Credential-looking keys are redacted whether or not their module is loaded. GET /api/v2/settings and nscp settings --list used to print a password left behind for a disabled module in clear. (#1553)
  • The Linux systemd unit is sandboxed (UMask=0027, ProtectKernel*, ProtectControlGroups, RestrictSUIDSGID, RestrictRealtime, LockPersonality) and runs under Group=nsclient, which closes a disclosure on Debian/Ubuntu where runtime files were readable by nogroup. ProtectSystem, ProtectHome, PrivateTmp and NoNewPrivileges are deliberately left out because they change what disk and mount checks report, or break sudo in scripts; the unit explains why. The DEB no longer depends on sudo, and CauseCrashes is no longer shipped. (#1553)
  • A worker thread that throws is contained. Every background thread now starts with a guard, so an exception that escapes it is logged as Thread '<name>': terminated by an uncaught exception: โ€ฆ instead of calling std::terminate() on the whole agent. No crash of this kind has been reported โ€” most bodies already caught โ€” but the guard is now structural rather than per-site. nsclient.fatal lands next to nsclient.log. (#1577)

๐Ÿ“ฆ Packaging and supply chain

Every DLL the Windows installer ships โ€” modules, NSClient++ libraries and bundled third-party libraries โ€” is now Authenticode-signed like nscp.exe, so an AppLocker or App Control publisher rule covers them. Signing credentials are only available to the release build. Each Windows release publishes a CycloneDX 1.6 SBOM (NSCP-<version>-<platform>.cdx.json, and sbom.cdx.json plus SHA256SUMS inside the zip), every release asset is attested (gh attestation verify <file> --repo mickem/nscp), and every third-party download the build makes is checked against a recorded digest or commit before use. (#1581, #1582)

๐Ÿ› Bug fixes

  • Perfdata no longer reports a missing threshold as 0. 'time'=2ms;1000;0 read as “critical above 0” in PNP4Nagios, Grafana and Icinga; an unbounded field is now left empty ('time'=2ms;1000).
  • check_cpu answers from the samples it has. For the first minutes after a start or a settings reload, a 5m window averaged real samples with empty slots, so a saturated host read as idle. Before the very first sample it now answers UNKNOWN; on Linux check_memory and check_pagefile do the same.
  • Per-core CPU numbers are right on hosts with more than ten cores. Core 10 and up were reported under the wrong numbers in check_cpu, the real-time filters and the per-core metrics.
  • A settings reload no longer piles things up. LUAScript and DotnetPlugins unload the previous generation instead of leaking it and registering every command again; CheckHelpers drops removed aliases; SimpleFileWriter stops appending its syntax once per reload; and CheckMKClient/CheckMKServer release their previous Lua scripts. (#1565)
  • A reload requested from inside a check is applied after the check returns. A Lua check served over NRPE that reloaded the service restarted the NRPE listener from one of its own threads, and check_nrpe timed out from then on. The reload is now handed to the scheduler.

โš ๏ธ Upgrade notes

  • ๐Ÿ”’ If you run NSCAServer (the NSCA listener) and its key came from /settings/default/password, set it under [/settings/NSCA/server] before upgrading, or with nscp nsca install --server --password <key>. Otherwise the module refuses to start. NSCAClient is unaffected.
  • A check_logfile that reads a file over 64 MiB without a bookmark now returns UNKNOWN. Add bookmark=auto, max-lines, or raise max-size. A check_multi running more than 128 commands must be split.
  • nscp web password --display cannot show a hashed password. Tooling that read the shared password back out of nsclient.ini now sees a pbkdf2-sha256$โ€ฆ string.
  • A [/modules] entry that is a path rather than a file name is refused. Move the module into the module folder and name it.
  • Settings dumps show *** for every key whose name reads as a credential, including those of modules that are not loaded.
  • On Linux, external scripts inherit the service’s UMask=0027. A script that writes a file for another account to read should set the mode itself. If you created the service account by hand, make sure an nsclient group exists. If a script escalates with sudo, keep the package installed โ€” the DEB no longer pulls it in.
  • If you alert on the agent process disappearing, a dying worker thread no longer ends the process. Alert on the log line Thread '<name>': terminated by an uncaught exception instead.
  • A fleet renewal can no longer rotate the signing key unendorsed. A host whose server rotated its key without signing the new one with the old must be re-enrolled.
  • Enabled fact sets on an enrolled host now reach the fleet server. Nothing is sent while no set is enabled, which is the default.
  • Give facts.get to any non-admin web role that should read the inventory; only the full role carries it.
  • If you parse the warn/crit fields of perfdata yourself, treat an empty field as “no threshold” rather than expecting 0.
  • A script that calls core.reload(...) from inside a check and reads its settings straight after should read them a moment later: the reload now applies after the check returns.
  • A custom check_mk Lua script with an unload hook now sees it run on every settings reload, not only at shutdown.

Security notices for this release are on the security notices page, and the full list of behaviour changes is on the upgrading page.

Download

You can download the new version from GitHub

// Michael Medin

0.23.0 Paths that land where you meant them, more enforced TLS verification, and logins that survive a restart

0.23.0 is a short release with two themes, and both are about a setting that looked right and did something else.

The first is paths. Expanding a path substituted ${tokens} and never made anything absolute, so a bare relative name was measured against the process’s working directory โ€” C:\Windows\System32 for a Windows service, / under a bare init script, the shell’s directory for nscp test. An unrecognised token was not an error either: ${scripst}/check.bat quietly became a real path under the installation folder, and whatever depended on it went somewhere nobody was looking. A relative value in a setting that writes files now lands in the folder that setting owns, an unknown token is reported and the setting skipped, file name = none really switches the log off, and on Windows a relative external-script command is found from where it is rather than from where nscp was started.

The second is TLS verification, in the three places where it was configured but not happening. A listener verify mode parser accepted five spellings and silently dropped everything else โ€” including fail-if-no-peer-cert, the spelling the documentation tells you to write โ€” so a carefully configured mutual-TLS listener was really a listener with an IP filter. The NSCP and check_mk clients, and check_nsclient_web_online, encrypted their connections and never authenticated the peer. And a fleet mtls_url that was not https:// ran the whole management channel โ€” desired state, signed bundles, certificate renewal โ€” on a plain socket, with the client certificate and the pinned CA doing nothing. All three now fail closed, which means three of this release’s notes need reading before you upgrade.

Then the smaller things: you stay logged in to the web UI across a restart, session tokens are only ever held as hashes, a multi-adapter Windows host stops publishing every NIC’s metrics twice, and non-ASCII text in the UI and the reference docs is no longer mojibake.

โœจ Highlights

  • ๐Ÿ”’ A listener verify mode it does not recognise now refuses to start. verify mode = peer,fail-if-no-peer-cert resolved to bare peer: the listener asked for a client certificate and completed the handshake when none arrived. Both spellings are accepted now, along with certificate and client-certificate, and any other token makes the listener log it and stop instead of starting with whatever survived the typo. Check every listener you have configured for mutual TLS before upgrading. (#1555)
  • ๐Ÿ”‘ The NSCP and check_mk clients, and check_nsclient_web_online, verify the server certificate by default. All three encrypted the connection and authenticated nothing, while sending the remote agent’s password over it. verify mode / verify now defaults to peer and ca to the agent’s own trust bundle; a target pointed at an agent still using its self-signed certificate needs ca = <that certificate> and verify mode = peer-cert. (#1568)
  • ๐Ÿ›ฐ๏ธ A fleet management url that is not https:// is refused, and enrollment no longer follows a symlink planted by the service account. The mtls_url carries configuration and signed bundles, which is remote code execution by design; on a plain socket neither the agent’s client certificate nor the pinned server certificate did anything. nscp enroll --insecure records the decision where plaintext is genuinely wanted. (#1555)
  • ๐Ÿ—‚๏ธ A relative path in a setting that writes files is rooted at the folder that setting owns. The log file lands in ${log-path}, an attachment in ${shared-path}, a crash archive in ${crash-folder}, a fleet managed path in ${fleet-folder}, a filewriter log in ${log-path} โ€” instead of in whatever the service’s working directory happened to be. (#1560)
  • ๐Ÿšซ An unknown ${...} path token is an error, and a [paths] override has to name a location of its own. A mistyped token used to resolve to the installation directory; now the setting that carried it is skipped and the log says which token and which setting. file name = none switches the log off on Windows too, where it used to create a file called C:\Program Files\NSClient++none. (#1560)
  • ๐ŸชŸ A relative external-script command is found from where it is, not from where nscp started. check_foo = scripts\check_foo.bat worked or failed depending on how it was spelled: an argv-safe spelling resolved against the service’s working directory and failed with “the system cannot find the path specified”. It is rooted at the installation directory now, both ways. (#1560)
  • ๐Ÿ” You stay logged in to the web UI across a restart, and a session token is only ever held as a hash. Restarting or upgrading the agent no longer logs every web user out; only the SHA-256 of each key is kept, in memory and on disk, and a logout removes it immediately. persist sessions = false brings back the old behaviour. (#1549, #1573)
  • ๐Ÿ“ฅ ext-scr, py and lua add --import work on a fresh install and record a path that resolves. The destination folder is created, the recorded value resolves on both platforms, and an import with no --script is refused instead of overwriting the script folder with a file. The Web UI’s script upload goes through the same path. (#1560, #1557)
  • ๐Ÿ” Remote [/includes] and [/attachments] refresh on their own. An agent configured from an http(s):// settings url re-read only the top-level file on each maintenance pass, so an included file stayed pinned to whatever it held at start. Both are fetched every pass now, and a change in either triggers the same reload. (#1560)
  • ๐Ÿ›ก๏ธ The op5 installer profile defaults to secure NRPE, and the Windows release build verifies what it downloads. The op5 page used to force legacy mode, hide the radio group so the choice could not be seen, and enable allow nasty characters; the dependency checksum file added last release had every line reading unrecorded. (#1555)

๐Ÿ” Detailed changes

๐Ÿ—‚๏ธ Paths โ€” resolved against something that does not move

Expanding a path substituted ${tokens}; it never made anything absolute. A value with neither a token nor a leading / was therefore resolved against whatever the service’s working directory happened to be โ€” four different answers from the same configuration file, depending on how the agent was started.

A relative value lands in the folder its consumer owns.

Setting Relative values now land in
[/attachments] target ${shared-path}
[/settings/log] file name ${log-path}
[/settings/crash] archive folder ${crash-folder}
[/settings/fleet] managed path ${fleet-folder}
[/settings/filewriter] file ${log-path}

On unix this usually changes nothing, because the working directory and the package directory tended to agree. On Windows it moves a file that was landing in C:\Windows\System32 into the folder it should always have been in.

An unknown token is reported and the setting skipped. The tokens stay open ended โ€” anything defined in boot.ini’s [paths] section counts as known โ€” but ${scripst}/check.bat is now an error in the log rather than a real path under the install folder that nobody is watching. ${appdata} and ${common-appdata} are Windows-only and are rejected on unix, where they previously resolved to the installation directory.

A [paths] or --path-override entry that does not resolve to a location of its own is ignored, with an error naming it, and the built-in default applies. An override may still be written in terms of other tokens (scripts = ${shared-path}/mine); it is the resolved value that is judged. “A location of its own” is slightly wider than “absolute”: a drive-relative C:mine and a root-relative \mine are accepted on Windows, because the operator plainly named a drive or a root.

none is a sentinel the path expander knows. [/settings/log] file name = none is documented as “no log file”, but the name was joined to the installation directory before the sentinel was tested โ€” so on Windows it produced a real file called C:\Program Files\NSClient++none and file logging stayed on. It is recognised by the expander itself now, so it is equally safe in every setting that accepts it, including every ca option where it means “use the TLS library’s own trust store”. (#1560)

๐ŸชŸ Windows: external scripts, found from where they are

[/settings/external scripts/scripts] entries that carry a folder โ€” the conventional check_foo = scripts\check_foo.bat, and what nscp ext-scr add --import writes โ€” are rooted at ${base-path} before they are launched.

The old behaviour was easy to miss because it depended on how the command happened to be spelled. A single backslash is not tokenisable as an argument vector, so it fell back to the legacy single-string launcher, where the lookup already honoured the installation directory and the command worked. A command that was argv-safe โ€” a doubled backslash, a forward slash, a quoted path โ€” ran with argv isolation, where the executable is named separately and was resolved against the working directory, and it failed for the service with “the system cannot find the path specified”.

Absolute paths, UNC paths, drive-relative C:check.exe and root-relative \tools\check.exe are all still used exactly as written. (#1560)

๐Ÿ“ฅ Script folders and imports

Both ext-scr CLIs derived their folder by appending a literal scripts segment to a root rather than naming ${scripts}, the token that already means that folder:

Looked in / imported into (before) Now
nscp lua list/show/add/delete ${base-path}/scripts/lua โ€” right on Windows, /usr/sbin/scripts/lua on Linux ${scripts}/lua
nscp py list/show/add/delete ${scripts}/scripts/python โ€” a folder nothing creates ${scripts}/python

add --import also records a different value: python/<name> and lua/<name> relative to ${scripts}, instead of the scripts\python\<name> spelling that only resolved on Windows.

Three things were wrong with importing a script, each silent in its own way. copy_file never created the destination folder, so a fresh install died with a bare No such file or directory; ext-scr recorded a Windows spelling of a path it never resolves, so the imported command exited 127 on Linux; and add --import with no --script collapsed the destination onto the script folder itself and overwrote it with a file. The folder is created, the recorded path is absolute on Linux, and the missing option is named. The Web UI’s script upload goes through the same add --import and failed the same way.

The Windows installer creates scripts\custom\ again, and always. It is not part of the Scripts (SampleScripts) feature, so REMOVE=SampleScripts no longer leaves an installation with no scripts\ directory at all โ€” which previously meant an [/attachments] entry, or anything else writing a script, had nowhere to land. (#1560, #1557)

๐Ÿ” Remote includes and attachments

An agent configured from an http(s):// settings url re-downloads its whole configuration every settings maintenance interval (default 5m). Until now that pass stopped at the top-level file: a file pulled in by [/includes], and every [/attachments] target, was only re-fetched when the top-level file itself happened to change. On a server where nsclient.ini is the stable part and the included file is the one that moves, the include stayed pinned to whatever it held when the agent started.

Both are fetched on every pass now, and a change in either triggers the same reload a change in the top-level file does. Two things to be aware of: the settings server sees one request per included file and per attachment on every interval (responses are hash-compared, so an unchanged file costs only the request), and a change made only in an included file now takes effect within one interval instead of requiring a restart. (#1560)

๐Ÿ”’ TLS verification that was configured but not happening

Listeners. The verify mode parser accepted five spellings and silently ignored everything else. fail-if-no-peer-cert was not one of the five โ€” but it is what the permissions guide, the client identity source help text, OpenSSL itself, the NRPE scenario walkthrough and the reference docs all tell you to write. So verify mode = peer,fail-if-no-peer-cert resolved to bare verify_peer: the listener asked the client for a certificate and completed the handshake when none arrived. An operator whose configuration looked exactly like the documentation was running an NRPE listener authenticated by the allowed hosts IP list alone, and any typo degraded the same way, always in the direction of accepting more.

The parser now takes the same vocabulary as the outbound client parser โ€” peer or certificate, fail-if-no-cert or fail-if-no-peer-cert or client-certificate, plus peer-cert, client-once, none, and the context options workarounds and single โ€” and ignores whitespace around a token. Anything else is rejected: the listener logs the offending token and does not start.

Outbound clients. NSCPClient defaulted verify mode to none, CheckMKClient left it unset (an empty verify mode parses the same as none), and check_nsclient_web_online defaulted verify to none. All three sent the remote agent’s password over a connection whose peer was never authenticated. verify mode / verify defaults to peer now and ca to ${ca-path} โ€” the auto-generated ROOT store export on Windows, the distribution bundle elsewhere.

Because an agent generates a self-signed certificate on first start, a relay or REST check pointed at a default agent will now fail the handshake where it used to connect:

Situation Configuration
The remote agent uses a certificate from your own CA ca = <the CA> (the default verify mode = peer then works)
The remote agent still uses its self-signed certificate ca = <that certificate> and verify mode = peer-cert
You accept an unauthenticated link verify mode = none (encrypted, but an on-path attacker can impersonate the remote)

Fleet. The enrollment response names mtls_url, the base for the desired-state poll, the bundle download and the certificate renewal. The fail-closed guard that refuses mTLS without server authentication only existed on the TLS path, so a response carrying http://โ€ฆ โ€” or a url with no scheme, which the http client also opens on a plain socket โ€” built a plain TCP client, ignored the certificate and the pin, and ran the whole management channel unauthenticated with nothing in the log to say so. Enrollment refuses a non-https management url, the sync loop refuses to start on a stored one, and the http client refuses to attach a client certificate or a pinned CA to a non-TLS transport at all. nscp enroll --insecure and [tls] allow plaintext = true record the decision; the sync then logs INSECURE on every start.

Enrollment’s two pre-adopt_owner writes also followed symlinks. The manifest temporary and the fleet.ini placeholder were created with a plain open and a plain ofstream in a directory the unprivileged service account owns, so that account could pre-create either name as a link and have the next sudo nscp enroll truncate the target as root. Both now open the containing directory O_NOFOLLOW|O_DIRECTORY and create through that descriptor with O_CREAT|O_EXCL|O_NOFOLLOW.

The op5 installer profile. Picking op5 on the MSI’s monitoring-tool page used to force NRPE into legacy mode โ€” anonymous Diffie-Hellman, no peer verification โ€” hide the mode radio group so the choice could not be seen or changed, and enable allow nasty characters for every NRPE-reachable check. It now defaults to the same secure mode the generic profile uses, shows the radio group so legacy is a visible decision, and does not set allow nasty characters. allow arguments stays on, because op5’s check commands need it. (#1555, #1568)

๐Ÿ” Web sessions

Restarting the service, or upgrading it, no longer logs every web user out: a browser tab, and a script holding a key from /api/v2/login, keeps working. Sessions are kept in ${data-path}/nsclient.db and restored at the next start, still expiring eight hours after login.

Only the SHA-256 of each session key is stored, in memory and on disk, so a copy of the database โ€” or a dump of the process โ€” does not yield a usable token. A session is only restored while the user’s password and role are unchanged, and logging out removes it from the file straight away; it stops working immediately and does not come back, not even if the agent is killed rather than stopped cleanly.

Changing a user’s password or role also ends that user’s sessions, and removing the user ends theirs โ€” but only from the next start of the agent, because the running service keeps the users it read when it started.

persist sessions = false under [/settings/WEB/server] keeps sessions in memory only, as before. It is also the way to invalidate every session at once after a suspected leak: restart once with it off. (#1549, #1573)

๐Ÿ› Bug fixes

  • A Windows host stops publishing every network adapter’s metrics twice. check_network’s two source maps both hold every adapter Win32_NetworkAdapter knows about, and fetchMetrics handed both copies to the bundle under the same key. The JSON views kept whichever came first and dropped the other silently; the OpenMetrics renderer refused the duplicate series and logged one error per field per snapshot โ€” on a five-adapter host, 70 error lines on every metrics tick. (#1575)
  • Non-ASCII text is no longer mangled into mojibake. UTF-8 read as cp1252 and re-encoded as UTF-8 stays valid UTF-8, so nothing downstream complained: the module-glue generators read module.json with a bare open(), so an em dash in a command description was doubled by a Windows builder and carried into the registry, the REST API, nscp test desc and the extracted reference docs. Eight user-visible strings are repaired. (#1576)
  • WinGet publishing works again. The manifests were bumped to schema 1.12.0 for 0.21.0, which the in-box winget on the runner does not ship, so validation failed on a schema header mismatch and both releases went unsubmitted. The header and ManifestVersion are back to 1.9.0, and the publish step reads the exit code instead of dying on the warning-only result. (#1572)
  • The Windows release build verifies what it downloads. The checksum gate added last release was in place but every line in .github/dependency-checksums.txt read unrecorded, so each download warned and continued. Digests are recorded for OpenSSL, protobuf, Crypto++, miniz and the prebuilt check_nsclient.exe; TinyXML2, Mongoose and MariaDB Connector/C are cloned and verified against a recorded commit rather than fetched as GitHub-generated tag archives. Bumping a dependency now means adding its line first, because a missing line fails the build. (#1555)

โš ๏ธ Upgrade notes

  • Check the verify mode of every listener configured for mutual TLS before upgrading. A token this release does not recognise makes the listener log it and refuse to start โ€” which is the point, but it is a restart away. If you believed a listener was requiring client certificates, verify it now: until this release, fail-if-no-peer-cert was dropped and the handshake completed without one.
  • An NSCP or CheckMK client target, or a check_nsclient_web_online check, pointed at an agent with its self-signed certificate will now fail the handshake. Set ca = <that certificate> with verify mode = peer-cert, point ca at your own CA, or accept an unauthenticated link explicitly with verify mode = none.
  • A fleet host enrolled against a plaintext mtls_url stops syncing. Re-enroll against https://, or record the decision with nscp enroll --insecure / [tls] allow plaintext = true in boot.ini.
  • An op5 host monitored by a check_nrpe with no client certificate needs one, or Insecure mode picked explicitly on the installer’s monitoring-tool page. The profile no longer forces legacy NRPE, and no longer sets allow nasty characters.
  • A bare relative path in a setting that writes files moves โ€” on unix usually not at all, on Windows usually into the folder it should always have been in. Nothing to do if your paths are absolute or written with ${...} tokens.
  • An unrecognised ${...} token, and a [paths] override that does not resolve to a location of its own, are now errors that skip the setting instead of quietly resolving to the installation directory. ${appdata} and ${common-appdata} are rejected on unix.
  • If [/settings/log] file name = none was set on Windows, a stray file called C:\Program Files\NSClient++none is left where it is โ€” delete it once you have checked you do not need its contents.
  • A relative external-script command that relied on the working directory no longer resolves. Name the script with an absolute path, or with ${scripts}\<name>. An absolute, UNC, drive-relative or root-relative command is unaffected.
  • nscp lua and nscp py look in a different folder, and record a different value on import. Existing configuration entries keep working and loading scripts from nsclient.ini is unchanged.
  • If you relied on a restart to log every web user out, set persist sessions = false under [/settings/WEB/server].
  • A settings server now sees one request per included file and per attachment on every maintenance interval. Responses are hash-compared, so an unchanged file costs only the request โ€” but size the interval accordingly if you serve a large attachment to a large fleet.

Security notices for this release are on the security notices page, and the full list of behaviour changes is on the upgrading page.

Download

You can download the new version from GitHub

// Michael Medin

0.22.0 Metrics a scraper can actually read, Mod-Gearman without an open port, and a much smaller install

0.22.0 rebuilds the metrics side of the agent. /api/v2/openmetrics served the JSON keys verbatim โ€” names with dots, spaces and colons in them, no types, no help text, six significant digits โ€” which a strict parser rejected outright. It now serves a conformant, self-describing OpenMetrics document: every family named to the grammar, typed, described, carrying its unit, and per-instance readings collapsed into one family with a core, nic or drive label instead of one family per core. Every metric name changes, so read the upgrade note before you upgrade a scraped host.

The second theme is a new transport. GearmanClient makes the agent a Mod-Gearman worker: a Naemon or Nagios Core keeps scheduling its checks, the agent pulls them off a gearmand job server and answers them as native queries, and the monitored host needs no inbound port at all. The same module submits passive results back into the core’s result queue. It ships marked experimental and has not been exercised at scale: it is verified end to end against a real job server on both cores, but no one has yet run it across a large estate, so put it on a slice of your hosts before you move a whole Mod-Gearman installation onto it.

Then a long tail of security work โ€” the low-severity tier of the audit, in three parts, plus a second undefined-behaviour sweep and the ten worst threading bugs โ€” and a packaging release: common code moved out of every plugin into shared libraries, Windows ARM64 is back, and there is a Raspberry Pi package.

โœจ Highlights

  • ๐Ÿ“Š A conformant OpenMetrics exposition, and every metric name changes. Names follow the grammar (system.cpu.core 0.idle โ†’ system_cpu_idle_percent{core="0"}), every family carries # TYPE, # HELP and a # UNIT where the value is measured in something, counters are typed as counters, string readings come back as _info families, values keep their full precision and the body ends with # EOF. Per-core, per-NIC, per-drive and per-process readings become one family with a label, so sum by (core) has something to group on. The JSON endpoints, the dashboard, Graphite, collectd and Python submit_metrics report the same keys and values as before. openmetrics format = legacy reproduces the old body as a migration window. (#1533, #1535, #1538, #1539)
  • ๐Ÿ“ฅ New module: GearmanClient, a Mod-Gearman worker and result channel. Optional, off by default, and it speaks both flavours โ€” ConSol’s Mod-Gearman for Naemon and Nagios Enterprises’ Nagios-Mod-Gearman for Nagios Core 4.5+. mode = agent answers for the host it runs on; mode = proxy runs a whole hostgroup’s checks from one box. Windows and Linux. Experimental and not yet tested at scale โ€” try it on a few hosts first. (#1542)
  • ๐Ÿ”’ A settings source, include or attachment that is not https:// is refused. The remote store is the agent’s whole configuration, re-read at boot and on every housekeeping pass, and over plain http:// nothing authenticates the server. Opt back in per host with allow plaintext = true in boot.ini; every plaintext fetch is then logged as INSECURE. (#1529)
  • ๐Ÿ›ก๏ธ The audit’s low-severity tier lands, in three parts. A request may no longer weaken a credentialed target’s transport security or re-address submit_smtp mail; script arguments, check_docker’s endpoint and the remote-connection checks are confined; and the web server sends browser hardening headers, negotiates TLS 1.3 on Linux and stops minting a session token per request. (#1550, #1551, #1552)
  • ๐Ÿ”‘ check_tcp and check_ssh verify the server certificate by default. verify defaulted to none, so a TLS check handshook against any certificate at all and reported ok. It now defaults to peer with ca= falling back to the agent’s own trust bundle, and the checks gained certificate identity, SAN and STARTTLS-service keywords. (#1547)
  • ๐Ÿ” Agent-to-agent checking works, over the REST API, and the raw protobuf web API is gone. POST /query.pb let a caller write the header the core reads its identity from; its only consumer was NSCPClient, which had never actually worked. check_remote_nscp and friends now go through /api/v2/queries, authenticated. (#1552)
  • ๐Ÿงช New modules and check commands are marked experimental. A statement about stability, not about breakage: nscp test, the web UI, the REST API and the reference docs all say which checks may still change their options, keywords or output. (#1543)
  • ๐ŸŽจ The prompt and the web UI paint filter expressions. Both now read the check’s own vocabulary and colour a filter=, warning= or detail-syntax= as you type it โ€” a keyword the check does not offer is red before the check is ever run. A new GET /api/v2/queries/{query}/help is what the browser reads. (#1540, #1541)
  • โฑ๏ธ Reloads wait for the checks that are running. A settings reload holds new checks off a module while it applies the new configuration, a module can no longer unload or restart itself from inside a request it is serving, and connect and TLS handshake now count against a client’s configured timeout. (#1531)
  • ๐Ÿ“ฆ A fifth off the Linux install, and much more off Windows. Code every plugin compiled privately moved into shared libraries, and OpenSSL ships as DLLs instead of being linked into each of NRPE, NSCA, check_mk, the web server and the HTTP clients. (#1544, #1556)
  • ๐ŸชŸ Windows ARM64 is packaged again, and there is a Raspberry Pi package. NSCP-<version>-ARM64.msi/.zip are back (without PythonScript, and the ARM64 MSI does not bundle the VC runtime), and NSCP-<version>-debian-trixie-arm64.deb covers Raspberry Pi OS 64-bit and Debian 13 arm64. (#1546)

๐Ÿ” Detailed changes

๐Ÿ“Š OpenMetrics โ€” named, typed, described and labelled

The endpoint used to paste the JSON keys into the exposition verbatim. Names carried ., %, spaces and colons (system_mem_commited.avail, system_cpu_core 0.idle, disk_free_C:.total); there was no # TYPE and no # EOF; values were truncated to six significant digits, so 16 GB of memory scraped as 1.6554e+10; monotonic counts were typed as gauges, so rate() was unsafe on them; and string readings โ€” uptime, boot time, MAC address, power source โ€” were dropped entirely. A strict parser rejected the body, and the scenario page told you to repair the names with metric_relabel_configs.

Three things changed, and each of them renames families.

Names follow the grammar. % becomes the word percent, everything else outside [a-zA-Z0-9_] becomes _, runs collapse, and a name that would not start with a letter borrows a metric_ prefix.

JSON key Metric name
system.mem.physical.% system_mem_physical_percent
system.cpu.core 0.idle system_cpu_core_0_idle
disk.free.C:.total disk_free_C_total

Every metric carries a description, a type and a unit. # HELP on every built-in family, # UNIT wherever the value is measured in something โ€” which renames the family again, since a family that declares a unit has to end in it (system_mem_physical_total โ†’ system_mem_physical_total_bytes). Counters are typed as counters and carry the reserved _total suffix on their sample; strings come back as an _info family in the node_uname_info shape.

Per-instance metrics are one family with a label.

# TYPE system_cpu_idle_percent gauge
system_cpu_idle_percent{core="0"} 93
system_cpu_idle_percent{core="1"} 91
system_cpu_idle_percent{core="total"} 95

The label is core, cpu, nic, zone, battery, exe, disk, drive or pdh_instance depending on the bundle โ€” pdh_instance rather than instance, because Prometheus attaches its own instance label to every sample. Windows and Linux spell a CPU core differently in the JSON key (core 0 and core_0); neither spelling reaches the label, which is the bare 0 on both, so one query works across a mixed fleet.

Around that:

  • /api/v2/metrics?meta=1 serves the same keys and values with their help text, unit, type and labels under a metadata object. Without meta the endpoint is byte for byte what it was.
  • GraphiteClient can send the labels as carbon tags (metric tags = true, off by default โ€” a carbon older than 1.1 stores path;core=0 as the name).
  • CollectdClient mappings can read the labels and the types. A variable set to label:core expands to every value of that label instead of a regular expression over flat keys, and auto: sends whatever the producing module declared a counter as a DERIVE and everything else as a GAUGE.
  • Predefined PDH counters can describe themselves with help and unit keys, and Python fetch_metrics accepts a dict per value ({"value": 42, "help": "โ€ฆ", "unit": "bytes", "type": "counter"}, plus "labels").
  • Windows only: system.mem.page.% and system.mem.physical.% report different numbers, because they were reporting the wrong thing โ€” both divided the commit charge by the commit limit. Alert thresholds tuned against the old reading need re-checking.

๐Ÿ“ฅ GearmanClient โ€” Mod-Gearman, either flavour

A Naemon or Nagios Core installation running Mod-Gearman keeps its scheduler, its check definitions and its escalations; the agent registers for the queues you name, pulls jobs off gearmand and answers them as native NSClient++ queries. Nothing listens on the monitored host.

Setting Effect
mode = agent Answers only for the host it runs on; a job for another host_name is answered UNKNOWN
mode = proxy Answers every check on the queues it registered โ€” one Windows box running a whole hostgroup through check_nrpe, check_wmi and the rest

The same module submits passive results into the core’s result queue (/settings/gearman/client, channel GEARMAN, command submit_gearman), which is what lets a Mod-Gearman installation drop NSCA. The two halves are independent.

Two things to unlearn when writing the check_command on the core, since neither fails in a way that names the cause: write host=$HOSTADDRESS$, not -H $HOSTADDRESS$ (a two-character first token puts the argument parser into key-value mode and the check answers with a help screen), and warning=load gt 80, not warning=load>80 (> is a metacharacter, and allow nasty characters is false by default). See Mod-Gearman for the full setup on either core.

The module is marked experimental, and that mark is doing real work here: its settings, queue handling and output may still change, and while it has been run end to end against a real gearmand on both cores, it has not been tested at scale โ€” not against hundreds of hosts, a deep job backlog, or a proxy answering for a large hostgroup. Roll it out to a slice of the estate first and keep the existing transport until you are satisfied. Reports of how it behaves on a real workload are exactly what the experimental mark is asking for. (#1542)

๐Ÿ›ก๏ธ Security

The low-severity tier of the audit landed in three parts, alongside a second undefined-behaviour sweep and the settings/web/build hardening from #1529.

Outbound clients. The request-override guard now covers the keys that decide how a connection is protected โ€” verify, insecure, no-psk, ssl, tls-version, ca, certificate, allowed-ciphers, dh โ€” and, for SMTP, recipient and sender (behind their own allow recipient override). proxy= and no-proxy= count as moving the request, since a caller-chosen proxy receives it whole with the configured NRDP token in it. payload-length is clamped to what each protocol accepts, 65536 for NSCA and 1 MiB for NRPE. (#1526, #1550)

Scripts and check targets. A NUL in a script argument is refused โ€” CreateProcessW reads the command line as a C string, so it truncated there and silently dropped every operator-fixed argument after the substitution point. ext-scr add --import reads only from the script folders. A script now receives only its own stdin and its own stdout/stderr pipe ends instead of every inheritable handle of the service. host= on a docker check must match the configured endpoint. And on Linux, a script section with user, domain or password set is refused rather than run as the service account: those keys are implemented by the Windows launcher only, so a script sandboxed with user = nobody was not sandboxed at all. (#1523, #1551)

The web server. Every response carries X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer and a content security policy, plus Strict-Transport-Security over TLS โ€” so a page that embeds the agent’s UI in a frame will stop working, which is the point. [/settings/WEB/server] gains tls version (default 1.2+) and allowed ciphers. Logging out calls DELETE /api/v2/login, so the bearer token stops working immediately; the in-memory log buffer is capped at 1000 entries, where an unauthenticated peer could previously add one per rejected request for the life of the process; and nscp web install-ui no longer stages its download in ${temp}. (#1552)

Elsewhere. The shared /settings/default/password is registered sensitive by the core rather than by whichever server module happens to be loaded, so every agent redacts it. Elastic and Op5 submissions log when credentials go over an unverified https link, as the Icinga, NRDP and NRPE clients already did โ€” and the Icinga warning, which repeated on every submission, is logged once per target now. allowed hosts finally understands the * ranges it has always advertised (192.168.1.*, 10.*, a bare *); such an entry used to throw out of the address parser and take the whole listener with it. The Windows release build pins every third-party action to a commit and verifies every download against .github/dependency-checksums.txt. (#1529, #1532,

1534, #1537)

Fleet bundle signatures changed shape, and this one needs action. An Ed25519 signature used to cover the bare SHA-256 digest of a bundle’s bytes, which bound nothing about which bundle those bytes were: an old signed blob could be re-advertised under a new id, name or version and still verify. It now covers a canonical descriptor of the bundle’s identity, which means the fleet server must be upgraded before โ€” or at the same time as โ€” the agents. A mismatch is safe but inert: the agent logs signature verification failed, keeps the configuration it last applied, and stops picking up changes. (#1536)

๐Ÿ” Agent-to-agent checks over REST

POST /query.pb and POST /settings/query.pb are removed. The first handed the core a message whose header the caller wrote, and the core reads the calling module and user out of that header. The second had been unreachable for several releases. Nothing that talks to an agent over HTTP used them: Icinga’s check_nscp_api asks for GET /query/{name}, untouched, and the web UI uses /api/v2.

Their only consumer was NSClient++ itself, through NSCPClient โ€” and that never worked: it passed the serialized message as the HTTP request target, so every request was malformed, and the configured password was never sent. check_remote_nscp, remote_nscp_query and remote_nscpforward now run the command through GET /api/v2/queries/{command}/commands/execute. If you have an NSCP target configured:

Setting Was Now
path /query.pb /api/v2/queries
TLS off unless ssl = true on unless no ssl = true
password read, never sent sent; the remote’s admin user needs queries.execute

exec_remote_nscp and submit_remote_nscp are removed rather than ported: both posted an NRPE-style string to the protobuf route, which the remote parsed as an empty message and answered with nothing โ€” and the submit path reported success regardless. Use NSCA, NRDP or another submit client for passive results. (#1552)

๐Ÿงช Experimental modules and commands

A module or check command that is new enough that its options, filter keywords and output may still change now says so: nscp test appends (experimental) in queries, aliases, list and plugins and shows a Status: line in desc, the web UI shows a chip, the REST API reports an experimental field, and the reference documentation renders a marker in the command tables and a note on the command. The recently added check_* commands of CheckDisk, CheckDocker, CheckNet, CheckNSCP and Scheduler are marked, as are the CheckMSSQL, CheckMySQL, CheckSecurity, CheckWindowsApps, GearmanClient and NSCANgClient modules in full. Out-of-tree modules declare it in module.json. (#1543)

๐ŸŽจ Filter expressions, painted

The prompt already knew a command name from a typo. It did not know anything about what came after the =, which is where the mistakes actually are: filter=fre < 10% is a check that runs, matches nothing and reports OK. The value of every option that takes a filter expression or a syntax template is now read as what it is, following the where grammar and the placeholder rules the engine itself uses โ€” a keyword the check offers is painted, one it does not is red, before enter is pressed. Filter functions, operators and number+unit literals each get their own colour.

The web UI’s arguments field does the same, from the same registry data: GET /api/v2/queries/{query}/help returns one check’s whole vocabulary โ€” every option with its default, flags and description, and every filter keyword it offers. An alias declares no keywords of its own, so the endpoint follows it to the command it stands for and says which one in keyword_source. (#1540,

1541)

โฑ๏ธ Threading, reloads and timeouts

The ten highest-severity findings of the concurrency audit are fixed, and several of them are visible from outside:

  • A settings reload holds new checks off a module while its loadModuleEx applies the new configuration, and waits up to five seconds for checks already inside it to return. A reload is no longer instantaneous on a busy agent; if a check holds a module longer than that, the reload proceeds anyway and logs which module it was.
  • Unloading the module that is serving the request is refused instead of taking the agent down with it โ€” in practice POST /api/v2/modules/WEBServer/commands/unload. Reloading a listener from inside a check that the same listener is serving is refused too, instead of leaving that listener dead.
  • Configuration downloaded over HTTP gives up on a read or write that stalls for 30 seconds, instead of waiting indefinitely, and no longer holds the settings instance lock while it downloads.
  • Submissions over NRPE, NSCA, NSCP and check_mk apply the configured timeout to connecting and to the TLS handshake, not just to the exchange.

Underneath: the Lua script manager and the collector pointers are published atomically so a reload cannot free them under a running check, the scheduler watchdog no longer re-arms the pool during shutdown, a socket server refuses to be stopped from one of its own threads, the Python function registry is read under the GIL, and a CheckEventLog filter object no longer closes a handle it does not own. (#1531, #1534)

๐Ÿ› Bug fixes

  • check_nt FILEAGE checks one file instead of a directory of them. It mapped onto check_files, which walks a whole tree, so a directory argument reported whichever file the walk happened to emit first โ€” not the oldest, not the newest, just arbitrary. It maps onto check_single_file now; a directory fails with an error.
  • The Windows installer no longer rewrites NRPE transport security it did not configure. The MSI recognised only insecure = true and verify mode = peer-cert, so a listener running TLS without client certificates, or one with a hand-written cipher string, fell through and got a preset applied over it. (#1562)
  • nscp nrpe install writes use ssl, not ssl = true โ€” a key the server never reads. On a host where use ssl = false had been set previously, the command claimed encryption and client-certificate authentication while the listener stayed in plaintext. The legacy cipher default also drops its !ADH, which never excluded the anonymous elliptic-curve suites.
  • The PDH counter browser narrows on every filter and ignores case. --list, --filter and --counter shared one variable, so whichever came last won and the others were silently discarded; --filter is repeatable now. Matching is case insensitive, so --list disk finds what --list Disk finds.
  • A round-robin counter with a zero or unparseable buffer size is refused and named in the log, instead of being loaded with a buffer that holds nothing.
  • A collectd value list naming a metric the snapshot does not carry is no longer sent as a zero โ€” it reported a measurement nobody took. Such a value list is skipped in whole, since a collectd value list is positional.
  • check_ping keeps listening for its own echo reply instead of giving up on the first reply that arrives, an HTTP status line with a reason phrase parses, every line of a remote check result is kept, and a string Python cannot encode no longer crashes the agent.
  • check_dns’s host= description said the wrong thing. (#1545)

๐Ÿ“ฆ Packaging

  • Shared runtime libraries. nscp_net.dll (sockets and TLS), nscp_client.dll (the sender modules’ shared command line), nscp_json.dll and OpenSSL as libcrypto-3-x64.dll / libssl-3-x64.dll now ship next to nscp.exe, one copy for the whole service, where before NRPE, NSCA, check_mk, the web server, the HTTP clients and the checksum checks each carried their own. plugin_api.dll absorbed the settings and program-options helpers. About a fifth off the install on Debian and RedHat, and more than that on Windows. The legacy XP build still links everything statically. (#1544, #1556)
  • Windows ARM64 is back as NSCP-<version>-ARM64.msi and .zip. Two differences from x64: no PythonScript (the package is cross-compiled and there is no ARM64 CPython to embed), and the MSI does not bundle the Visual C++ runtime, because Microsoft ships no ARM64 merge module for this toolset โ€” install vc_redist.arm64.exe first on a fresh machine. (#1546)
  • A Raspberry Pi OS package, NSCP-<version>-debian-trixie-arm64.deb, built on Debian 13 for Raspberry Pi 3 and newer and for Debian 13 arm64 in general. 64-bit only, and without the managed (C#) plugin API, since Debian does not package the .NET SDK. (#1546)
  • The web bundle is built with npm ci and gated on npm audit, so the bytes in the web zip and in the MSI’s web/dist match package-lock.json. Pull requests build only the newest RedHat, and a failed dependency download fails at the download instead of somewhere later.

โš ๏ธ Upgrade notes

  • Every OpenMetrics family name changes. Drop any metric_relabel_configs block that rewrote dots to underscores โ€” the agent does that itself now. Update dashboards, recording rules and alerts: system_cpu_core 0.idle is system_cpu_idle_percent{core="0"}, disk_free_C:.total is disk_free_total_bytes{drive="C:"}, workers_jobs is workers_jobs_total. Exclude core="total" from anything that aggregates over cores. If dashboards cannot be updated first, set openmetrics format = legacy under [/settings/WEB/server] as a migration window โ€” it is deprecated and will be removed.
  • Upgrade the fleet server before or with the agents. Bundle signatures now cover the bundle’s identity, not only its bytes. A version mismatch is inert rather than damaging: the agent keeps the configuration it last applied and stops picking up changes.
  • A settings source, include or attachment over plain http:// is refused. Move it to https://, or set allow plaintext = true under [tls] in boot.ini per host.
  • check_tcp / check_ssh against an internal or self-signed service now fail with tls_handshake_failed. Point ca= at the issuing CA or add verify=none. sni= on a non-TLS connection is now rejected rather than ignored.
  • POST /query.pb is gone. If you have an NSCP client target, remove an explicit path or point it at /api/v2/queries, expect TLS unless you set no ssl = true, and give the remote’s admin user the queries.execute grant. exec_remote_nscp and submit_remote_nscp are removed.
  • Requests may no longer weaken a credentialed target’s transport security (verify, insecure, ssl, ca, tls-version, proxy, โ€ฆ) or re-address submit_smtp mail. Supply the credentials with the request, configure the variant as its own target, or set allow host override = true / allow recipient override = true.
  • External scripts with user, domain or password set are refused on Linux โ€” those keys were never implemented there. Put the identity change in the command itself with sudo.
  • The web UI cannot be framed any more, and check_nt FILEAGE naming a directory now fails instead of reporting an arbitrary file’s age.
  • A hand-rolled deployment must copy the new shared libraries from the installation root alongside modules\*.dll, the OpenSSL DLLs included. Installing from the MSI or the Debian/RedHat packages needs nothing.
  • On Windows ARM64, install the VC++ ARM64 redistributable before the agent on a fresh machine, and use the x64 package under emulation if you need PythonScript.

Security notices for this release are on the security notices page, and the full list of behaviour changes is on the upgrading page.

Download

You can download the new version from GitHub

// Michael Medin

Thank you, Nagios World Conference 2026

Nagios World Conference 2026 wrapped up in the Twin Cities today, so first of all: thank you. To everyone who came to my two sessions, asked questions, or said hi.

Thanks also to the Nagios event team. I genuinely believe that this is one of the best conferences in the world. And you proved that you can do this consistently. Great talks, great venue, great catering and excellent evening events.

The slides

Both decks are up:

A mod-gearman proof of concept

The first thing I am bringing home is a working Mod-Gearman proof of concept in NSClient++. I hacked it together this week to find out if it was even doable. I stayed on Swedish time, so I woke up at 1 am every morning coding all the way till 7 am.

Gearman had not been on my radar for years. What changed is not that I finally got around to it, but that the missing piece showed up on its own, as a side effect of other work. NSClient++ now ships close to a hundred checks (thats on par with monitoring-plugins), and a good number of them are network checks: check_http, check_tcp, check_ping, check_dns, check_ssh, check_ntp_offset, check_certificate, check_mysql, check_docker and so on. All of them run inside the agent. No forking, no plugin process per check, no interpreter start-up.

That matters for a Gearman worker. A normal worker pays for a process launch on every job it picks up. An agent that can already talk NRPE, NSCP, HTTP, TCP, DNS and ICMP in-process does not have that cost. Sitting in talks this week, listening to how people distribute their check load, it finally clicked that nothing was stopping the agent from being the worker. Well, I guess I need to take another stab at check_by_ssh.

So I tried it, and it works. NSClient++ can pull jobs off a Gearman queue and hand the results back. In practice that means the agent could take your whole check load if you wanted it to, on Windows and Linux, local checks and remote ones alike, without a separate worker fleet for the non-Windows part.

Nagios showing service checks served by NSClient++ over mod-gearman

That is a real Nagios in my lab, and every service on nscp-lab in that list was executed by NSClient++ after being picked up from the Gearman queue. Nagios never talks to the agent. It puts jobs on the queue, and the agent takes them off.

The details I was most pleased with are the boring ones. The states are real states, not just “it replied”: Disk C and Memory come back CRITICAL with their performance data intact, so thresholds and graphs still work. Missing command returns UNKNOWN with Unknown command(s): check_no_such_thing, so a failure comes back through the queue as a failure instead of disappearing or hanging. A passive result submitted by the agent shows up in the same list. And after close to five hours the queue is still empty, 0 jobs running and 0 jobs waiting, which is what you want from a worker that keeps up.

This is a proof of concept. It is nowhere near a release and I am not promising anything yet. But going from “have not thought about this in years” to a worker pulling jobs off a queue in a week, because of something I heard in a conference room, is a pretty good argument for going to conferences.

The AI talk

The second thing I am bringing home is less about code.

I sat in on Transforming Nagios with AI: Building an LLM-Powered Monitoring Assistant and Predictive Anomaly Detection Engine by Sunil Kathait from Ellucian. What stuck with me was not the model or the prompting. It was what the assistant needed in order to be useful, and what it was actually for.

The number that matters is mean time to recovery: how long from something breaking to it working again. If you break that time down, most of it is usually not the fix. Restarting a service takes thirty seconds. Working out that a service needs restarting, which one, on whose box, and whether you are even the right person to be looking at it, is where the time goes.

So the faster you understand what is wrong, the faster you recover. And understanding is mostly a context problem. That made me realize that context is the piece that has always been missing from classic Nagios-style monitoring, with or without AI. And the one thing that graph based monitoring always had.

We have spent decades getting good at alerting. DISK CRITICAL - C:\ used 94% is accurate, cheap and reliable. It tells you something is wrong and starts the clock. What it does not tell you is whose machine that is, what runs on it, whether it matters at 3 AM, whether it has done this every month-end for two years, what someone did about it last time, or who to hand it to. The on-call engineer answers those questions from memory, a wiki and a Slack search, and every one of those minutes is recovery time.

This is where an LLM actually earns its place. Taking a pile of context and turning it into “here is what is probably wrong and what to try first” is what these models are good at. Given the alert plus what the machine is, what it does, what it has done before and what fixed it last time, a model can give you a decent first guess in seconds, at 3 AM, for someone who has never seen the host before.

But it only works in that order. Give the model nothing but the alert string and all it can do is rephrase the alert string. There is nothing to reason about.

So the AI story and the “classic monitoring is missing something” story turn out to be the same story. Both need context. Get that in place and your people recover faster today, and an LLM has something worth reasoning about later.

Thanks to Sunil for the session. It was the most useful hour of my week.

Where that leads for NSClient++

If context is the missing piece, the agent is a natural place to collect a lot of it. It is already on the box, and it already knows things nobody wrote down. Every question it can answer is one the person on call does not have to go and chase.

There is a small version of this in NSClient++ today: tags, name = value facts an agent reports about its own host, such as drives, os_name and os_version. The loaded modules contribute them, and the web interface and newly launched fleet server read them. Right now they are mostly a cheap inventory. I think they are the seed of something more useful.

What I want to explore is extending the fleet side to hold real context about every host it knows about:

  • Context from the host itself. Not just the OS, but what the box appears to be: which roles and products are installed, what is listening, which services matter here. The agent can work most of that out without anyone maintaining a spreadsheet.
  • Context from you. Owner, team, environment, criticality, escalation path, a link to the runbook. Set once through the fleet, instead of copied into every check definition.
  • Context from history. The agent has seen this disk fill and drain a hundred times. “This is the fourth time this week” and “this happens every month-end” are two of the most useful sentences you can put in an alert, and neither needs a model.
  • Context from the moment it broke. This is the one I find most interesting. The agent is the thing that sees the check fail, and it is on the box when it happens, so it can grab a snapshot right then: current metrics, what CPU, memory and disk queues were doing, what was running, what the event log just said. Nagios learns that a check went critical. The agent can know what the whole machine looked like in that second.

The context should not travel with the alert

The obvious design here is the one I think is wrong.

The tempting thing is to attach the context to the check result and ship it along, so every alert carries its own explanation. I do not want to do that. The alert should stay what it is: small, cheap and unchanged, exactly the thing NRPE, NSCA and Nagios already understand. These checks run constantly and almost all of them come back OK. Shipping a host profile along with every OK result, to repeat things that have not changed since last Tuesday, is a lot of traffic for no new information.

Instead, the alert manager does the joining. Something breaks, the alert arrives as it always has, and at that point, when it is finally worth knowing, the alert manager asks the fleet server about the host: what is this box, who owns it, what runs on it, and what did it look like when the check failed. Then it either renders something useful for the person on call, or hands the lot to an LLM and asks for a suggestion.

The one thing that cannot wait is the snapshot. Who owns a box and what runs on it will still be true in ten minutes, so there is no hurry, ask when you need it. The state of the machine at the instant the check failed will not be true in ten minutes. It is gone. So the agent has to capture it the moment it sees the failure and hold on to it. Capture at the moment, fetch on demand. By the time a human has read the notification, opened a console and logged in, the spike has flattened out and the process that ate the box has exited. That is why “it looks fine now” is such a familiar way for an incident to end.

What I like about this approach:

  • Nothing changes on the wire. No fatter payloads, no changes to Nagios, NRPE or NSCA. Your existing pipeline keeps working as it does today.
  • Context is fetched when something is actually wrong, not on every check of every host for the 99% of the time everything is fine.
  • The context is current. You get what is true when you ask, not whatever was true when the check happened to run.

So the interesting work is not really in the alert path. It is in giving the fleet server something worth asking about. But we shall see what happens, currently this is just an idea…

Thanks again, everyone. And I hope to see you next year!

// Michael Medin

NSClient Fleet 0.1.0 โ€” central configuration management for NSClient++

NSClient Fleet is a new, separate product: a server that holds the configuration for a whole estate of NSClient++ agents, hands each host the part that applies to it, and reports what every host is actually running. The first release is out.

Until now there have been two ways to configure a large number of agents. You can point each one at an ini file on a web server and let it pull the file (CONFIGURATION_TYPE=), or push settings to each agent over the REST API from whatever orchestration you already run. Both work, and both remain supported. Neither keeps track of the estate, though: the only inventory is the one you maintain by hand, so questions like which version of check_backup.ps1 is on which host or which hosts have not checked in since Tuesday have nothing to answer them.

Fleet turns that around. Agents enroll themselves and report what they are, so the server builds the inventory instead of consuming one. Grouping by reported facts, configuration assembled per host, and drift reported as a comparison rather than a guess all follow from that.

It lives in its own repository and is entirely optional โ€” NSClient++ works exactly as it always has without it.

โœจ Highlights

  • ๐Ÿท๏ธ Self-enrolment and self-describing hosts. A few extra MSI properties and the host appears in the inventory with its OS, version, agent build, drives and detected roles, as tags reported by the agent rather than typed in.
  • ๐ŸŽฏ Groups select hosts by tag; bundles attach to groups. A host that starts reporting sqlserver=detected falls into the SQL group and picks up the SQL monitoring bundle on its next poll.
  • ๐Ÿงฉ Bundle templates that edit real INI. The forms are bound to actual INI keys and write back with line edits, so the INI text stays the source of truth and hand-edits survive.
  • ๐Ÿ” Encrypted bundles. Sealed in the browser with AES-256-GCM before upload; the server stores an 8-byte key fingerprint and delivers a blob it cannot read. The agent option require encrypted bundles makes it refuse anything unsealed.
  • ๐Ÿ“Š Host status derived from reported hashes. In sync, out of sync, offline and lost, plus a local config flag for hosts carrying local settings that outrank what the server sends.
  • ๐Ÿ”Œ One port. 443 serves the operator UI, the agents and certificate issuance, separated on the TLS handshake by ALPN.
  • ๐Ÿ“ฆ One static binary and a SQLite file. No runtime and no database server; Linux and Windows, x86-64 and arm64, or a container image.

What it takes over

A management server is one more thing to run, patch and be woken by, so it is worth being clear about what comes out in exchange. In a typical config-file setup, Fleet replaces:

  • the orchestration that pushed configuration
  • the web server and the directory layout behind it
  • the include-file naming convention
  • the inventory spreadsheet
  • tracking which script is deployed where

Installation and enrolment

Installing an agent into a fleet uses the same MSI command line as before, with different properties:

msiexec /qn /i NSCP-<version>-x64.msi ^
    FLEET_SERVER=https://fleet.corp.example ^
    FLEET_TOKEN=<one-time token> ^
    FLEET_BUNDLE_KEY=<your key>

Where the config-file approach pointed at an ini URL, this points at a server and carries a one-time token, so moving between the two is a change of MSI properties rather than a migration.

The token is single-use and short-lived. The agent generates its own keypair, sends a certificate request, and receives a client certificate along with everything it needs to trust the server; the token is then spent and will not be accepted again. After enrolment there is no token anywhere โ€” the certificate is the identity.

sequenceDiagram
    participant A as Agent
    participant F as Fleet server
    A->>F: POST /enroll/v1 โ€” one-time token + CSR
    F-->>A: client cert ยท CA ยท pinned server cert ยท signing key
    Note over A,F: everything below is mTLS, always agent-initiated
    A->>F: GET /agent/v1/desired-state?current_hash=โ€ฆ
    F-->>A: 304 โ€” nothing changed, sleep N
    A->>F: GET /agent/v1/desired-state?current_hash=โ€ฆ
    F-->>A: 200 โ€” bundle set + state hash
    A->>F: GET /agent/v1/bundles/:id
    A->>F: POST /agent/v1/state-report

Every exchange after enrolment is initiated by the agent, so there is no inbound connection to a monitored host, no port to open and nothing pushed. Most polls return 304.

Hosts describe themselves

Agents already know a good deal about the machine they run on, and now report it as tags:

Tag Where it comes from
os the agent
os_name Windows Server 2022 โ€” for reading
os_version 10.0.20348 โ€” for matching
nscp_version which agent build is on the host
drives c:,d: โ€” from CheckDisk
sqlserver detected โ€” read from the registry, so a stopped instance still counts
operator-defined any service or unit mapped to a tag: MSSQLSERVER=sql-server

Scripts can publish tags too, which covers the facts specific to a given estate: whether IIS is listening on 443 (role=web-frontend), which in-house application is deployed (app=billing, app_version=4.2), or whether a provisioning marker file exists (env=lab). A script-reported tag behaves exactly like a built-in one in groups and selectors. The agent sends its full tag set on every report, so a tag that stops being reported simply disappears โ€” there is no cleanup job and no stale inventory.

Because these are the host’s own claims about itself, a group only matches on agent-reported tags if it is built to do so. Reported facts are meant for grouping, not access control; anything gating access to secrets should match on operator-set tags instead.

Groups and bundles

flowchart LR
    T["tags<br/>os=windows<br/>sqlserver=detected"] --> G(["group ยท SQL Servers<br/>sqlserver exists"])
    G --> B1["sql-monitoring 2.1.0<br/>priority 100"]
    G --> B2["windows-base 1.4.0<br/>priority 10"]
    B1 --> C(["merged config<br/>+ scripts"])
    B2 --> C
    O["this one host<br/>priority 1000"] --> C

A group is a rule against tags rather than a list of machines โ€” sqlserver exists, os is in a given set, this and not that. Groups are built in the UI rather than typed as a query, so there is no expression language to inject into.

Bundles attach to groups, not to hosts, and each attachment carries a priority. Priorities are layers: windows-base at 10 underneath, sql-monitoring at 100 on top. Later layers win, and a bundle can delete a key set by the layer below. For cases that genuinely concern a single machine, a host override sits above every group at priority 1000.

Bundles

A new bundle starts from a template. The set is derived from the scenario guides โ€” Windows and Linux server health, disk space, services and processes, performance counters, real-time alerts, SQL Server and network checks โ€” plus one per delivery mechanism (NRPE, Checkmk, Prometheus, NSCA, NSCA-NG, Icinga 2, NRDP, Graphite and scheduled baselines).

Two things about how they are built are worth knowing.

Each template covers one concern. Check templates define transport-neutral aliases and say nothing about how results leave the host; each transport is a separate bundle. A group therefore gets “Windows health” and “deliver over NRPE” as two layers, and changing monitoring system means swapping one bundle rather than editing checks.

The form is a view of the INI, not a generator. Every field is bound to real INI keys and the INI text remains the source of truth: the form reads values out of the text and writes back with line edits, so raw editing, comments and hand-written sections survive a round trip. A bundle remembers which template produced it, so reopening it later gives the form back rather than unstructured INI.

Bundles can also be built without the UI, since a bundle is a zip file:

windows-base-1.4.1.zip
โ”œโ”€โ”€ bundle.toml        name = "windows-base" ยท version = "1.4.1"
โ”œโ”€โ”€ config.json        the config fragment โ€” JSON Merge Patch (RFC 7396)
โ””โ”€โ”€ scripts/
    โ””โ”€โ”€ check_backup.ps1
curl https://fleet.corp.example/api/bundles \
  -H "Authorization: Bearer nsk_โ€ฆ" \
  -F name=windows-base -F version=1.4.1 \
  -F bundle=@windows-base-1.4.1.zip

The config fragment is a standard JSON Merge Patch โ€” objects deep-merge, scalars replace, null deletes โ€” and the agent renders the merged result to NSClient INI on the host. Layering is therefore a property of the format rather than of the editor, and a hand-built bundle participates in it exactly like a template-built one. Upload is an API key operation, so bundles can live in git and be built and published by CI.

Encrypted bundles

Bundles carrying credentials โ€” SQL Server connection strings, passive transport passwords โ€” can be encrypted in the browser before upload, with AES-256-GCM and a key the server never receives. The server stores an 8-byte key fingerprint, enough for the UI to report a key mismatch, and otherwise signs, stores and delivers a blob it cannot read.

The bundle’s name and version are authenticated into the ciphertext, so a compromised server cannot serve one validly encrypted bundle in place of another; a mismatch fails decryption. Keys reach agents at install time, over the same out-of-band channel as the enrolment token.

The agent option require encrypted bundles makes an agent refuse anything unsealed. Since only a key holder can produce a bundle that decrypts, a server facing agents in that configuration cannot deliver configuration or scripts of its own making.

The trade-off is that there is no escrow: recovery would require the server to hold the key. A lost key means re-uploading the affected bundles under a new one. Rotation is supported โ€” agents hold a key list, newest first, and select by fingerprint, so bundles encrypted under the previous key keep working during a rotation.

Host status and drift

Status Meaning Where it comes from
in sync running exactly what the server would send it the hash the agent reported matches the hash the server would serve now
out of sync a change is pending, or an apply failed hashes differ; an agent never reports a state it did not fully apply
offline quiet for three poll intervals a reboot or a blip; often resolves itself
lost quiet for 48 hours stopped, uninstalled, firewalled, or the machine is gone

Each host reports the hash of the configuration it finished applying, and the server compares that against what it would serve the host now. Because an agent will not report a state it did not reach, a failed apply shows as out of sync rather than as success. Silence is tracked separately: three missed polls reads as offline, two days of silence as lost. Neither status revokes or deletes anything.

There is also a local config flag. NSClient++ reads local settings ahead of fleet-managed ones, so a locally set key shadows a pushed one. The agent reports that a host has local configuration โ€” never its content, which is where credentials tend to live โ€” so partly managed hosts are visible rather than reported as in sync when they are not.

Network and TLS

443 is the only port. The operator UI, the agents and certificate issuance share it, separated on the TLS handshake:

The client offers It gets
ALPN nsclient-fleet/1 pinned self-signed cert ยท client certificate required
anything else Let’s Encrypt cert ยท no client certificate requested
ALPN acme-tls/1 throwaway challenge cert โ€” handshake only

Agents pin a single certificate and do not consult the system trust store, so agent connectivity does not depend on certificate issuance being reachable, and on-prem and air-gapped installations behave the same as internet-facing ones. Browsers are never asked for a client certificate, so there is no certificate picker and no tenant information exposed to visitors.

The limitation this implies is worth planning for: anything terminating TLS between an agent and the server โ€” an inspecting proxy, a CDN that terminates TLS, most L7 load balancers โ€” breaks the agent connection. The TCP connection has to be passed through.

Security model

Identity comes from the certificate. The tenant is derived from the certificate’s issuer rather than from anything the certificate claims about itself, and the host id is a spiffe:// name cross-checked against that issuer. The server constructs the certificate; the request contributes a public key and nothing else. No request body carries a host id, token or identity.

Configuration and scripts are signed. SHA-256 for integrity and Ed25519 over the digest for authenticity, with the signing key kept separate from the CA, so a CA compromise does not allow bundles to be forged. Group membership is re-checked on every download, so a compromised host cannot fetch another group’s scripts.

An agent that cannot verify what it received does not apply it, does not fall back to an older unsigned state and does not go quiet: it keeps running the last known-good configuration and reports the failure.

One consequence is worth stating directly. By default the server can cause an agent to execute code, because deploying scripts is one of the things it is for โ€” the trust boundary is the management server, in the same way that the trust boundary for a scripting module is the script files. With require encrypted bundles enabled, that is no longer the case.

Known limitations

This is a 0.1.0 release, and the limitations are worth reading before planning around it.

  • It is new and will have bugs, the UI especially.
  • Templates will change, and the way bundles are bound to tags is likely to gain a richer language.
  • Agent upgrades are not implemented. They are planned for after the modern folder layout becomes the default.
  • Script dependencies are not handled, and may never be.
  • Fleet configuration on the agent, including the bundle key, is stored in clear text on every host. Encrypting it is on the roadmap.

Configuration written today is not at risk from any of this: the configuration format is owned by NSClient++ and is not changing.

Also planned: template variables for per-host values such as thresholds, more fleet-configuration management on top of the bundle-key and CA rotation that already exist, and adapters that feed discovered hosts into Nagios and other monitoring systems.

Running it alongside an existing setup

Fleet does not require migrating anything. The config-file and REST approaches remain supported, with no deadline attached. An enrolled agent does not have its nsclient.ini touched โ€” local settings are left in place and reported as local config โ€” and leaving a fleet is the same MSI properties pointed elsewhere.

A handful of non-critical hosts is enough to see the inventory, grouping and status behaviour with real data. Reports of what breaks are welcome on GitHub issues and in discussions.

Getting started

Download

Download NSClient Fleet from GitHub All downloads

// Michael Medin