Skip to content

Commit ea773e4

Browse files
Update notify_json.py
1 parent bf3432e commit ea773e4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

notify_json.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
# Action could be: ban, unban, attack_status for BGP Blackhole mode and partial_block, partial_unblock for BGP Flow Spec mode
2323
action = parsed_details["action"]
2424

25-
# Can be: per_host, hostgroup,network, remote_host
25+
# Can be: host, hostgroup,network, remote_host
2626
scope = parsed_details["alert_scope"]
2727

28-
if scope == "" or scope == "host":
28+
if scope == "host":
2929
ip_address = parsed_details["ip"]
3030

3131
logging.info("Callback action " + action + " for host " + ip_address)
@@ -37,5 +37,9 @@
3737
network = parsed_details["network"]
3838

3939
logging.info("Callback action " + action + " for network " + network)
40+
elif scope == "remote_host":
41+
ip_address = parsed_details["ip"]
42+
43+
logging.info("Callback action " + action + " for remote host " + ip_address)
4044
else:
4145
logging.info("Unknown scope " + scope)

0 commit comments

Comments
 (0)