Werk #17292: check_httpv2: Body checking: Fixes for inverted regular expressions

Component Checks & agents
Title check_httpv2: Body checking: Fixes for inverted regular expressions
Date Sep 18, 2024
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p18 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The new active check for HTTP endpoints offers the option to search the response body for strings. This search can be configured to either use a fixed string or a regular expression. In the latter case, there is the additional option to invert the matching: Report WARNING if the expression matches and OK if not. This werk fixes two issues related to this option:

  1. In the user interface, the inversion option was incorrectly labelled with "CRITICAL" instead of "WARNING" in case the expression matches.

  2. In the service output, if inversion was activated, a not-matched expression was labelled with "matched" and a matched expression with "not matched". Note that the actual service state (WARNING if matched, OK otherwise) was correct.

To the list of all Werks