0.12.3 #1260
mickem
announced in
Announcements
0.12.3
#1260
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.
-
What's Changed
This release rolls up everything since the last stable: five pre-releases (
0.11.31,0.11.32,0.11.33,0.12.1,0.12.2) plus the latest in-development changes.The headline themes are:
check_netfamily.counters and real-time filters.
0.12.2is a security release that closes listener defaults that used to be silentlypermissive (empty
allowed hosts, plaintextcheck_nt, query-string tokens, etc.).check_service,check_process,check_files,check_drivesize,check_uptime,CheckLogFile, and the shared filter/threshold engine all behave correctly now.TL;DR for end users
dump. See scenarios/check-mk.md.
IcingaClientmodule submits passive results to Icinga 2's RESTAPI as an alternative to NSCA / NRDP.
NSCAngClientwith PSK and AEAD-first cipher selection.check_tcp,check_dns,check_http,check_ntp_offset,check_connections.check_registry_key,check_registry_value.automatically.
GET/DELETE /api/v2/events,GET /api/v2/metadata,DELETE /api/v2/settings/.... Coveredin api/rest/.
years.
check_service,check_process,check_files,CheckLogFile, the filter/threshold engine andthe HTTP stack.
Major new features
Checkmk agent integration
NSClient++ can now serve a Checkmk-compatible agent dump on TCP port 6556. A real Checkmk site can register the host
with
tag_agent = cmk-agent, discover services, and run checks — no proxy, no NSCA gateway.Enable it:
Out-of-the-box sections (no extra config):
<<<check_mk>>><<<systemtime>>><<<uptime>>><<<mem>>>MemTotal:/MemFree:/SwapTotal:/SwapFree:(from metrics store)<<<df>>><<<services>>>name state/start_type display_nameper Windows service<<<ps>>>(user,vsz_kb,rss_kb,cputime,pid) cmdlineper processExpose any nscp check as a Checkmk service under
<<<local>>>:MRPE relay under
<<<mrpe>>>:Documentation: https://nsclient.org/docs/scenarios/check-mk.md`.
IcingaClient — Icinga 2 REST API submission
A new client module submits passive check results directly to an Icinga 2 master/satellite via the
/v1/actions/process-check-resultREST endpoint, as an alternative to NSCA or NRDP.nscp client --module IcingaClient \ --command submit_icinga \ --address https://icinga2.example.com:5665 \ --username nscp --password secret \ --command heartbeat \ --result 0 \ --message "Hello from NSClient++" \ --ensure-objectsNSCA-ng client
A new
NSCAngClientmodule ships a hardened NSCA-ng submission client with PSK support, AEAD-first cipher selection,and connection retry logic.
Native support for Windows CA-store
On startup NSClient++ now exports the machine's
ROOTcertificate store as a single PEM bundle, so any check that doesTLS (
check_http,IcingaClient, NRDP, ...) can validate certificates against the trust store the rest of Windowsalready uses.
CheckNet — five new (cross-platform) checks
CheckNetgraduated from a placeholder into a full network-check module. All five commands work over NRPE as well aslocally:
check_tcp— open a TCP socket to one or more host/port pairs, optionally send a payload and require an expectedsubstring.
check_dns— resolve a hostname and optionally assert which addresses come back.check_http— fetch one or more URLs, check status code, response time and body content; supports custom headersand user-agent.
check_ntp_offset— query one or more NTP servers and alert on offset / stratum.check_connections— Windows TCP/UDP connection table inspection (counts per protocol/family/state).CheckSystem (Windows) — registry checks
Two new commands let you monitor the Windows registry directly from NSClient++ instead of relying on external scripts.
They support recursion, exclude lists, 32/64-bit (WoW64) views, custom filters and the usual
warn=/crit=expressionsyntax.
check_registry_key— verify that a key exists, count sub-keys/values, watch its last-write time.check_registry_value— read a single value assert its type, size or content.CheckSystem —
check_os_updates(Windows)A new check using the Windows Update Agent (WUA) reports pending OS updates. By default any pending update returns
warning; thresholds let you alert only on security/critical:
CheckSystem (Linux) — real-time metrics
The Linux build of CheckSystem now ships with the same real-time metric collection that has been available on Windows
for a long time: CPU, memory, disk, network and load are sampled in the background and exposed both to
dashboards/metrics and to real-time filters (
filter=...rules that fire when a threshold is crossed). Existingreal-time filter configuration just works on Linux now.
Real-time filter metrics
CheckSystem's real-time filters now publish per-filter match and error counts undersystem.realtime.<filter_name>.fired/system.realtime.<filter_name>.errors. Visible via:/api/v2/metrics+ filter)Metrics()Lua API indefault_check_mk.luaUseful for spotting filters that never fire (typo in the where-clause) or filters that always error (broken
expression).
CheckDisk —
check_single_fileA focused variant of
check_filesfor inspecting a single, known path. Compared to usingcheck_filesfor the samejob:
file=<path>).UNKNOWN: File not found: <path>when the file is missing — instead of the empty-set / "No files found" workflow.detail-syntaxso a no-threshold run is informative on its own.CheckDisk — filesystem filtering for
check_drivesizecheck_drivesizecan now filter drives by filesystem type — useful for excludingtmpfs,nfs, etc.check_nscp_updateA new check command queries the GitHub releases API (with caching) and reports whether the running NSClient++ is up to
date.
HTTP proxy support across every HTTP client
NSClient++ can now route HTTP and HTTPS traffic through a corporate proxy. The same surface is used by every component
built on the internal
http::simple_client(NRDPClient, ElasticClient, Op5Client, IcingaClient, the remoteboot.iniloader, ...).
For HTTPS targets the client opens a CONNECT tunnel to the proxy, validates the proxy's response, and only then performs
the TLS handshake — so a single setting covers both
http://andhttps://URLs.Two new options on every HTTP client command and target:
proxyscheme://[user:pass@]host[:port]/. Empty value disables the proxy.no-proxy.is a suffix match.Configuration loader (
boot.ini):Notes / limits:
http://proxy scheme is supported.socks5:///https://proxies are not.HTTP_PROXYenv vars, WinINET / WPAD). The proxy must be configuredexplicitly.
407 Proxy Authentication Requiredthe proxy's response body is captured in the error message.Web UI / REST API expansion
New web routes:
/api/v2/eventsGET/api/v2/eventsDELETE/api/v2/metadataGET/api/v2/metadata/countersGET/api/v2/metadata/channelsGET/api/v2/settings/<path>DELETEThe settings store gained staged deletion: a
DELETEis recorded so that subsequent reads of the deleted key/pathreturn "not present" until the change is saved. Stops a deleted-but-not-yet-saved key from being re-resurrected by a
concurrent read.
Web UI refresh
The bundled web interface has been heavily reworked:
/api/v2/metadata/counters, "Add filter" / "Add counter" dialogs, and a live preview of metric values pulled from themetrics endpoint.
If you've been editing real-time filters in
nsclient.iniby hand, the web UI is now a much faster way to do it.SMTPClient rewrite
The SMTPClient module has been substantially rewritten with proper SMTP handling, integration tests, and a Python-based
test harness.
Smaller features
nscp settings --sort— produce stable, sorted output, useful for diffing exported settings between hosts.propagated into emitted perfdata:
check_uptimeandSchduler— applies a timezone cache on both Windows and Unix, so absoluteboot-time output and cron expressions agree with the host's local time.
Secure,HttpOnly,SameSite,Path,Domain,Expires,Max-Age.equality check.
Filter engine — stable summary thresholds
These changes touch the shared filter / threshold engine and therefore affect every modular check (
check_files,check_service,check_process,check_eventlog, ...).Stable
count/total/*_countinwarn=/crit=warn=/crit=were evaluated during iteration. Summary variables such ascounttherefore exposed their runningvalue instead of the final post-iteration value, so a mixed expression like
mis-fired on the very first row (
count == 1 < 5) regardless of how many rows ultimately matched. Per-row evaluation isnow deferred: matched rows are recorded during iteration, and the warn/crit/ok engines run once the summary state is
final.
Mixed
warn=/crit=evaluated when no rows matchIf a filter excluded every row, mixed expressions like
crit = state = 'stopped' OR count = 0were skipped entirely —leaving the check
OKin the empty case. They are now evaluated with object-bound variables defaulting tofalseandsummary variables at their final values, so the check correctly returns CRITICAL when the service is missing.
Quieter, more predictable expression evaluation
is_unsurepropagates consistently; invalid-type comparisons resolve tounsure-falseinsteadof erroring.
is_unsure=trueand produce a warning in thelog instead of an error per row — log volume on complex queries drops dramatically.
check_serviceandcheck_processfixes (Windows)end-of-data.
perf-syntax=noneactually suppresses perfdata —check_serviceused to emit empty perfdata aliases (''=4;0;1 ''=4;0;1 ...), blowing past NRPE size limits.TODOleaking into${desc}—check_service service=Spoolerused to render asOK: Spooler: TODO.Now:
OK: Spooler: Print Spooler.delayedonly reported forSERVICE_AUTO_START— manual / boot / system / disabled services no longer randomlyshow up as
delayed.check_processsees protected / cross-user processes asNETWORK SERVICE— aPROCESS_QUERY_LIMITED_INFORMATIONfallback is now attempted, so
winlogon.exe,csrss.exeetc. no longer reportCRITICAL: <name>=stoppedwhen theagent runs unprivileged.
check_processis now case-insensitive, matching the active path and Windows itself.check_filesfixesmax-depth=0now scans the top directory only (was: bail out before scanning anything, returning "no filesfound").
conversions.
UNKNOWN: Path was not found: <path>instead of beinghidden behind the configured
empty-state.self-referential trees.
CheckFilesshim now setsempty-state=okwhen translating, restoring 0.4-era behaviour forlegacy calls that find zero files.
Other check / module fixes
check_drivesizerun.CheckLogFilehonours theline-splitargument (previously hard-coded to\n); multi-characterdelimiters such as
\r\nare handled correctly. Real-time seek behaviour fixed; CRLF handling harmonised.time=3000foobarortime=3000mfoobarare no longer silently accepted;malformed inputs are rejected with a clear error.
U(Nagios "undefined") in performance data is preserved end-to-end instead of being coercedto
0. Only an exactU,u,U%oru%token matches.derive seconds-since-epoch from
second_clock::local_time(), which drifted by the host's TZ offset. Atimezonesetting on both ends allows legacy interop with agents that emit local-clock-as-Unix-time stamps.
reponse → responsetypos corrected.payloads and reading certificates.
nrdpclient alias.HTTP refactor
check_httpagainst servers usingTransfer-Encoding: chunked(most modern reverse proxies, Icinga 2, Kubernetes ingress, ...) now returns the full body instead of a
truncated/garbled one. The IcingaClient module relies on this.
Security hardening
The
0.12.2release is a security-focused pass. These do not change documented behaviour for well-formed traffic butclose down attacker-controlled edge cases.
DoS / resource-exhaustion limits
NSCA hardening
Log/output injection prevention
Control characters are stripped from values before they are written to external sinks, removing log/protocol-injection
vectors:
log_statusis now JSON-serialised so attacker-controlled fields cannot inject extra structured fields.Filesystem / process safety
Cryptography / TLS
RAND_bytes(cryptographically secure) instead of the previous predictablegenerator.
check_ntpassword compare is constant-time.Breaking changes
Listeners default to safer behaviour
allowed hostsnow rejects all connections. Previously treated as "allow any source". To genuinely exposethe agent to any source, set it explicitly:
check_nt(NSClientServer) defaults tossl = true. The legacycheck_ntprotocol carries the password inevery request. The listener will not refuse to start if TLS is off, but it will log a warning. To keep the old
plaintext behaviour for legacy clients, set
ssl = falseexplicitly in[/settings/NSClient/server].check_nt: the literal passwordNoneno longer authenticates. Empty server passwords now reject all requests.Errors are also genericised (
ERROR: Bad request.) to remove the online password-guessing oracle./auth/tokenand/auth/logoutare removed (HTTP 410). They accepted the password and session tokenas URL query parameters, leaking credentials into browser history and proxy logs. Migrate to:
POST /api/v2/loginwithAuthorization: Basicto obtain a tokenDELETE /api/v2/loginwithAuthorization: Bearerto log out?TOKEN=/?__TOKEN=query-string token auth removed. Send the token in a header instead:Authorization: Bearer <token>,TOKEN: <token>, orX-Auth-Token: <token>.anonymousregistered in settings is silently ignoredunless the new
allow_anonymousflag is enabled.adminuser is no longer overwritten on restart. Deployments that relied on the passwordbeing reset to the default at boot must adapt.
Scheduler — cron expressions evaluate in local time by default (#570)
The
Schedulermodule previously used UTC, so40 15 * * *fired at 15:40 UTC regardless of host TZ. The default haschanged to local time, matching standard cron semantics. Hour and minute fields will shift accordingly on non-UTC hosts.
A new
timezonesetting under[/settings/scheduler]controls the reference clock:IANA names such as
Europe/Stockholmare not supported — use the POSIX form. Unparseable values fall back to UTCand surface as
UTC?in any timezone label.Filter / threshold engine
warn=/crit=no longer fire mid-iteration on running counts.Configurations "tuned" against the buggy early-fire will produce different results.
warn=/crit=now evaluate when no rows match.count > 0 AND ...guard or move the empty-case logic into adedicated check.
Check-specific corrections
check_service:delayedis no longer reported for non-auto services. Filters that matchedstart_type = 'delayed'on Manual / Boot / System / Disabled services will stop matching. To alert on "anynon-running service that isn't disabled":
check_processis now case-insensitive. A rule that intentionally matched only an exact casing willnow match all variants (almost certainly the desired behaviour).
check_service:${desc}no longer returns the literalTODO. Use the real display name.check_service:perf-syntax=noneactually suppresses perfdata. Backends that consumed the empty-aliasedentries (highly unlikely) will see them disappear.
check_files— corner cases changedmax-depth=0now scans the top directory instead of returning empty (check_files max-depth=0 did not work #730).CheckFilescalls that previously returned UNKNOWN on empty results will now return OK (Check_nrpe and count files : bad Unknown status #717).Configuration / startup
been removed.
Aliases whose command line does not parse cleanly are refused with an error in the log instead of being silently
registered with surprising tokenisation. Review your logs after upgrading.
Internal API (out-of-tree module authors)
http::request/http::responseare now distinct,headers are case-insensitive, and chunked decoding happens transparently.
Out-of-tree modules linked against the old shared bag type need a small adjustment:
Documentation reorganisation
concepts/,checks-in-depth/,scenarios/,tutorial/,reference/are now clearly separated). Bookmarks and external links may need updating.
Upgrade checklist
allowed hostson every node — empty values now reject everything.check_nt(NSClientServer) now defaults tossl = true. If your clients don't speak TLS, setssl = falseexplicitly. Either way the listener will log a warning at startup if TLS is off or a password is configured,
recommending a switch to REST or NRPE.
/auth/tokenor/auth/logoutwith the/api/v2/loginflow.?TOKEN=/?__TOKEN=in the query string with a header-based token.[/settings/scheduler] timezone = utcto restore the previous behaviour.check_service/check_process/check_filesfilters that may have relied on the corrected behaviourslisted above.
configurations that were previously silently accepted.
No configuration migration is required for the new HTTP proxy keys, the Checkmk server, the Icinga client, the NSCA-ng
client, or the new checks — they are all opt-in.
Full Changelog: 0.12.2...0.11.30
This discussion was created from the release 0.12.3.
Beta Was this translation helpful? Give feedback.
All reactions