What you need to know
Review complete-file publication, section boundaries and encoding before letting the agent consume custom spool data.
Potentially affected
Checkmk agents consuming custom output files from their documented spool directory.
DSE recommendation
Publish a complete, reviewed spool response and check the remaining agent output for unintended damage.
Bottom line: Choose a complete-file publication method and valid section/encoding boundaries so buffered or malformed spool output cannot truncate the remaining agent response; avoid live streaming into the consumed file.
Source fact: what the authority says
The Checkmk spool-directory guide says the agent gathers spool files and incorporates their contents into its response. The agent does not validate spool content, and malformed output can make later parts of the response unusable. The guide recommends a section header and final newline for each spool file, and specifies UTF-8 without a byte-order mark and Unix newline characters. For buffered or long writes, it recommends preparing the complete content before writing, or using a temporary file before copying its contents into the spool location.
What the source does not establish
This article reviews the publication boundary of custom agent input. It does not approve a producer’s privileges, guarantee that its reported state is true or prescribe a freshness interval for every source.
Applicability questions
- Which producer owns each spool file and its complete response format?
- What section boundary, encoding and final newline are intended?
- Could a long buffered write or exclusive lock expose incomplete input?
- Which later agent section will serve as a control for downstream parsing?
DSE recommendation: controlled next steps
The following steps are DSE recommendations based on the cited source.
DSE recommends treating the spool file as an input interface with an identified producer and reviewer. Record its path, intended section and responsible owner. Keep unrelated programs from sharing the same output filename, and preserve the original complete response when investigating a malformed publication.
Review how the producer prepares and publishes its content. Require the complete intended response before the selected write operation and assess long buffering or locking behavior with the implementer. Follow the guide’s complete-content or temporary-file approach as appropriate, while obtaining any required atomicity properties through a separate implementation review.
Check the actual output bytes against the documented encoding and boundary guidance. Use the intended platform’s explicit output configuration instead of assuming the script’s default text encoding is suitable. Keep the section header, final newline and any subsequent agent content in the same review sample.
Prepare a disposable producer fixture with harmless content and a known later section. Separate producer correctness from the collection mechanism: have the data owner verify what the custom state means, and the agent owner verify the response structure. Avoid replacing an unexplained malformed file with an always-OK sample to make the overview appear healthy.
Verification and evidence
Proposed verification: inspect a complete test file and the resulting full agent response, including the later control section. Retain the actual bytes and parser observations. In an isolated fixture only, compare incomplete or incorrectly encoded input with the reviewed complete publication and record where interpretation differs.
Exercise the chosen producer write sequence under the approved lab conditions and preserve any partial-read or lock symptom for investigation. Compare the final response with the expected section inventory. Accept only the observed format and publication behavior; do not infer an atomic-copy guarantee, trustworthy producer state or universal timing result.
Official references
- Checkmk — The spool directory — official product documentation; confirm the installed release and configuration.
Source review completed October 30, 2026. Recheck the official documentation and deployment-specific applicability before a production change.
Review the official source
Checkmk — The spool directory · Verified October 30, 2026
Need help applying this guidance safely?
DSE can help confirm applicability, protect service continuity, and validate the result across physical security and IT systems.
Talk with DSE