Fix a bug where the summary for Defender alerts are entirely State.OK; the "details" field doesn't like an empty string.
This commit is contained in:
parent
6d39ee351b
commit
1b4fafb15e
Binary file not shown.
BIN
check_mk-azure/azure-spearhead-0.5.1.mkp
Executable file
BIN
check_mk-azure/azure-spearhead-0.5.1.mkp
Executable file
Binary file not shown.
@ -252,6 +252,9 @@ def check_defender(item, params, section):
|
||||
if state.value > State.OK.value:
|
||||
region_details.append(f"{severity}: {info}: {url}")
|
||||
|
||||
if region_details == []:
|
||||
region_details = ["No Defender alerts"]
|
||||
|
||||
yield Result(
|
||||
state=final_state,
|
||||
summary=f"High: {num_high}, Medium: {num_med}, Low: {num_low}, Informational: {num_info}",
|
||||
|
Loading…
Reference in New Issue
Block a user