Fix crit/warn bug with Defender alerts.
This commit is contained in:
parent
5fa472f450
commit
36a998cfc6
Binary file not shown.
BIN
check_mk-azure/azure-spearhead-0.1.1.mkp
Executable file
BIN
check_mk-azure/azure-spearhead-0.1.1.mkp
Executable file
Binary file not shown.
@ -210,7 +210,7 @@ def check_defender(item, params, section):
|
|||||||
if status != "Active" and status != "InProgress":
|
if status != "Active" and status != "InProgress":
|
||||||
return
|
return
|
||||||
|
|
||||||
severity = details["status"]
|
severity = details["severity"]
|
||||||
url = details["url"]
|
url = details["url"]
|
||||||
info = details["info"]
|
info = details["info"]
|
||||||
|
|
||||||
@ -218,8 +218,10 @@ def check_defender(item, params, section):
|
|||||||
state = State.CRIT
|
state = State.CRIT
|
||||||
elif severity == "Medium":
|
elif severity == "Medium":
|
||||||
state = State.WARN
|
state = State.WARN
|
||||||
else:
|
elif severity == "Low":
|
||||||
state = State.OK
|
state = State.OK
|
||||||
|
else:
|
||||||
|
state = State.UNKNOWN
|
||||||
|
|
||||||
yield Result(
|
yield Result(
|
||||||
state=state,
|
state=state,
|
||||||
|
Loading…
Reference in New Issue
Block a user