Skip to content

fix: send a sticky acknowledgement as type 2 - #85

Merged
somethingwithproof merged 2 commits into
developfrom
fix/sticky-ack
Dec 4, 2026
Merged

somethingwithproof merged 2 commits into
developfrom
fix/sticky-ack

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Intent: make the Sticky box of Acknowledge Problem give a sticky acknowledgement on Nagios Core.

Scope: NagiosCmd::setCommand() writes a validated sticky value of 1 as 2, Core's ACKNOWLEDGEMENT_STICKY; 0 stays 0 and the dialog's values stay 0 or 1. Every backend sends the string it builds, so the command file and Livestatus both get the fix. CHANGELOG updated.

Risk: low. Naemon reads 1 and 2 both as sticky, so Naemon sites see no change; Nagios Core sites get the sticky acknowledgement users asked for.

Verification (local, PHP 8.5, MariaDB, Naemon 1.6.0): full Pest suite on this branch; new unit tests check the command text of both acknowledgement commands for sticky 1, 0 and a refused raw 2, and the Livestatus e2e test now checks that Naemon records acknowledgement_type 2. The Naemon e2e test cannot tell 1 from 2 (Naemon accepts both); the unit test is the regression test, with Nagios Core 4.5.14 source cited.

Base: develop at 77ba34c. Independent of the native engine branches.

Fixes #84

The Sticky box of Acknowledge Problem went out as 1. Nagios Core reads
that field as the acknowledgement type and treats only 2
(ACKNOWLEDGEMENT_STICKY) as sticky, so every acknowledgement sent to
Core was a normal one that ends at the next state change. Naemon reads
1 and 2 as sticky, so 2 is right for both.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@somethingwithproof
somethingwithproof merged commit 9a93c5a into develop Dec 4, 2026
9 checks passed
@somethingwithproof
somethingwithproof deleted the fix/sticky-ack branch December 4, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Acknowledge Problem's Sticky box gives a normal acknowledgement on Nagios Core

2 participants