Skip to content

Commit

Permalink
added intent to correlation rule script
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Sep 8, 2021
1 parent 678a675 commit 2989dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export-rules/download-correlation-rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def help():


if r.status_code == 200:
print("Rule_Name", TAB, "Rule Description", TAB, "Rule Type", TAB, "Rule Conditions", TAB, "Mute", TAB, "Strategy", TAB, "Method")
print("Rule_Name", TAB, TAB, "Rule Intent", "Rule Description", TAB, "Rule Type", TAB, "Rule Conditions", TAB, "Mute", TAB, "Strategy", TAB, "Method")

data = r.json()
for i in data:
print(i["id"], TAB, "method-definition" in i and i["method-definition"] or "NONE", TAB, "Correlation Alarm Rule", TAB, i["conditions"], TAB, "mute-length" in i and i["mute-length"] or "No Mute Time", TAB, i["strategy"], TAB, i["method"])
print(i["id"], TAB, i["intent"], TAB, "method-definition" in i and i["method-definition"] or "NONE", TAB, "Correlation Alarm Rule", TAB, i["conditions"], TAB, "mute-length" in i and i["mute-length"] or "No Mute Time", TAB, i["strategy"], TAB, i["method"])
else:
print("ERROR: Request status = " + str(r.status_code))

Expand Down

0 comments on commit 2989dc4

Please sign in to comment.