0.12.6 #1271
mickem
announced in
Announcements
0.12.6
#1271
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
New permission system
The release has three big stories — a new core permission system with optional client-cert principals on NRPE, a
PDH overhaul that fixes long-standing counter-collection crashes and adds counter functions, and a WEB hardening
option that lets monitoring-only deployments expose the WEB UI without seeding a privileged admin account. Everything
else is bug fixes, small features, and follow-ups around those three threads.
Highlights
/settings/permissions. Disabled by default; existing installs keep working.See https://nsclient.org/docs/concepts/permissions/ for the model, identity table, and rollout recipe.
client identity source = cnis set onNRPEServerand the listenerverifies the client cert, the CN is stamped as the policy principal so rules can be written per-cert (
NRPEServer:icinga-master = ...). Hard guardrail at module start refuses to load the module if the TLS verify modewould let the CN be attacker-supplied.
allow exectoggle — exec is now gated by a single on/off switch under/settings/permissions. Theper-command rule table applies to queries only. Default
trueso enabling the policy system doesnot break exec callers.
when temporarily unavailable (Failed to add counter #634), reliable English counter lookup (OP5 - Failed to add counter: Submission Queue Length PdhAddCounter failed: c0000bb8: The specified object was not found on the computer. #652, check_network returns not plausible values #906), a resource leak in the
counter-lookup path, and a refactor to smart-buffer-based PDH enumeration. Most users running CheckSystem on Windows
should see meaningfully better reliability.
details-syntaxand related rendering paths can now applyscaling and other functions, e.g.
'${counter}'=${value:scale(/1024)}MB.See https://nsclient.org/docs/reference/check/CheckNet.
1:10,~:5,@10:20etc. work in perfdata thresholds,matching the Nagios plugin spec.
disable admin useron WEBServer — monitoring-only deployments can expose the WEB UI without ever seeding thebuilt-in admin (and previously seeded admin entries are ignored). Pairs naturally with the new permission system to
lock down reconfiguration surfaces.
boot.ini+ new--path-overrideCLI flag — path tokens (module-path,certificate-path, etc.) are now declared early inboot.iniso they take effect before the main config is loaded.Per-invocation overrides via
--path-override KEY=VALUE. See https://nsclient.org/docs/concepts/settings.and leaves the module loaded so settings and commands stay usable for diagnostics.
disable admin user,client identity source,allow exec, and the policy table are all documented inhttps://nsclient.org/docs/concepts/permissions/ and https://nsclient.org/docs/setup/securing. Treat those two as the
starting point for any new
install.
Detailed changes
Security and permissions
Core permission system
A policy layer in the core decides whether a given caller may run a given command. Disabled by default; when enabled,
rules form a strict allow-list.
Subject is
module[:principal]; object ismodule.command. Wildcards (*,?) supported. Rules combine additively.See https://nsclient.org/docs/concepts/permissions/ for the full identity model, the
CheckHelpersidentity-forwarding behaviour, and a step-by-step rollout recipe.NRPE client cert CN as principal
When two-way TLS is configured and verifying client certs against your CA, the Common Name is stamped as the policy
principal:
Guardrails: the module refuses to start if
client identity source = cnis configured without SSL, withoutverify_modecontainingpeerandfail-if-no-peer-cert(or thepeer-certalias), or without a non-emptyca path. The CN is logged at debug level on every accepted handshake for diagnostics. CN-only (not full DN) becauseINI key syntax uses
=as the key/value separator and would corrupt DN-shaped policy keys; see the "Why CN-only"section of the permissions doc. See https://nsclient.org/docs/reference/client/NRPEServer.
Global
allow exectogglePer-command rules apply to queries only. The exec surface (WEB scripts UI, lua/python
core:simple_exec(...), CLIexec) is gated by a single boolean:
When
falseandenabled = true, every exec call returnsPermission denied: exec is globally disabled (/settings/permissions/allow exec = false).See "Why exec is a single toggle" in https://nsclient.org/docs/concepts/permissions/.
disable admin useron WEBServerFor installations that expose the WEB UI for status/visualisation only and never want a remote-reconfiguration surface:
With this set, the built-in admin is not seeded on first boot, and any existing admin entry in the user settings is
ignored at load time.
Security guide updates
https://nsclient.org/docs/setup/securing was rewritten with concrete configurations for NRPE (with
and without mTLS) and the WEB server. Read it before exposing either to a network you don't fully control.
Performance counters / PDH
The PDH subsystem (the Windows performance-counter collection backbone behind
CheckSystem,check_cpu,check_pdh,check_network, etc.) got a substantial reliability pass. Most users running NSClient++ as a long-running service onWindows should see fewer crashes and more consistent results.
counter registrations no longer take the service down.
subsequent collection cycles, instead of being permanently unhealthy for the lifetime of the process.
names on non- English Windows installs.
for future changes.
Examples:
check_network
a way operators actually want to read:
See https://nsclient.org/docs/check/CheckNet.
Performance data formatting
range syntax:
5:10,~:5,@10:20, etc. Brings NSClient++ into line with what Nagios consumers already expect.Settings, paths, and CLI
boot.ini— path tokens (module-path,certificate-path,data-path,log-path, …)now live under
[paths]inboot.ini(next tonscp.exe), not innsclient.ini. Overrides take effect before themain config is loaded — including the bootstrap step that decides where the main config itself lives.
--path-overrideCLI flag — per-invocation override, repeatable. (Renamed from--pathto avoid colliding withthe
nscp settings --pathsubcommand option.)a
[/paths]section innsclient.ini.Aliases and command registration
[/settings/check helpers/alias]and are registered byCheckHelpersdirectly, without requiringCheckExternalScriptsto be loaded. This is the preferred place goingforward; the legacy
[/settings/external scripts/alias]is still honoured for backward compatibility.simple_command/simple_command_map— internal refactor that streamlines how modules register aliases. Nouser-visible behaviour change, but module authors may want to look at the new pattern.
7c49a3d3) — minor module-specific addition.NRPEServer
bind toaddress that the resolver can't look up, or a portalready in use, used to make the whole module fail to load. Now the failure is logged clearly, the listener stays
down, and the module's settings and commands remain accessible for diagnostics and reconfiguration. Fix the config and
reload — no service restart needed.
intermittent
Already openerrors on v6 once v4 accepted a client. Each family now owns its own slot.insecure = true(for legacycheck_nrpeinterop) nowsurfaces as an ERROR so it shows up in monitoring dashboards, instead of silently disabling cert-based peer auth.
Plugin lifecycle
prepare_shutdownhook — modules can opt in to a first-phase shutdown pass before any plugin is unloaded. Usedby the Scheduler and similar long-running submitters to finish in-flight work cleanly. Operators see fewer "submission
failed during shutdown" lines during service stop.
Settings store
simpleinibuffer NUL-termination fix — fixes a buffer allocation issue in the INI parser that couldaffect non-UTF-8 data paths.
cache allowed hostis now a real boolean — previously parsed as a string with surprising truthiness; matcheswhat the docs always claimed.
Modules and clean-ups
refreshed.
UninstallStringis now correct (Unistall String incorrect #495) — removal via Windows "Apps & Features" works again.Upgrade notes
Most installs can upgrade in place — defaults are preserved. Read the specific items below if any of them apply.
Permission system
The new policy layer is disabled by default. Existing installs continue to behave exactly as before until an
operator opts in via
/settings/permissions/enabled = true.If you do opt in:
/settings/permissions/policiesapply to queries only. Any rules you might have writtenfor exec command patterns will be silently ignored for the exec dispatch path — exec is gated by the single global
allow execboolean.allow execistrue, so enabling the policy will not silently break the WEB scripts UI, lua/pythoncore:simple_exec(...), or CLI exec. Flip tofalseonly if you want a hard exec lockdown.log allows = truefirst so you can inventory what your actual traffic looks like before tightening toa real allow-list. See the step-by-step recipe in https://nsclient.org/docs/concepts/permissions/.
NRPEServer
client identity sourcesetting defaults tonone, which matches the previous behaviour (subject is bareNRPEServer). Set tocnonly when you want per-cert principals — and only after you've configuredverify_mode = peer-certand aca path. The module will refuse to start with a clear error if you setcnwithoutthose.
ca pathto your private monitoring CA. The system trust store (Windows root store / Linux distro bundle)accepts certs from every public CA on the planet and would let an attacker with a public cert choose their own CN.
See "Pin to a private CA" in the permissions doc.
Path overrides
[/paths]section innsclient.inifrom an older NSClient++ install, those overrides moved to[paths]in
boot.ini(note: same section name, different file). There is no automatic migration. Copy eachkey = valueto a[paths]section inboot.ini(next tonscp.exe) and delete the old section fromnsclient.ini.WEB server
disable admin user = truesetting is opt-in. Existing installs keep their admin and continue to workunchanged. Use this when you want to expose the WEB UI for status-only viewing and have no need to reconfigure the
agent through the web.
NRPEServer startup robustness
NRPEServermodule fail to load. It now logsan ERROR and leaves the module loaded with no active listener — so you can reconfigure via
nscp settings --path /settings/NRPE/server --key ... --set ...and reload, without restarting the service. If youhad monitoring on "module load failed" specifically, you may want to add "NRPE listener failed" as a separate signal.
insecure = trueon NRPEServercheck_nrpeinterop) now logs at ERROR rather than DEBUG/INFO. Behaviour is unchanged; themessage is louder so it shows up in dashboards. If your monitoring filters by severity, you may want to whitelist this
specific message on agents that intentionally run in insecure mode.
cache allowed hostcache allowed host = yesor= on, switch totrue. Numeric1/0still work.Nagios range syntax in performance data
before. Only consumers that previously had to special-case NSClient++'s output may need adjusting, but most
Nagios-ecosystem tools handle both forms.
Full Changelog: 0.12.5...0.12.6
This discussion was created from the release 0.12.6.
Beta Was this translation helpful? Give feedback.
All reactions