check_httpv2: Option to Display Website Content in Case of Check Failure

3 votes

In many situations, it would be helpful to view the exact content displayed on the website when a check fails (similar to the --show-body option in check_http).

Often, the returned page contains valuable information that can significantly support troubleshooting. For example, when the search string does not match or when an API returns an HTTP code other than 200, it would be beneficial to view the corresponding response content.

I propose adding a configuration option that allows users to choose between the following modes:

* Never – never show content
* On Error – show content only when the check fails
* Always – always show the returned content

I understand that the displayed content may pose certain risks. However, the decision on whether this risk is acceptable should be left to me and not be restricted by default. An additional option "show simple HTML" that determines whether potentially harmful elements are removed or raw data is displayed could make the display both safer and more flexible.

To address this potential issue more generally, please also refer to this suggestion about adding a sanitize HTML option for safer check output rendering:
https://ideas.checkmk.com/suggestions/713053/add-sanitize-html-option-for-safer-check-output-rendering

Since the error that triggered the alert often cannot be reproduced afterwards, this feature would significantly enhance the diagnostic capabilities for websites and HTTP-based APIs.

Under consideration Checks&Agents Suggested by: Lars Sörensen Upvoted: 17 Jun Comments: 0

Comments: 0