Repository navigation
0.25.0 #1669
mickem
announced in
Announcements
0.25.0
#1669
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.
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 awarmup-stateoption,kill treefinally 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
/, 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, andnscp settings --validateexits with1when it finds any (How to add external script #647, feature: report configuration nothing reads (#647) #1657).warmup-statefor collector-backed checks.check_cpu,check_loadand, on Linux and macOS,check_memory,check_pagefileandcheck_networkcan reportok(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 (feature: add warmup-state option for collector-backed checks #1621).kill treeworks 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 (Implement process group signalling for kill tree on Linux #1629).Socket timeout(Stress harness for every check engine; fix Lua concurrent-call crash and socket strand stalls #1642).🔍 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 simplyUnknown command. Every section and key is now checked against what the loaded modules registered:GET /api/v2/settings/problemsnscp settings --validateprints the report and exits with1on a warningSections and keys that belong to a module which is not loaded are listed as info and raise nothing; add
--load-allto--validateto have every installed module register its settings first. The check found one of its own: the core registered its section assettingsrather than/settings, sonscp settings --updatewrote an empty[settings]into every file it touched. It no longer does, and an existing empty one is harmless.⏱️ CheckSystem / CheckSystemUnix —
warmup-stateRight 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:
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/stator/proc/meminfoin a locked-down container) used to be stored as an all-zero sample, socheck_cpureported 0% load as if measured; it now answers UNKNOWN with the reason. The checks concept page describes every case.🐧 CheckExternalScripts —
kill treeon LinuxThe 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 = truethe script now runs in its own session andSIGTERM/SIGKILLgo to the whole group. Unloading the module kills running scripts, which reportwas 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
nscp.sleepor aCorecall, 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.GET /api/v2/scripts/luaand/api/v2/scripts/pycollected 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.GET/DELETEon/api/v2/scripts/{lua,py}/<name>(andnscp lua|py show|delete) answered an empty200and did nothing. They now read and delete script files as documented; the security notice lists what that means for the grants.on_startcalling the Core API no longer leaves the Lua lock held for good;Registry:simple_cmdlinehandlers run; a reload re-runson_start;require()searches${scripts}/lua/libas documented, which fixes shared helpers on Linux packages.plugin_aliasispythonrather than empty when no alias is set; aRegistry.eventhandler no longer crashes the agent andRegistry.event_pbhandlers run;Core.simple_execreports a call nothing could run as UNKNOWN instead of(0, []).nscp lua listandnscp py listwere always empty on DEB/RPM installs, where${scripts}lives under/usr/lib; they now list the scripts.📡 Socket servers and the core — concurrency
/api/v2/events, ElasticClient and script handlers all saw duplicates.target=<name>sent its payload twice:check_foo!a!aover NRPE, everysubmit_*message as two lines, everybatch=record twice.on_startor a Schedulerrun on startupschedule 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.📝 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 andnsclient.fatalrecords it.--log-backend fileandthreaded-fileboth 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, andconvert(2, 'min')/convert(2, 'kb')now scale whole numbers as they did fractions.check_http json-path=, Docker, Kubernetes and floating-point keywords saturate at the integer limit.filter_perfsorts non-numeric entries last.http(s)homepages.USER_WRITABLE_CONFIGinstaller property that amount to administrator access, and the unreachable root/metricsroute is removed.🐛 Bug fixes
check_pdhand 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> ...), andignore-errors=truenow skips a counter with no value (Failed to add counter: PdhCollectQueryData failed: : 800007d5: Aucune donnée à renvoyer. #648, fix: retry a briefly missing PDH instance and name the counter in check_pdh errors #1654, Handle PDH_CSTATUS_NO_INSTANCE as empty set, not error #1625).allowed hostslist and the section that sets it (fix: say why a connection was rejected and where to change allowed hosts #1651).\nare refused instead of silently gaining a newline, so"path=C:\nscp"no longer becomesC:+ newline +scp(Fixes found while reviewing old issues: aliases, check_nt errors, OS names, FAQ #1649).&in a file or service name no longer splits the reply (Fixes found while reviewing old issues: aliases, check_nt errors, OS names, FAQ #1649).check_os_versionno longer swaps Windows 7 and Server 2008 R2, and names Windows 11 25H2 (Fixes found while reviewing old issues: aliases, check_nt errors, OS names, FAQ #1649).scriptsentries resolve under${scripts}and a missing one is logged.📦 Packaging
The full list is on the upgrading page, and the security fixes on the
security notices page.
nscp settings --validatecan now exit with1. A script or pipeline that runs it fails on any unread section or key; fix the reported entries.\nare refused. Check the log forRefusing aliasafter upgrading; write\\nfor a literal, and Windows paths with/or doubled backslashes.check_pdh'sFailed to add countertext changed; match the new prefixes.on_start, and Luarequire()/ CheckMKClient scripts resolve from${scripts}; check scripts that must run once, or helpers kept under the install base with a custom${scripts}.pythonasplugin_aliasandCore.simple_execreports failures as UNKNOWN; check scripts that test for"",0orFalse.kill tree = truenow runs the script in its own session; a script that callssetsid()itself getsEPERM.[/settings/permissions] enabled = true.Full Changelog: 0.24.1...0.25.0
This discussion was created from the release 0.25.0.
All reactions